We're updating the issue view to help you get more done. 

SQLServer: use the STGeometryType function to determine the OGC type name

Description

To retrieve feature type info, one of the executed queries calls sp_columns_100. This means that for the column containing geometry data, it will receive geometry.

It would be an improvement to call the STGeometryType function on the column, to determine a more specific type like Point or Polygon.

This in turn would allow GeoServer to automatically apply a proper SLD instead of falling back on a default SLD.

Example of a feature type loaded via an SQL Server datastore:

Example of the same feature type loaded via a shapefile datastore:

As you can see, the shapefile datastore correctly determines the MultiPolygon type, while the SQL Server datastore simply uses Geometry.

Environment

GeoServer 2.11.1
Windows 10
SQL Server 2016

Status

Assignee

Unassigned

Reporter

Stijn Herreman

Triage

None

Components

Affects versions

17.1

Priority

Medium