Creating Layers
<< Click to Display Table of Contents >> Navigation: Layers > 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. |
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 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.
Request mode |
|
Load by tile |
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. If the grid is not properly configured, this can have a negative impact on the system's performance or lead to operational problems. When you press the Estimate button, JMap performs a calculation to determine the best configuration for the grid. You can accept these values or modify them according to your needs. 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 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 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 is the same as that of an SQL WHERE clause. The where keyword is not necessary. |
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.
WMS raster layer |
|
Connection type (Direct/Server) |
The connection type determines if JMap Pro applications will request images directly from the WMS server or if they will send the requests to JMap Server, which in turn will query the WMS server. JMap Web applications are not affected by this setting. 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) |
The layers selected among those that are available appear in this list. Click on to add a new layer to this list. You can select the style to be used. A default style is always provided. Click on to delete a selected layer. |
Creating a raster layer based on a GDAL, TIFF/GEOTIFF 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. |
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.