[mapserver-dev] OPENOPTION (was Re: Dropping support for GDAL < 2 ?)

Even Rouault even.rouault at spatialys.com
Fri Aug 23 06:55:08 PDT 2019


On vendredi 23 août 2019 13:30:56 CEST Lime, Steve D (MNIT) wrote:
> 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.

Yes, I agree that the mechanism could potentially be used for other connection 
types.

For completness, you'd probably also want a DATAOPTIONS to pass options 
specific to the DATA keyword. I've always found the syntax for PostGIS data to 
be a bit awkward.

So instead of

DATA "the_geom from (select * from polygon3d order by id) as foo using 
srid=27700 using unique id"

you could have

DATA "select * from polygon3d order by id"
DATAOPTIONS
	"geometry_column"	"the_geom"
	"srid"					"27700"
	"unique_column"		"id"
END

But this is just food for thought, and we probably don't want to break 
existing PostGIS DATA syntax.
My scope for now would be just CONNECTIONOPTIONS and implementation for GDAL 
and OGR connections.

> 
> 
> For 8.0 a broader conversion of the syntax for layer->processing and
> outputformat->formatoptions could be implemented. For the latter you'd get:
> 
> 
> OUTPUTFORMAT
>   NAME "kayml"
>   DRIVER "TEMPLATE"
>   MIMETYPE "application/vnd.google-earth.kml+xml"
>   OPTIONS
>     "FILE" "myTemplate.kml"
>     "ATTACHMENT" "queryResults.kml"
>   END
> END
> 
> 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.

Makes sense

Even

-- 
Spatialys - Geospatial professional services
http://www.spatialys.com


More information about the mapserver-dev mailing list