<div dir="ltr">Do you have a spatial index on<span style="font-size:13px"> IGBP_2012?</span><div><span style="font-size:13px"><br></span></div><div><span style="font-size:13px">The only thing I can think of is that </span><span style="font-size:13px">dasymetric.us_dem_prj has a spatial index and since ST_Intersects() uses the spatial index first, there is no rows to consider in ST_Intersects and ST_Clip.</span></div><div><span style="font-size:13px"><br></span></div><div><span style="font-size:13px">-bborie</span></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Jan 16, 2015 at 7:56 AM, David Haynes II <span dir="ltr"><<a href="mailto:dahaynes@umn.edu" target="_blank">dahaynes@umn.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hello, <div><br></div><div>I have a question about an error I am not receiving when I believe I should.</div><div><br></div><div>Below are three datasets that with their SRID</div><div><div style="font-size:13px">igbp_2012 (6842), us_dem_prj (3410), and us_states (4326).</div><div style="font-size:13px"><br></div><div style="font-size:13px">When I run a query determining the SRID for these datasets in PostgreSQL they confirm their SRIDs</div><div style="font-size:13px">select st_srid(r.rast), st_srid(p.geom) from dasymetric.us_dem_prj r, dasymetric.us_states p limit 5<br></div><div style="font-size:13px"><br></div><div style="font-size:13px">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</div><div style="font-size:13px"><div>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'</div></div><div style="font-size:13px"><br></div><div style="font-size:13px">However, If I adjust the raster dataset to IGBP_2012, the error</div><div style="font-size:13px"><div>ERROR: Raster and geometry do not have the same SRID, shows up.</div><div><br></div><div>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?</div></div><span class="HOEnZb"><font color="#888888"><div><br></div>-- <br><div><div dir="ltr">David Haynes, Ph.D.<div>Research Associate Terra Populus</div><div>Minnesota Population Center</div><div><a href="http://www.terrapop.org" target="_blank">www.terrapop.org</a></div></div></div>
</font></span></div></div>
<br>_______________________________________________<br>
postgis-devel mailing list<br>
<a href="mailto:postgis-devel@lists.osgeo.org">postgis-devel@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-devel" target="_blank">http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-devel</a><br></blockquote></div><br></div>