I'm calling my geoserver with WMS and later WFS to retrieve vector data (both times EPSG 4342. All features are correctly rendered in WMS and QGIS, so I'm sure the original data is fine. The original data is in a different projection.

When using WFS Points and Polygons are fine however the in the coordinates of Lines (in this case MultiLineStrings) some coordinates are wrong (no matter what target SRS I use) as follows.

For some reason every correct coordinate (5,52) is followed by three wrong pairs one with 3 coordinates. What am I doing wrong?















I call my server as follows https://server.example.com/geoserver/workspace/ows?service=WFS&version=1.0.0&request=GetFeature&typeName=layer&maxFeatures=1&outputFormat=application%2Fjson&srsname=EPSG:4324

Is it possible that something in the data is wrong or my settings in GeoServer?

I have tried re-importing the data into the data base without success.

  • Do you have your data in PostGIS? The corresponding row from geometry_columns would be useful but it would be best if you could make a small data sample as shapefile and detailed instructions about how to import data into database for repeating the error. Which GeoServer version do you use? Is the result the same with GML output? – user30184 Oct 19 '15 at 6:53
  • Can you say where you think the data is meant to be? Are you really asking for srsname=EPSG:4324 or srsname=EPSG:4342? – BradHards Oct 19 '15 at 8:25
  • do you get the same with GML output? – Ian Turton Oct 19 '15 at 8:38

To answer my own question and hopefully help others.

The issue was that the source data contained 3d dimensions although it is a 2dimensional geometry. At this point in time I'm not sure why this is the case.

This older link


suggests that it might have to do with how it was exported from an ESRI environment.

Consequently the geometry type is MULTILINESTRINGM and it turns out that the WFS component of geoserver can't handle that properly although WMS works fine.

The solution was to convert the data in Postgis to 2d using

Alter table my_geotable 
    Alter Column geom TYPE geometry(MULTILINESTRING,*mySRID*)
        USING st_Force2d(geom)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.