[mapserver-dev] Corrupt attributes when trying to expose features through WFS

Brecht Van Maldergem brecht.van.maldergem at be-mobile.com
Fri Mar 2 06:51:14 PST 2018


Hi;

We're using for quite some time MapServer already and are very pleased with it.
Recently though, we noticed a strange behavior.
We're trying to load a ShapeFile, and expose it through a WFS, we get -on specific locations- a very strange output:
Attribute-values get shifted into other fields (eg text-values appear partially in number-fields) when fetching the output (as geojson in this case).
When loading the original .shp file directly into QGIS, all is fine.
When using the OGR ConnectionType, all is fine too.
So the problem only occurs with the mapserver-build-in shape-reader.

Someone who has a clue here?
We assume it could be related to the number of features; 16'948'045 features
Total FileSize is around 2.5GB

Thanks in advance!


This configuration for the WFS does not work;
LAYER
    NAME "segments"
    TYPE LINE
    DATA  "segments"
    METADATA
      "wfs_title"         "segments"
      "gml_include_items" "all"
      "gml_featureid"     "segmentID"
    END # METADATA
END # LAYER

This one does work though, but is too slow (response times around 1 second instead of 150ms)
LAYER
    NAME "segments"
    TYPE LINE
    CONNECTIONTYPE OGR
    CONNECTION "C:/ms4w/Apache/htdocs/Be-Mobile/flowCheckIssue/input/original/segments.shp"
      "wfs_title"         "segments"
      "gml_include_items" "all"
      "gml_featureid"     "segmentID"
    END # METADATA
END # LAYER

The shapefile itself contains a lot of features though: 16'948'045 features

ogrinfo ./segments.shp -al -so
INFO: Open of `./segments.shp'
      using driver `ESRI Shapefile' successful.

Layer name: segments
Geometry: Line String
Feature Count: 16948045
Extent: (2.432331, 49.369946) - (7.280179, 53.505310)
Layer SRS WKT:
GEOGCS["WGS 84",
    DATUM["WGS_1984",
        SPHEROID["WGS 84",6378137,298.257223563,
            AUTHORITY["EPSG","7030"]],
        AUTHORITY["EPSG","6326"]],
    PRIMEM["Greenwich",0,
        AUTHORITY["EPSG","8901"]],
    UNIT["degree",0.0174532925199433,
        AUTHORITY["EPSG","9122"]],
    AUTHORITY["EPSG","4326"]]

Setup:
> ogr2ogr --version
GDAL 1.11.3, released 2015/09/16

> ./mapserv -v
MapServer version 7.0.7 (MS4W 3.2.4) OUTPUT=PNG OUTPUT=JPEG OUTPUT=KML SUPPORTS=PROJ SUPPORTS=AGG SUPPORTS=FREETYPE SUPPORTS=CAIRO SUPPORTS=SVG_SYMBOLS SUPPORTS=SVGCAIRO SUPPORTS=ICONV SUPPORTS=FRIBIDI SUPPORTS=WMS_SERVER SUPPORTS=WMS_CLIENT SUPPORTS=WFS_SERVER SUPPORTS=WFS_CLIENT SUPPORTS=WCS_SERVER SUPPORTS=SOS_SERVER SUPPORTS=FASTCGI SUPPORTS=THREADS SUPPORTS=GEOS SUPPORTS=POINT_Z_M INPUT=JPEG INPUT=POSTGIS INPUT=OGR INPUT=GDAL INPUT=SHAPEFILE

Best Regards,
Brecht Van Maldergem


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-dev/attachments/20180302/e2dc88c2/attachment.html>


More information about the mapserver-dev mailing list