Read
Yes
Write
Yes
JMap Server can connect to Microsoft SQLServer Spatial databases to extract spatial data and attributes that can be used as a spatial data source. The only special requirement is the presence of a numeric column with unique integer values to be used as element identifiers. An SQL query must be provided. This query will be executed to read the data and it can access one or many tables at the same time.
The connection to the database must be already configured. See Creating Databases for more information.
Parameters
Database
Select the SQLServer Spatial database to read the data from. It must be already configured in JMap Admin.
SQL query
Enter the SQL query used to extract geometries and attributes from the database.
Geometry table
Select the physical table that effectively contains the geometries. Pressing Load will retrieve the list of fields returned by the query. This is necessary for the rest of the configuration.
Geometry field
Select the field that contains the geometries.
Id field
Select a field that contains unique identifiers. Only integer fields are listed.
Automatically convert to valid geometry
When this option is enabled, invalid geometries created in JMap are automatically converted to valid geometries using the SQL function MakeValid ()
. Upon insertion, JMap converts the invalid geometry to valid geometry. Note that the result may not exactly match the initial geometry.
Although the option is checked, JMap does not convert any existing geometry that is invalid in the data source.
This option also requires a valid SRID, so a projection must be specified for the data source. MakeValid
is not supported by all SQL Server versions, please consult SQL Server’s help to confirm the compatibility of the function for the geometries or geographies and your particular SQL Server version. Activating this option without meeting these criteria will result in an error during the insertion or updating of the data.
Creation time field
(Optional) If you want this data source to be editable by JMap, this field will show the creation date of each object. If no field is selected, the data can still be edited, but this information will not be maintained.
Modification date field
(Optional) If you want this data source to be editable by JMap, this field will contain the date each object was last modified. If no field is selected, the data can still be edited, but this information will not be maintained.
Author field
(Optional) If you want this data source to be editable by JMap, this field will either contain the name of the user who created each object or the name of the user who made the last change. If no field is selected, the data can still be edited, but this information will not be maintained.
Note: The projection system selected for the spatial data source must exactly match the spatial reference identifier (SRID, e.g. EPSG) of the elements of the table, for the elements to be displayed.