Why does GeoServer (v2.5.1) WFS layer (see red line/layer below) not overlay features of source PostGIS table or related WMS layer in QGIS (tested in v2.6 and 2.12)? All layers are defined in the same GCS (EPSG: 4326) (interstate Tiger shp data originally obtained from US Census site), see image below:

enter image description here

I've un-checked the QGIS option/setting "Enable feature simplification....". I'm guessing this may be a server side configuration for WFS/GML, or I fear a limitation with GCS served data as WFS.

Here is the store xml:

    <entry key="port">thePort</entry>
    <entry key="Connection timeout">20</entry>
    <entry key="passwd">xyz</entry>
    <entry key="dbtype">postgis</entry>
    <entry key="encode functions">false</entry>
    <entry key="namespace">theName</entry>
    <entry key="schema">public</entry>
    <entry key="create database">false</entry>
    <entry key="fetch size">10000</entry>
    <entry key="preparedStatements">false</entry>
    <entry key="min connections">1</entry>
    <entry key="host">localhost</entry>
    <entry key="validate connections">true</entry>
    <entry key="max connections">20</entry>
    <entry key="Support on the fly geometry simplification">false</entry>
    <entry key="database">theDB</entry>
    <entry key="Loose bbox">true</entry>
    <entry key="Expose primary keys">false</entry>
    <entry key="Max open prepared statements">50</entry>
    <entry key="Estimated extends">true</entry>
    <entry key="user">theUser</entry>

Here is the featuretype xml:

  <nativeCRS>GEOGCS[&quot;WGS 84&quot;, &#xd;
  DATUM[&quot;World Geodetic System 1984&quot;, &#xd;
    SPHEROID[&quot;WGS 84&quot;, 6378137.0, 298.257223563, AUTHORITY[&quot;EPSG&quot;,&quot;7030&quot;]], &#xd;
    AUTHORITY[&quot;EPSG&quot;,&quot;6326&quot;]], &#xd;
  PRIMEM[&quot;Greenwich&quot;, 0.0, AUTHORITY[&quot;EPSG&quot;,&quot;8901&quot;]], &#xd;
  UNIT[&quot;degree&quot;, 0.017453292519943295], &#xd;
  AXIS[&quot;Geodetic longitude&quot;, EAST], &#xd;
  AXIS[&quot;Geodetic latitude&quot;, NORTH], &#xd;
    <crs>GEOGCS[&quot;WGS84(DD)&quot;, &#xd;
  DATUM[&quot;WGS84&quot;, &#xd;
    SPHEROID[&quot;WGS84&quot;, 6378137.0, 298.257223563]], &#xd;
  PRIMEM[&quot;Greenwich&quot;, 0.0], &#xd;
  UNIT[&quot;degree&quot;, 0.017453292519943295], &#xd;
  AXIS[&quot;Geodetic longitude&quot;, EAST], &#xd;
  AXIS[&quot;Geodetic latitude&quot;, NORTH]]</crs>
    <entry key="cachingEnabled">false</entry>
  <store class="dataStore">
  • Can you be more precise about the layers? Are the WMS layer and WFS layer just pointing to different services of the same GeoServer layer? Can you show the GeoServer data store and layer configuration (just from the XML is probably easier)?
    – BradHards
    Commented Jan 4, 2016 at 20:15
  • The store and layer source are the same for both WMS and WFS layer examples. I've compared WMS and WFS from source PostGIS in PCS and it overlays correctly. I suspect an issue with GCS data being served out as WFS that the geometry gets messy.
    – artwork21
    Commented Jan 4, 2016 at 20:23
  • Can you please show the configuration and some sample data?
    – BradHards
    Commented Jan 4, 2016 at 20:26
  • 1
    Indeed, what is the metric difference between the two lines? Meters? Millimeters? And what is the CRS of the data itself? Commented Jan 5, 2016 at 7:23
  • 1
    Since the WMS and WFS are coming from the same server, it's unlikely the SQL being generated for PostGIS differs, but using log_statement in PgSQL to example the SQL is always a good idea. My guess is that the GML writer is truncating some precision from the coordinates. Examine the GML being generated, does it stop at 4 or 5 digits, or go deeper? Commented Jan 5, 2016 at 14:46

2 Answers 2


The output would seem consistent with a decimal truncation, which is performed by GeoServer WFS 1.0 as configured in the global panel. Normally the value would be 8 decimals, but your precision issues seem to suggest a setting like 5 decimals instead (making the rough assumption of 100km per decimal degree, in practice that changes a lot depending on the latitude, see https://en.wikipedia.org/wiki/Latitude#Length_of_a_degree_of_latitude )


It's defintely related to the resolution somehow. I wouldn't know if the lower resolution is enforced by GeoServer or QGIS as I don't know these tools.

Take a look at the image below where I have added a sort of grid line layer on top of the map. Can you see how the distance between the black lines is similar horisontal and vertical?

I have only added lines where there seemed to be a node in the red line layer so in some areas the distance is doubled between the grids lines.

So the question is now where can you specify a lower resolution (precision truncation) or simplification of your data that would return a result like this?

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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