Spatial Data Sources

A spatial data source in JMap Server, as its name implies, is any source that can provide spatial data. Spatial data sources are separated into 2 families: vector data sources and raster data sources. Vector data sources provide vector spatial data along with its attributes, and raster data sources provide raster data (images). Configuring data sources is usually the first step to publishing spatial data with JMap.

Some spatial data sources work with a file reader to load spatial data from files in various formats (e.g. MID files, SHAPE files, image files, JPEG photo files, etc.). Other data sources access the data stored on remote spatial data servers (e.g. PostGIS, Oracle Spatial/Locator, ArcSDE, WMS/WFS servers, etc.).

Once a spatial data source is created, it must be updated before it can be used. Updating a spatial data source means preparing it for use by JMap Server. In concrete terms, this operation involves different tasks, depending on the type of data source. Generally speaking, for data sources that access data stored in files, the contents are read by JMap Server and inserted in the tables of JMap’s System database. A spatial index is then built for fast access, and attribute statistics are calculated. For data sources that access data stored on spatial data servers like Oracle Spatial/Locator or WFS systems, the update process is simpler and only involves calculating attribute statistics. Updating file data sources takes more time than updating server data sources.

Spatial data sources are listed in the Spatial data section in JMap Admin. The table displayed presents basic information about each data source. When you click on the name of a data source, a details section is displayed. This section presents some useful information about the spatial data source and provides some management functions associated with it.

Basic concepts

Editable data sources

Some spatial data sources support data editing (writing) by JMap Server. This is the case of most DBMS type data sources (PostGIS, Oracle Spatial, etc.). In this manual, each section pertaining to a specific type of data source indicates whether it supports reading only or reading and writing.

File type data sources (SHP, GML, etc.) do not support data editing. However, there is an option allowing you to transform this type of data source into a JMap Spatial data source, which will then allow you to edit spatial and descriptive data in JMap. Once this transformation has been done, the data source will no longer be linked to the original files. All data modifications will have to be performed directly using JMap’s editing tools.

Including multiple files

In most data sources that read files, multiple files can be integrated together to form continuous maps. It is frequent for CAD users to split a territory in rectangular tiles. By reading all tile files together, JMap administrators can recreate continuous maps, provided that the files contain the same data structure (geometry, layers and attribute types).

File browsing

JMap Admin provides a file browser that allows you to navigate through the file system of the server where JMap Server is running in order to select the files to include in the data sources. Local and network storage units can be used, as long as the JMap Server process has access to them.

You can also create user paths. These paths are shortcuts that allow you to save time when browsing the system. They can also be used to write paths that are specific to an operating system, such as Windows UNC (e.g. \myserver\data). To create a user path, you must go to the root of the file system and click on Add user path…

To restrict browsing in the file system, you can define one or more root folders. The JMap administrator will not be able to navigate outside these folders. To do this, you must add a line to the file jmapserver.properties.

admin.filebrowser.roots=c:/data/DataGeo|Data;d:/data2|Data2

In this example, two root folders are created, named Data and Data2.

Uploading files

Accessible through the file browser, the Uploads directory contains files uploaded by all users directly to JMap Server from JMap Admin. If you want to upload a file for use as a spatial data source, click on this folder to access the upload interface.

Enter a name for the file and press Upload. The file will be uploaded to a directory created automatically for your user account. The file is accessible to all user accounts.

Updating spatial data sources

Before a spatial data source can be used to create layers, it must be updated. In JMap, updating a data source generally involves collecting information on the spatial data and its attributes and preparing data for fast and efficient access. This process may be very brief or may take several minutes, depending on the type of data source and amount of data.

In JMap Admin, you can update a data source by clicking on Update in its information section. You can also update several data sources simultaneously by selecting them in the section displaying the list of data sources and clicking on Update.

Scheduling automatic data source updates

You can schedule automatic updates for spatial data sources. This action may be helpful if you use data sources that read data files. If the files are frequently modified, you can schedule automatic updates that will occur on a regular basis (every day at midnight, for instance) for the appropriate data sources. Each data source can have its own schedule.

In order to schedule updates for a given data source, click on Schedule from that data source’s details section or in the list of data sources. Afterwards, simply follow the wizard to define the specific moments when the updates will take place. Scheduling options are very flexible.

Once these tasks have been scheduled, you can view the current schedule for a data source by viewing its information section.

At any time, you can access the list of all planned updates for data sources by clicking on Scheduler in the JMap Server section.

Deleting spatial data sources

You can delete spatial data sources by clicking on Delete from the data source’s information section. You can also delete data sources by selecting them in the section listing the sources and then clicking Delete. When a data source has been deleted, its entire configuration is permanently deleted. The data itself (the file or database) is not affected.

Statuses of spatial data sources

Each spatial data source has a status. The status indicates the condition of the data source, i.e. if it is ready to be used, if an error occurred, etc. The status of a newly created data source is always set to not ready (unless you checked the auto-update flag). This means that the data source cannot be used yet. In order to be used, every data source must be updated at least once.

Data sources can be updated in batches. A maximum of 3 data sources can be updated simultaneously. Other data sources to be updated are queued until they can be updated.

The following table describes the possible statuses of a spatial data source:

Statuses

Error

An error occurred. The data source cannot handle requests. See error message to determine the source of the error.

Job queued

The data source is waiting to be updated.

A maximum of 3 data sources can be updated simultaneously.

The data source can still handle requests if it was updated at least once before.

Update needed

The configuration of the data source has been modified and it must be updated before the changes are effective.

The data source can still handle requests.

Not ready

The data source is not ready to handle requests.

This status is typically attributed to a data source that has just been created but has not yet been updated.

Ready

The data source is ready to handle requests.

Updating

The data source is being updated.

Depending on the type of data source and volume of data, the update process can be very fast or it can take a certain amount of time.

The data source can still handle requests if it was updated at least once before.

System spatial data sources

System spatial data sources are data sources that are automatically created by JMap to support JMap data source and layer sharing. Normally, these resources do not need to be managed and they are not displayed by default in the list of spatial data sources. If you wish to display them, you can select Show system data sources in the display settings of the list of spatial data sources.

Dernière mise à jour

K2 Geospatial 2022