No, the rasters in the srtm3 table are in SRID 4326. I want to retrieve the altitude value in SRID 4978.
> 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: [email protected] >> [mailto:postgis-users- >> [email protected]] 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 >> [email protected] >> http://postgis.refractions.net/mailman/listinfo/postgis-users > _______________________________________________ > postgis-users mailing list > [email protected] > http://postgis.refractions.net/mailman/listinfo/postgis-users > _______________________________________________ postgis-users mailing list [email protected] http://postgis.refractions.net/mailman/listinfo/postgis-users
