[postgis-users] Distance query

Pedro Doria Meunier pdoria at netmadeira.com
Wed Feb 7 08:29:54 PST 2007


OMG...

Thank you very very much Michael!
You actually helped uncovering a very NASTY error in the socket server
receiving the location of the units!
I can't believe I let this past my eyes, let alone LOOKING at the cause and
not seeing it...

The units spit their data in ddmm.mmmm and the data (without being converted
to dd.dddd!) is being put in the tables LAT/LON not lon/lat ....

Also a big thank you to Regina Obe for her ever useful advices, too.

Proceeding to bug squishing... :]

Best regards,
Pedro Doria Meunier

-----Original Message-----
From: postgis-users-bounces at postgis.refractions.net
[mailto:postgis-users-bounces at postgis.refractions.net] On Behalf Of Michael
Fuhr
Sent: quarta-feira, 7 de Fevereiro de 2007 16:08
To: PostGIS Users Discussion
Subject: Re: [postgis-users] Distance query

On Wed, Feb 07, 2007 at 03:46:13PM -0000, Pedro Doria Meunier wrote:
> In the table definition for units:
> CONSTRAINT enforce_srid CHECK (srid(curr_location) = 4326)
> In the table definition for toponimia:
> CONSTRAINT enforce_srid_geometry CHECK (srid(geometry) = 4326)
> 
> As you can see their srid=4326

The geometries are *defined* to be 4326 but the coordinates are
meaningless in that SRID:

> Unit 80000135 curr_location = "POINT(3239.3462 -1650.4789)"
> Unit 11111111 curr_location = "POINT(3238.82678 -1654.51)"
> Unit 99999999 curr_location = "POINT(3241.00088 -1647.84688)"

If these coordinates are 4326 then the first has a longitude of
3239.3462 degrees and a latitude of -1650.4789 degrees.  Where is
that?  Apparently these coordinates are really in some other SRID
and they're mis-labeled as being 4326, or perhaps they have some
other meaning altogether.  What's the source of these coordinates?

-- 
Michael Fuhr
_______________________________________________
postgis-users mailing list
postgis-users at postgis.refractions.net
http://postgis.refractions.net/mailman/listinfo/postgis-users





More information about the postgis-users mailing list