Home > qgis > What causes these geometry differences between original PostGIS data and Geoserver WFS?

What causes these geometry differences between original PostGIS data and Geoserver WFS?

January 4Hits:1
Advertisement

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:

What causes these geometry differences between original PostGIS data and Geoserver WFS?

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:

<dataStore>   <id>DataStoreInfoImpl-xyz</id>   <name>General</name>   <type>PostGIS</type>   <enabled>true</enabled>   <workspace>     <id>WorkspaceInfoImpl--xyz</id>   </workspace>   <connectionParameters>     <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>   </connectionParameters>   <__default>false</__default> </dataStore> 

Here is the featuretype xml:

<featureType>   <id>FeatureTypeInfoImpl-xyz</id>   <name>layerName</name>   <nativeName>layerName</nativeName>   <namespace>     <id>NamespaceInfoImpl--xyz</id>   </namespace>   <title>layerName</title>   <keywords>     <string>features</string>     <string>layerName</string>   </keywords>   <nativeCRS>GEOGCS[&quot;WGS 84&quot;,
   DATUM[&quot;World Geodetic System 1984&quot;,
     SPHEROID[&quot;WGS 84&quot;, 6378137.0, 298.257223563, AUTHORITY[&quot;EPSG&quot;,&quot;7030&quot;]],
     AUTHORITY[&quot;EPSG&quot;,&quot;6326&quot;]],
   PRIMEM[&quot;Greenwich&quot;, 0.0, AUTHORITY[&quot;EPSG&quot;,&quot;8901&quot;]],
   UNIT[&quot;degree&quot;, 0.017453292519943295],
   AXIS[&quot;Geodetic longitude&quot;, EAST],
   AXIS[&quot;Geodetic latitude&quot;, NORTH],
   AUTHORITY[&quot;EPSG&quot;,&quot;4326&quot;]]</nativeCRS>   <srs>EPSG:4326</srs>   <nativeBoundingBox>     <minx>-123.393768310547</minx>     <maxx>-67.7812576293945</maxx>     <miny>25.7490768432617</miny>     <maxy>49.0023765563965</maxy>     <crs>EPSG:4326</crs>   </nativeBoundingBox>   <latLonBoundingBox>     <minx>-123.393768310547</minx>     <maxx>-67.7812576293945</maxx>     <miny>25.7490768432617</miny>     <maxy>49.0023765563965</maxy>     <crs>GEOGCS[&quot;WGS84(DD)&quot;,
   DATUM[&quot;WGS84&quot;,
     SPHEROID[&quot;WGS84&quot;, 6378137.0, 298.257223563]],
   PRIMEM[&quot;Greenwich&quot;, 0.0],
   UNIT[&quot;degree&quot;, 0.017453292519943295],
   AXIS[&quot;Geodetic longitude&quot;, EAST],
   AXIS[&quot;Geodetic latitude&quot;, NORTH]]</crs>   </latLonBoundingBox>   <projectionPolicy>FORCE_DECLARED</projectionPolicy>   <enabled>true</enabled>   <metadata>     <entry key="cachingEnabled">false</entry>   </metadata>   <store class="dataStore">     <id>DataStoreInfoImpl-xyz</id>   </store>   <maxFeatures>0</maxFeatures>   <numDecimals>0</numDecimals> </featureType> 

Answers

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?

What causes these geometry differences between original PostGIS data and Geoserver WFS?

