[postgis-users] Re: How does PostGIS treat "garbage" lat/long coords?

Barend Kobben kobben at itc.nl
Mon Apr 21 23:24:33 PDT 2008


> BTW, where is POINT(140.6365441 -304.409527)?
Since the lat-lon system is  basically angles from the center of your datum,
I'd guess 140.6365441 -304.409527 = (140.6365441-90 ) (-304.409527+180) =
50.6365441-90 124.409527 which is near Harbin in China ;-))

-- 
Barend Köbben
International Institute for Geo-Information
Sciences and Earth Observation (ITC)
PO Box 6
7500AA Enschede, The Netherlands
+31 (0)53 4874253



On 22-04-08 02:41, "Stephen Davies" <sdc at sdc.com.au> wrote:

> Thanks guys. I shall go with the constraint idea using Paul's syntax.
> 
> BTW, where is POINT(140.6365441 -304.409527)?
> 
> Cheers,
> Stephen
> 
>> Stephen,
>> 
>> To add to what Paul said, you can also put a constraint on your table with
>> the check to make sure no values outside of the correct range make it into
>> the table in the first place.
>> 
>> David
>> 
>> On Sun, Apr 20, 2008 at 5:20 PM, Paul Ramsey <pramsey at cleverelephant.ca>
>> wrote:
>> 
>>> This?
>>> 
>>> select id from thetable where st_xmax(the_geom) > 180 or
>>> st_xmin(the_geom) < -180 or st_ymax > 90 or st_ymin < -90;
>>> 
>>> P
>>> 
>>> On Sun, Apr 20, 2008 at 12:44 AM, Stephen Davies <sdc at sdc.com.au> wrote:
>>>> One of my users has been entering garbage lat/long coordinates for
>>> geometries
>>>>  (SRID 4283). eg POINT(140.6365441 -304.409527) instead of
>>>>  POINT(140.6365441 -34.409527)
>>>> 
>>>>  PostGIS does not object to this but I cannot see what the value is
>>> interpreted
>>>>  to mean.
>>>>  Is there a simple way to test for such entries?
>>>> 
>>>>  Cheers and thanks,
>>>>  Stephen Davies


International Institute for Geo-Information Science and Earth Observation (ITC)
Chamber of Commerce: 410 27 560

E-mail disclaimer
The information in this e-mail, including any attachments, is intended for the addressee only. If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution or action in relation to the content of this information is strictly prohibited. If you have received this e-mail by mistake, please delete the message and any attachment and inform the sender by return e-mail. ITC accepts no liability for any error or omission in the message content or for damage of any kind that may arise as a result of e-mail transmission.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Picture 1.png.zip
Type: application/octet-stream
Size: 58098 bytes
Desc: not available
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20080422/7f8e380c/attachment.obj>


More information about the postgis-users mailing list