[mapserver-dev] For Consideration: Direct OGR output via WFS

Steve Lime sdlime at gmail.com
Tue Jul 7 06:57:57 PDT 2020


Hi Seth: It’s an interesting idea. In theory one could do the same thing
with PostGIS since if can natively export some formats. I suppose we should
sketch out the existing processing chain to see if there’s a logical place
to change behavior. Acting directly on a result set (which is just a
collection of feature ids) would be one way I suppose. —Steve

On Saturday, July 4, 2020, Seth G <sethg at geographika.co.uk> wrote:

> Hi devs,
>
> I've been using MapServer more and more as an export service, providing
> links to dump out data to a Shapefile (or TAB, Spatialite, etc.) using the
> WFS protocol with a OUTPUTFORMAT. Creating a MapServer LAYER for this
> purpose, and configuring an OUTPUTFORMAT provides the functionality of
> ogr2ogr but via a web-enabled interface directly with MapServer.
>
> However MapServer loads the data into shapeObjs via the WFS interface and
> then exports it back out, which seems to cause a big performance hit. The
> equivalent ogr2ogr export operations can be up to 5-6x faster.
>
> Are there any insurmountable technical reasons why a layer could not be
> outputted directly using OGR?
>
> A MapServer LAYER can have lots of additional configuration - FILTERs,
> native filters, fields limited via METADATA etc. which would likely have to
> be ignored, or translated into OGR parameters. The following criteria would
> probably have to apply as a a minimum:
>
> 1. Only applicable to layers with CONNECTIONTYPE OGR [1]
> 2. Only valid for OGR OUTPUTFORMATs [2]
>
> If these are met, perhaps a PROCESSING directive could be added to a layer
> to enable direct OGR output, something like: "PROCESSING" "OGR_BYPASS=ON"
> or "OGR_DIRECT_EXPORT=ON".
>
> At the moment this is just an idea, but I may try and prototype something
> in Python and get some performance benchmarks.
>
> Seth
>
> [1] https://mapserver.org/input/vector/ogr.html
> [2] https://mapserver.org/output/ogr_output.html#outputformat-declarations
>
> --
> web:http://geographika.co.uk
> twitter: @geographika
> _______________________________________________
> mapserver-dev mailing list
> mapserver-dev at lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/mapserver-dev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-dev/attachments/20200707/397b75b1/attachment.html>


More information about the mapserver-dev mailing list