The libraries are not that different, GEOS is a port of JTS after all.
You may wish to ask on the JTS mailing list for details on how buffer and
centroid can be used.
Jody Garnett
On Tue, Mar 4, 2014 at 8:03 AM, Stefano Iacovella <
[email protected]> wrote:
> 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
>
>
> http://www.linkedin.com/in/stefanoiacovella
>
> http://twitter.com/#!/Iacovellas
>
>
> ------------------------------------------------------------------------------
> Subversion Kills Productivity. Get off Subversion & Make the Move to
> Perforce.
> With Perforce, you get hassle-free workflows. Merge that actually works.
> Faster operations. Version large binaries. Built-in WAN optimization and
> the
> freedom to use Git, Perforce or both. Make the move to Perforce.
>
> http://pubads.g.doubleclick.net/gampad/clk?id=122218951&iu=/4140/ostg.clktrk
> _______________________________________________
> Geoserver-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/geoserver-users
>
>
------------------------------------------------------------------------------
Subversion Kills Productivity. Get off Subversion & Make the Move to Perforce.
With Perforce, you get hassle-free workflows. Merge that actually works.
Faster operations. Version large binaries. Built-in WAN optimization and the
freedom to use Git, Perforce or both. Make the move to Perforce.
http://pubads.g.doubleclick.net/gampad/clk?id=122218951&iu=/4140/ostg.clktrk
_______________________________________________
Geoserver-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geoserver-users