[postgis-devel] ST_distance_sphere changes in 2.0?

Paul Ramsey pramsey at opengeo.org
Wed Jul 20 14:02:45 PDT 2011


No, doesn't really make sense, since that code hasn't really be
touched much over this development cycle. Ticket it up with your SQL
example.

On Wed, Jul 20, 2011 at 1:54 PM, J Smith <dark.panda+lists at gmail.com> wrote:
> G'day list.
>
> I was just messing around with the latest PostGIS 2.0 trunk and was
> running a unit test suite I have and noticed that ST_distance_sphere
> is returning some strange results. Here's the query I was running:
>
> SELECT ST_distance_sphere('POLYGON((-5 -5,-5 5,5 5,5 -5,-5 -5))', 'POINT(1 1)');
>
> Which results in 444712.466496141 in the current trunk.
> postgis_full_version() says:
>
> POSTGIS="2.0.0SVN" GEOS="3.3.0-CAPI-1.7.0" PROJ="Rel. 4.7.1, 23
> September 2009" LIBXML="2.7.8" USE_STATS
>
> Whereas in PostGIS 1.5.3 I see a result of 0. postgis_full_version():
>
> POSTGIS="1.5.3" GEOS="3.3.0-CAPI-1.7.0" PROJ="Rel. 4.7.1, 23 September
> 2009" LIBXML="2.7.8" USE_STATS
>
> Both PostGIS installs are on the same PostgreSQL 9.0.4 server.
>
> Does this make sense? I would have assumed the result should be 0
> since the point lies within the polygon, but I thought I'd check here
> to be sure as I couldn't find a ticket concerning ST_distance_sphere
> or ST_distance_spheroid and I'm not sure what to expect.
>
> Cheers
> _______________________________________________
> postgis-devel mailing list
> postgis-devel at postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-devel
>



More information about the postgis-devel mailing list