[postgis-users] Inserting New SRID into spatial_ref_sys Table

Pierre Racine Pierre.Racine at sbf.ulaval.ca
Mon Oct 24 12:00:45 PDT 2011


Just to double check:

-rasters in the srtm3 table are also in the SRID 4978?

-What if you do:

SELECT ST_X(ST_Transform(ST_SetSRID(ST_Point(126.5,37.5), 4326), 4978))), ST_Y(ST_Transform(ST_SetSRID(ST_Point(126.5,37.5), 4326), 4978)))

-It might also be that the point actually does not intersects with the image. What if you add 

WHERE ST_Intersects(rast, ST_Transform(ST_SetSRID(ST_Point(126.5,37.5), 4326), 4978)))

To your query?

Pierre

> -----Original Message-----
> From: postgis-users-bounces at postgis.refractions.net [mailto:postgis-users-
> bounces at postgis.refractions.net] On Behalf Of elliott
> Sent: Monday, October 24, 2011 1:11 PM
> To: PostGIS Users Discussion
> Subject: [postgis-users] Inserting New SRID into spatial_ref_sys Table
> 
> I have inserted a new SRID (4978) into the spatial_ref_sys table.
> However, when I run the following query, it gives an out of range error.  What I
> want to do is get the altitude in ECEF coordinates, but perhaps my query is not
> correct.
> 
> select ST_Value(rast, ST_Transform(ST_SetSRID(ST_Point(126.5,37.5),
> 4326), 4978)) from srtm3 where filename='N37E126.hgt';
> 
> ERROR:  value "-3616486790" is out of range for type integer
> CONTEXT:  PL/pgSQL function "st_world2rastercoordx" while casting return
> value to function's return type
>          PL/pgSQL function "st_value" line 13 at RETURN
> 
> _______________________________________________
> 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