Dear all,
I was doing some tests with WPS and I am wondering if there is a rounding error in processes or maybe I am doing something totally wrong.
I took a very simple geometry like this one POINT(12 42)
Then apply a JTS:Buffer with several distance ranging from 1 to 0.000000001
Then I took the resulting geometry, a polygon of course, and used JTS:Centroid on it. It never returned POINT(12 42), I always got a decimal number that was very near to it.
I tried the same process on PostGIS, running
SELECT ST_ASTEXT(ST_BUFFER(ST_GEOMFROMTEXT(‘POINT(12 42)’),distance));
Saved the output to a text file and used it with this other statement:
SELECT ST_ASTEXT(ST_CENTROID(ST_GEOMFROMTEXT(‘POLYGON((…))’)));
Of course with distance ranging in the same interval.
It always returned POINT(12 42)
I know that libraries on the background are totally different, GeoServer is built on GeoTools while PostGIS is built on Geos, but again I wonder why such difference.
Is this the expected behaviour?
Thanks for your attention and patience
Stefano
41.95581N 12.52854E