[postgis-users] Longitude and latitude ranges

Ben Madin lists at remoteinformation.com.au
Mon Aug 29 17:33:03 PDT 2011


Jaime,

On 23/08/2011, at 7:22 AM, Jaime Casanova wrote:

> after some tries, i haven't managed to make this query use the GiST
> index that was created on columns transmitter_mv.punto nor
> rowlatlong.punto and it finishes using a seq scan on table
> transmitter_mv for every row in rowfreqlevel that satisfies the join
> and where conditions.
> 
> Stephen Woodbridge, made me notice in
> http://postgis.refractions.net/pipermail/postgis-users/2011-August/030575.html
> that in the plan the POINT is being casted to geography so i decided
> to bite the bullet and use geography columns intead but when i tried
> to create the points from long/lat pairs i got this error (which i
> didn't get when the column was geometry)
> """
> db=# update transmitter_mv set punto = st_makepoint(tx_long, tx_lat);
> ERROR:  Coordinate values are out of range [-180 -90, 180 90] for GEOGRAPHY type
> """
> 
> any ideas why this is happening?

It may help... it may of course not ... to set the SRID of the Geometry when you make the point, vis

> db=# update transmitter_mv set punto = st_setSRID(st_makepoint(tx_long, tx_lat), mysrid);

where mysrid matches the projection you selected for the column punto ?4326?

It would really help you if you are getting few responses to put a short repeatable example of your process and a subset of data that causes the problem. You can probably put few enough points to make it unidentifiable, or even shift them (as long as you are still getting the problem) if you are worried about privacy issues.

cheers

Ben




More information about the postgis-users mailing list