-
Notifications
You must be signed in to change notification settings - Fork 1
GSIP 177
Fernando Mino
This proposal is for GeoServer 2.17-RC and 2.16.1.
- Under Discussion
- In Progress
- Completed
- Rejected
- Deferred
Geoserver already supports custom dimensions for raster data and elevation/time dimensions for vector data. Now our goal is to achieve custom dimensions support for vector data in a configurable fashion.
Currently custom dimensions are supported only for raster data, under the following restrictions:
- The raster data source must configure and advertise the custom dimension (it cannot be created from the UI, can only be enabled)
- The dimension data type is unknown, and the only presentation style available is “list”
As an example, here is the “indexer.properties” file of an image mosaic declaring the presence of three custom dimensions, and how to collect their values via property collectors:
TimeAttribute=time;endtime
ElevationAttribute=lowz;highz
AdditionalDomainAttributes=date,wavelength(loww;highw),custom(lowc,highc)
Schema= the_geom:Polygon,location:String,time:java.util.Date,endtime:java.util.Date,date:String,lowz:Integer,highz:Integer,loww:Integer,highw:Integer,lowc:Integer,highc:Integer
PropertyCollectors=TimestampFileNameExtractorSPI[timeregex](time),TimestampFileNameExtractorSPI[timeregexend](endtime),StringFileNameExtractorSPI[dateregex](date),IntegerFileNameExtractorSPI[elevationregex](lowz),IntegerFileNameExtractorSPI[elevationregexhigh](highz),StringFileNameExtractorSPI[wavelengthregex](loww),StringFileNameExtractorSPI[wavelengthregexhigh](highw),StringFileNameExtractorSPI[customregex](lowc),StringFileNameExtractorSPI[customregexhigh](highc)
The GUI in GeoServer will then expose the dimensions, allowing to enable/expose them, and to configure some publication details such as units and default value (while the presentation drop down is not enabled), as shown below in Figure 1.
Figure 1: Custom Dimension on Raster |
By contrast, vector support for dimensions only provides support for time and elevation dimensions, but allows to configure the attributes to be used and the presentation, as shown below in Figure 2.
Figure 2: Dimensions on vector |
We are proposing the ability to add a custom dimension by name, and then be able to configure it like the existing vector dimensions. Just as they can be added, custom dimensions can be removed, the workflow would be pretty similar to the existing tile caching parameter filter.
A mockup of the UI follows in Figure 3:
Figure 3: Custom Dimension support on vector |
For example, creating an integer custom dimension with name population
, Geoserver WMS can be requested like:
http://localhost:8080/geoserver/wms?service=WMS&version=1.1.1&request=GetMap&bbox=-180,-90,180,90&styles=&Format=image/png&width=80&height=40&srs=EPSG:4326&layers=st:states&time=2012-10-13T00:00:00.000Z&elevation=1233.47&dim_population=100
Separating the dimensions parameters:
&time=2012-10-13T00:00:00.000Z&elevation=1233.47&dim_population=100
Custom dimension in use:
&dim_population=100
The configuration would be stored using the same data structures already available, allowing configuring via REST API too.
The UI needs to be able to locate the configured dimensions by prefix and data type in the resource MetadaMap, past that it’s usual business. Adding and removing elements can be looked up in the tile configuration parameter filters, the setup would be similar (but does not have to be exactly the same, we should try to keep the dimension editor UI consistent).
The request filtering requires to change the GetMapKvpRequestReader to locate the “DIM_” parameters, find the eventual associated dimension, and then to parse the values (might be times, numbers, or strings, could use custom parsers/validators and cover other data types using Converters). Then locate the attribute and build the filters as needed, which will be then added in the request and used in GetMap to build the layer definition filter.
We will support range parameters range parameters for number and dates types, and unique value for strings and boolean dimension types.
The capabilities document generators for WMS 1.1 and WMS 1.3 will be amended to show custom vector dimensions.
Geoserver documentation will be updated to cover the new functionality.
Project Steering Committee:
- Alessio Fabiani: +1
- Andrea Aime: +1
- Brad Hards:
- Ian Turton: +1
- Jody Garnett: +1
- Jukka Rahkonen:
- Kevin Smith:
- Simone Giannecchini: +1
©2020 Open Source Geospatial Foundation