[mapserver-users] How to enter the projected coordinates in Postgis

Suman Chatterjee schatterjee at addisontx.gov
Fri Jul 31 13:43:53 EDT 2009


Hi Greg,
Thank You very much. I was just trying and found the fault.Actually the
longitude should come first and then the latitude. I was doing otherwise
and so the error.
Now the transform function is working.
Thanks
Suman 

-----Original Message-----
From: Gregor at HostGIS [mailto:gregor at hostgis.com] 
Sent: Friday, July 31, 2009 12:39 PM
To: Suman Chatterjee
Cc: Alexander Petkov; mapserver-users at lists.osgeo.org
Subject: Re: [mapserver-users] How to enter the projected coordinates in
Postgis

> Select ST_Transform(gpscoords,2276) from gpsdata;

> But it is throwing error :
> ERROR: transform: couldn't project point:-14 (latitude or longitude
> exceeded)SQL state:XX000

It means what it says: one of your points has a invalid ordinate, so it 
cannot be transformed.

Try this to debug it. Look through them manually and find the one that 
has the wrong latitude or longitude then correct or delete it.

SELECT astext(the_geom) from gpsdata;

You can also try these, to sort the list and perhaps make the bad 
coordinate show up at the start or end of the list:

SELECT astext(the_geom) from gpsdata order by x(the_geom);
SELECT astext(the_geom) from gpsdata order by x(the_geom) DESC;
SELECT astext(the_geom) from gpsdata order by y(the_geom);
SELECT astext(the_geom) from gpsdata order by y(the_geom) DESC;

-- 
HostGIS, Open Source solutions for the global GIS community
Greg Allensworth - SysAdmin, Programmer, GIS Person, Security
Network+   Server+   A+   Security+

*******************************************************************************************************************
This e-mail and any files or attachments transmitted with it contains Information that is confidential and privileged. This document may contain Protected Health Information (PHI) or other information that is intended only for the use of the individual(s) and entity(ies) to whom it is addressed. If you are the intended recipient, further disclosures are prohibited without proper authorization. If you are not the intended recipient, any disclosure, copying, printing, or use of this information is strictly prohibited and possibly a violation of federal or state law and regulations. If you have received this information in error, please delete it and notify Hamid Khaleghipour at 972-450-2868 immediately. Thank you.

*******************************************************************************************************************




More information about the mapserver-users mailing list