[mapserver-dev] OPENOPTION (was Re: Dropping support for GDAL < 2 ?)
Lime, Steve D (MNIT)
steve.lime at state.mn.us
Fri Aug 23 06:30:56 PDT 2019
Would CONNECTIONOPTIONS be more generic? I could see that being useful for other drivers where key:value pairs are used as part of the configuration.
For 8.0 a broader conversion of the syntax for layer->processing and outputformat->formatoptions could be implemented. For the latter you'd get:
In this case you could ensure backwards compatibility by adding recognizing FORMATOPTION as a shortcut.
Perhaps a new PROCESSINGOPTIONS block should be added and PROCESSING is handled as a shortcut for backwards compatability.
From: mapserver-dev <mapserver-dev-bounces at lists.osgeo.org> on behalf of Even Rouault <even.rouault at spatialys.com>
Sent: Friday, August 23, 2019 7:01 AM
To: mapserver-dev at lists.osgeo.org <mapserver-dev at lists.osgeo.org>
Subject: [mapserver-dev] OPENOPTION (was Re: Dropping support for GDAL < 2 ?)
> A new Mapfile keyword will require changes for SWIG support I believe?
In my initial implementation, this adds a new member (a hashTableObj) in the
struct layerObj. I don't think this would require specific SWIG changes.
> My preference from a syntax point of view (although blissfully unaware of
> the implementation issues it will raise!) would be to turn PROCESSING into
> a block with the same syntax as METADATA e.g.
> "CONTOUR_INTERVAL" "5"
> "CLUSTER_GET_ALL_SHAPES" ON"
> "OPENOPTION_KEY1" "VALUE1"
> "OPENOPTION_KEY2" "VALUE2"
On the parser side there would be some complication to distinguish the old
PROCESSING "key=value" syntax with the new block approach. I'm not sure we
have a precedent of that.
And the processing member of layerObj is not exposed to SWIG currently. It
uses a char** processing + int numprocessing that are inconvenient to bind to
SWIG. They should likely be converted to a hashTableObj to be exposed to SWIG.
> SWIG could then use a dict type approach in the same way as METADATA to
> update and add, modify keys and values in the PROCESSING block.
If OPENOPTION uses a hashTableObj as METADATA does, then this would be similar
to interacting with metadata.
I'm also open to a block based approach for OPENOPTION if that seems better
Spatialys - Geospatial professional services
mapserver-dev mailing list
mapserver-dev at lists.osgeo.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the mapserver-dev