[postgis-devel] Not receiving SRID conflict error

David Haynes II dahaynes at umn.edu
Fri Jan 16 07:56:07 PST 2015


Hello,

I have a question about an error I am not receiving when I believe I should.

Below are three datasets that with their SRID
igbp_2012 (6842), us_dem_prj (3410), and us_states (4326).

When I run a query determining the SRID for these datasets in PostgreSQL
they confirm their SRIDs
select st_srid(r.rast), st_srid(p.geom) from dasymetric.us_dem_prj r,
dasymetric.us_states p limit 5

When I run the next query, I do not receive an error, but no records are
returned. The raster is in 3410 and the states geom column is in 4326
SELECT state_label, ST_Clip(r.rast,p.geom) as rast FROM
dasymetric.us_states p inner join dasymetric.us_dem_prj r on
ST_Intersects(p.geom, r.rast) WHERE p.state_label = 'Minnesota'

However, If I adjust the raster dataset to IGBP_2012, the error
ERROR: Raster and geometry do not have the same SRID, shows up.

Why am I not receiving a conflict projection error for a raster in 3410 and
a geometry in 4326? Any idea why that is occurring?

-- 
David Haynes, Ph.D.
Research Associate Terra Populus
Minnesota Population Center
www.terrapop.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-devel/attachments/20150116/1a91d22c/attachment.html>


More information about the postgis-devel mailing list