24.10.2012 Views

Working with the geodatabase effectively using SQL - Esri

Working with the geodatabase effectively using SQL - Esri

Working with the geodatabase effectively using SQL - Esri

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

<strong>Working</strong> <strong>with</strong> spatial data in Postgre<strong>SQL</strong><br />

• Querying spatial attributes<br />

SSELECT C st.objectid, bj id st_astext(shape) ( h )<br />

FROM map.blocks_st st<br />

WHERE st_astext(sde.st_intersection<br />

(sde.st_geometry('polygon ((52 28,58 28,58 23,<br />

52 23,52 8))’ ,1),st.shape))::text<br />

NOT LIKE '%EMPTY%';<br />

OBJECTID SHAPE_WKT<br />

-------- -------------------------------------------<br />

1 POLYGON ((2217028.84 399516.70, 2217028.84<br />

399507.82, 2217039.12 399507.82, 2217039.12<br />

399516.70, 2217028.84 399516.70))<br />

Developer Summit 2007 36

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!