[Geoserver-devel] Loss of precision from Shapefile to WFS

While passing a "Touches" filter to GeoServer, a problem was discovered
in that no features were returned when they were expected to be. I have
traced the problem down to what seems to be a loss of precision in
Geometry points after GeoServer reads the features from a Shapefile, and
before it serves them up in a GetFeature request.

I set up a test case, in which I query the shapefile locally and the
GeoServer WFS remotely for the same feature. The results I get back are
different (all but first point snipped):

SHP ---------------------
MULTIPOLYGON (((1323358.027493386 664466.7209960241, ...
WFS ---------------------
MULTIPOLYGON (((1323358.02749339 664466.72099602, ...

The result of this loss of precision is that calling .touches on the
Geometry returned by the WFS passes, while the Geometry from shapefile
fails. This would explain why the "Touches" filter mentioned above
fails.

Progress of this problem is being tracked here:
http://jira.codehaus.org/browse/GEOS-666

I'm stopping for tonight, but I was wondering if anyone had any ideas on
this one.

Cheers,

Richard

Richard Gould wrote:

I'm stopping for tonight, but I was wondering if anyone had any ideas on
this one.
  

You can set the precision used it is one of the configuration options you can use when you set up GeoServer.
GML != binary, there will be loss of precision, I think the capabilities file may even tell you the precision used
so the client application can be aware and not make queries that are too fine grained for the service....
Jody

Thinking a bit harder now - we should change the JTS Percision model used during Filter evaluation to be congruent with the GML precision returned, otherwise operations like touch
will always be open for error.

Makes me appricate JTS, the trick will now be to use it.

Justin am I correct in assuming we have *no* hope of fixing this until the Factory injection issues we tackled on the FM branch
are sorted out on trunk? Aka we really need to define a geotools wide PercisionModel and ensure all GeometryFactory instances
make use of a precision model matching out output.

Jody

Richard Gould wrote:
  

I'm stopping for tonight, but I was wondering if anyone had any ideas on
this one.
  

You can set the precision used it is one of the configuration options you can use when you set up GeoServer.
GML != binary, there will be loss of precision, I think the capabilities file may even tell you the precision used
so the client application can be aware and not make queries that are too fine grained for the service....
Jody

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Geoserver-devel mailing list
Geoserver-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-devel
  

Jody Garnett wrote:

Thinking a bit harder now - we should change the JTS Percision model
used during Filter evaluation to be congruent with the GML precision
returned, otherwise operations like touch
will always be open for error.

Makes me appricate JTS, the trick will now be to use it.

Justin am I correct in assuming we have *no* hope of fixing this until
the Factory injection issues we tackled on the FM branch
are sorted out on trunk? Aka we really need to define a geotools wide
PercisionModel and ensure all GeometryFactory instances
make use of a precision model matching out output.

Not easily anyway, be quite a bit of work to change all the datastores
to use it.

Jody

Richard Gould wrote:
  

I'm stopping for tonight, but I was wondering if anyone had any ideas on
this one.
  

You can set the precision used it is one of the configuration options
you can use when you set up GeoServer.
GML != binary, there will be loss of precision, I think the capabilities
file may even tell you the precision used
so the client application can be aware and not make queries that are too
fine grained for the service....
Jody

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Geoserver-devel mailing list
Geoserver-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-devel
  
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Geoserver-devel mailing list
Geoserver-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-devel

!DSPAM:1004,44df0dd391922223018498!

--
Justin Deoliveira
The Open Planning Project
jdeolive@anonymised.com