Creating Layers
Each layer of a project in JMap takes its data from a spatial data source. Thus, before layers can be created, the related data sources must already exist (see Creating Spatial Data Sources for more information).
Creating a new layer
To create a new layer, press Create in the Add menu of the Layers section of a project. Note that the new layer will have the same name as the data source by default. The name can be changed later.
Spatial data source
Spatial data source
Select the spatial data source that will provide the data of the layer. Selecting a vector data source will create a vector layer. Selecting a raster data source will create a raster layer.
Name
Enter a name for your new layer. The name must be unique. By default, the layer will take the same name as the selected data source.
Description
(Optional) Enter a description for the new layer. This description will be used for administrative purposes.
The next steps are different for vector layers and raster layers. Note that creating a raster layer is also different for each type of raster data source. Jump to the corresponding section below.
Creating a vector layer
Geometry type
Geometry type
If the data source provides more than one type, select the unique geometry type for the layer.
Element factory
Element factory
Some JMap extensions work with layers composed of complex elements, integrated by several distinct geometries. The spatial data sources associated with the extension allow defining the complex elements. When such a spatial data source is selected for the creation of a layer, this step allows to select the appropriate option to configure the complex elements of the layer. Select the Default factory option for layers composed by a single type of geometry. This step is absent when the spatial data source does not allow to define complex elements.
Attributes
Bound attributes
By default, when layer elements (points, lines, polygons, etc.) are served by JMap Server, the element attributes (or descriptive data) are not. This is because the attributes are not “bound” to the elements. Attribute binding binds attribute data to layer elements. Only bound attributes can be used for the following functions: labeling, mouseover, thematic mapping and displaying attributes in the elements or selection explorer. Select and add the attributes to the list on the right to bind them to the layer. The other attributes will still be available for other functions like attribute queries and information reports. Note that the number of bound attributes has an impact on network and memory usage as well as the size of Mapbox vector tiles and thus can reduce the overall performances. Therefore, attributes should only be bound when necessary.
Geometry angle (layers of points only)
Angle attribute
This section is only available for layers of points. In this section, select a numeric attribute that contains the rotation angles for the symbols representing the points of the layer. If you select an attribute of the angle, the symbols will be displayed with a rotation following this attribute value.
Units of angular measure
Choose the rotation unit to apply: degrees or radians
Direction
Choose the rotation direction. Angle values can be interpreted clockwise or counterclockwise.
Origin of rotation
Choose the origin of the rotation to apply: geographic (north) or arithmetic (east).
The request mode determines how the vector data is managed by JMap Server. It can greatly influence the system’s overall performance.
As of JMap Server Kathmandu HF9, the tile loading request mode is modified, considering two tile loading modes, automatic and manual. The settings prior HF9 are in Load by tile (manual) mode. You can edit the layer at any time and change the request mode.
Request mode
Load by tile (automatic)
The data is requested by rectangular zones (tiles) defined by a predetermined fixed grid that covers all the layer data.
Structuring layer data in tiles makes data management more efficient, for network transfers, memory management and cache storage. When you finish the settings and press Finish, JMap calculates the best configuration for the grid and applies them to the layer. This mode offers the best performance because once a tile has been extracted from a data source, it can be cached for a certain amount of time and reused effectively.
This is the recommended mode for most applications.
Load by tile (manual)
The data is requested by rectangular zones (tiles) defined by a predetermined fixed grid that covers all the layer data.
This option allows you to set the grid manually. The default value is 1 x 1. You can modify it.
Warning: If the grid is not properly configured, this can have a negative impact on the system’s performance or lead to operational problems.
Load by region
The data is requested by random regions, according to the user’s navigation actions on the map. Each time the layer needs to be displayed in the application, a new request is sent to JMap Server and the data is extracted again from the spatial data source.
This mode is very dynamic as no caching is used, and users can see data changes at every map manipulation (zoom, pan, etc.).
Note however that it is much more intensive for JMap Server and, if not used properly, it can affect the system’s general performance. This mode must be used for dynamic data. Typically, this data is found in a relational database and can be randomly modified.
This is the case for layers that are editable by JMap.
Advanced parameters
Most of the time, the following advanced parameters don’t need to be modified.
Advanced (optional)
Transformation
Apply a translation: Translate each geometry of the layer by X units horizontally and Y units vertically. The original data is not affected. Generalize geometries: Generalize (simplify) geometries using the specified tolerance. For a given geometry, all nodes that are closer together than the tolerance are eliminated. In addition, all nodes that are located on the same straight line are eliminated. The original data is not affected. Reduce precision (better performance): Use data compression to improve performance. In some rare situations, this option can noticeably reduce data precision. From JMap Server Dakar, this option is unchecked by default for new layers to avoid performance issues. Layers configured in earlier versions of JMap are not affected.
Caching
This section allows you to define server data caching rules for the vector data and its attributes. The cache is on the server. This improves performances because once data is in the cache, JMap Server does not need to load it again from the data source. Activate server data caching for this layer: Use this option to enable or disable data caching on the server for this layer. Automatically build the cache when the data source is updated: If caching is enabled, this tells JMap Server to flush and rebuild the cache for this layer, when the corresponding spatial data source gets updated. Building the cache in advance helps to prevent delays for the users. Building the cache may take a long time, depending on the volume of the data. Cache timeout: This instructs JMap Server to cache the data no longer than the specified time period. When the timeout is reached, the data is requested again from the data source. This is mostly useful for spatial data sources that get their data from spatial data servers to which JMap Server is connected (Oracle Spatial/Locator, ESRI geodatabases, PostGIS, MySQL Spatial, etc.). Update layer cache after I click “Finish”: Select this option to have the cache built immediately for this layer. Building the cache may take a long time, depending on the volume of data.
Base Filter
SQL conditions: SQL conditions are used to filter the elements of the spatial data source. Only the elements that satisfy the SQL conditions will be on the layer. This allows you to create many layers showing different data using the same spatial data source. SQL conditions are interpreted directly by the database system so the syntax resembles that of an SQL WHERE clause. However, you must always indicate the name of the table in the database in the SQL clause. WHERE keyword is not necessary.
Exemple:
WORLD_CITIES.JMAP_ID < 100
where WORLD_CITIES is the table name. If you specify only JMAP_ID <100, the layer is not displayed.
Creating a raster layer based on a WMS data source
To create a raster layer based on a WMS spatial data source, you need to tell JMap what data to request from the WMS server. The WMS server publishes a list of all the layers it can serve and their properties. In JMap, the WMS layer creation interface allows you to select the layers to include in the WMS layer you wish to create.
JMap Server offers two modes of connection to the WMS server: Direct and Server.
Direct mode implies that the JMap Server application communicates directly with the WMS service that returns the image. Pro, Web, NG and Survey applications support this option.
Server mode implies that the application asks JMap Server to communicate with the WMS service and return the image. If the application does not support this option, the Direct option is used automatically. Pro and Web applications support this option.
Connection type (Direct/Server)
If Direct is selected and a JMap Pro application fails to connect to the WMS server, the connection mode will revert to Server. Note that if JMap Server is behind a firewall/proxy, it may need proxy authentication settings in order to access the Internet.
See JMap Server Settings for more information.
Output format
The list of output formats offered by the WMS server. You can select the format to use.
Background color
Tells the WMS server what color to use in the background of the map images. Any area where there is no data will be filled with this color.
Use background color as transparent color
Tells the WMS server to use the background color as the transparency color. Using transparency allows the map images to be placed on top of other layers without completely hiding them.
S.R.S.
The list of Spatial Reference Systems offered by the WMS server for the layer. You can select the one to use. Make sure the selected SRS is consistent with the project projection because JMap cannot reproject images received from WMS servers.
Available layers
The list of layers the WMS server is publishing. If you hold your mouse pointer on a layer name, its description will display automatically, along with its attributes. The attributes determine if the layer is Queryable (supports GetFeatureInfo requests), Cascaded (comes from another WMS server) or Opaque (not transparent, i.e. the layers found under it will not be visible).
Selected layer(s)
Creating a raster layer based on a GDAL or ECW/ECWP data source
Raster layer
Image format
Select the image format to use for image transfers between JMap Server and JMap Pro applications. For air photos, JPEG usually gives the best results.
Image format parameters
Only used with JPEG image format to specify the quality factor (1 means excellent quality and low compression while 0 means low quality and high compression).
Test with different values to determine what fits your needs.
A value of 0.5 is usually a good compromise. Example: quality=0.6
Background color
Tells JMap Server what color to use in the background of the images. Any area where there is no data will be filled with this color.
Use background color as transparent color
Tells JMap Server to use the background color as the transparency color. Using transparency allows the map images to be used on top of other layers without completely hiding them.
Creating a raster layer from a WMTS data source
WMTS raster layer
Layer
Select the layer from the WMTS server that you wish to use to create the layer. Only layers who have the same projection as the project are selectable.
Style
Select the layer style.
Importing layers
You can add a layer to a project by importing it from a project that has been exported from another JMap server. The Exporting and Importing section provides details on exporting and importing a JMap server’s resources. To import a layer in a project, you must also create a data source in JMap Server containing the data of the imported layer.
When you select Add / Import… the Importation wizard will guide you through the process to import one or more layers from the project where they are found.
To start the process, select the Importation file. Click on Browse to access the File browser.
Select the .properties file that contains the project whose layers you wish to import.
Click on Next.
Select the Project that contains the layer you wish to import.
Select the Layers to import.
Click on Next.
If the project in which you are importing the layer contains a layer with the same name as the one you are importing, select an option to resolve the conflict between these layers: Create a new layer with a different name, Replace the existing layer or Use existing layer.
Click on Next.
If the JMap Server in which you are importing the layer contains a spatial data source with the same name as the data source of the layer you are importing, select an option to resolve the conflict between these data sources: Create a new data source with a different name, Replace the existing data source or Use existing data source.
Click on Next.
A summary lists the number of imported resources for the project: layers, databases, remote connections, spatial data sources, style templates, and metadata templates.
Press Import. The layer is added to the project and a new spatial data source is created in JMap Server.
Publishing layers
A layer must be published to be accessible to the users. A layer that is not published is not part of the project, and in no way can users see it or access it.
When a new layer is created, it is not published by default. This allows you to do further configuration tasks on the layer before making it available for the users. For example, it is important to configure visibility thresholds appropriately according to the scale before the layer can be seen by users.
After layer creation, you must press the Publish button in the layer’s detail section.
Unpublishing an existing layer can be useful to make it unavailable to the users without actually deleting it.
Dernière mise à jour