Related Articles

  • What causes these geometry differences between original PostGIS data and Geoserver WFS?

    What causes these geometry differences between original PostGIS data and Geoserver WFS?January 4

    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 origi

  • How to set up wfs-t service in Geoserver using openlayers from postgis data?

    How to set up wfs-t service in Geoserver using openlayers from postgis data?May 13

    I published my postgis data layers into Geoserver. I have enabled wfs in the edit workspace > services. Still the "layer preview" does not show any options under wfs. See the image. How can we set up a wfst service using postgis data in Geose

  • arcpy geometry difference method fails randomly, not reproducibleOctober 15

    Has anyone used the arcpy geometry difference operator and seen unexplained errors like what I describe below? This is a weird one. I have a script that calculates wave fetch distance in the ocean using a polygon file with land features (coastal area

  • How to get GeoNetwork to search through PostGIS fields via GeoServer WMS

    How to get GeoNetwork to search through PostGIS fields via GeoServer WMSFebruary 25

    I can't seem to get GeoNetwork to search through my PostGIS fields via GeoServer WMS. According to the GeoNetwork Documentation: it should loop over datasets served by the service and produce also metadata for each datasets I have a simple test table

  • GeoServer create layer from PostGIS (data type point)

    GeoServer create layer from PostGIS (data type point)March 20

    (Several days ago a user on gis stackexchange suggest that I should use OpenGeo (I was using geojson before). I succeed at what I was doing at that time, but now I have a different problem.) I was using MySQL, but for easier work with GeoServer I dec

  • Querying Postgis data in R using dplyr packageJanuary 23

    Does anyone have a workflow for querying postgis data in R using the dplyr package? R doesn't like the spatial columns in postgis data so can't read them in like a postgres table. I get the error message: Warning message: In postgresqlExecStatement(c

  • Difference between TDE/VPD/Data Masking/OLS - OralceOctober 28

    I've come across many kinds of data masking techniques used in Oracle database.. some are licensed some are included in enterprise edition itself.. leaving the licenses thing behind as it is restricted to ask about it here.. I would like to know what

  • Original creation date of word documentAugust 31

    I have a word document created in, say, July 10 2010. When i upload it to sharepoint (say August 5, 2010) its creation date vaalue in sharepoint will be in Aug 5, 2010, and i can't find any trace of the original date (July 10). Is there a way to keep

  • Copying files across hard discs while keeping the original file date?December 30

    I copy a lot of files (entire folder hierarchies) from one hard disk to another, or from one SD card to another. The copied files all get the same date (the date when I copied). The original date of the file is lost. How can I prevent that? I.e. how

  • display multiple vector layers from single PostGis table in GeoServer using OpenLayers - REWORDEDMarch 23

    Prompting suggestions I'm going to attempt to reword my question I have a PostGis table that contains overlapping vector polygons. I need to display a selection in Geoserver and provide functionality for the user to toggle on & off unwanted polygons.

  • Moving existing hard drive with PostGIS data directory to a new computerJune 13

    I have a new computer that is replacing an old machine that has PostGIS installed. The old computer has a 2nd hard drive where the PostGIS data directory is stored. I want to move this drive over to the new computer and continue to use it for data st

  • Publish PostGIS raster to geoserverJune 28

    I have a database of raster and vector and I want to use them in my webmapping. There is not a problem to publish the vector using geoserver but I can't publish my raster. Is there possibility to publish postgis raster to geoserver? --------------Sol

  • How to use the original sender date instead of the fetch date in OTRSJuly 17

    When OTRS fetches emails from an IMAP account it forgets the original send date and replaces this with the fetch (!) date. Normally this is not a problem, but when you're importing an existing IMAP folder with many emails into OTRS all dates are set

  • How can I properly add PostGIS data into MapGuide Maestro?July 28

    I am having trouble connecting a PostGIS database to MapGuide Maestro. Actually, I have added the PostGIS data into Maestro, but when I click to validate the layer it shows an error message: Validating resource: Session:9754d026-d86b-11e1-8000-00270e

  • How to publish PostGIS Rasters in Geoserver?October 24

    What is the best solution to publish postgis rasters using Geoserver? I have spent a lot of time trying to create a Raster datasource using Image Mosaic JDBC but with no luck. Steps performed: 1. Downloaded and Installed the JDBC Image Mosaic extensi

  • What are the differences between algorithms using data structures and algorithms using databases?January 3

    The General Question What are the differences between algorithms using data structures and algorithms using databases? Some Context This is a question that has been bugging me for some time, and I have not been able to come up with a convincing answe

  • PostGIS data visualizationJanuary 5

    I have dump my data in PostGIS from shapefile successfully. I made a postgres connection through PHP and that also returning the data of other field. But the main problem is GEOM field visualization. I want to visualize GEOM field (Polygon and Polyli

  • difference between voice and data services?January 19

    What is the difference between the voice and date services. I have read that for voice services T1/E1 frame is used and for data services a frame with a standard header and payload nd tail is used defined by a protocol. Moreover voice services use ci

  • OpenGeo Suite PostGIS Data LocationFebruary 18

    I have OpenGeo Suite installed on a server. I want to have the PostGIS data stored on a different drive (D) on the server instead of on the C drive under my username. How do I do this? --------------Solutions------------- What you want is a new table

  • How to connect OpenLayers to PostGIS data?February 25

    I have read in OpenLayers how to load KML, GeoJSON etc. vector files in OpenLayers. But how can I connect to PostGIS data. If not, why should I upload my data to PostGIS then instead of directly putting my data using WebServices. Am I missing anythin

Copyright (C) 2017 ceus-now.com, All Rights Reserved. webmaster#ceus-now.com 14 q. 0.594 s.