12.07.2015 Views

PostGIS 1.5.8 Manual - Fedora Project Packages GIT repositories

PostGIS 1.5.8 Manual - Fedora Project Packages GIT repositories

PostGIS 1.5.8 Manual - Fedora Project Packages GIT repositories

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>PostGIS</strong> <strong>1.5.8</strong> <strong>Manual</strong>41 / 310FROMbc_roads AS r,bc_municipality AS mWHERE m.name = ’PRINCE GEORGE’ AND ST_Intersects(r.the_geom, m.the_geom);6. What is the length in kilometers of "Douglas St" in Victoria?SELECTsum(ST_Length(r.the_geom))/1000 AS kilometersFROMbc_roads r,bc_municipality mWHERE r.name = ’Douglas St’ AND m.name = ’VICTORIA’AND ST_Contains(m.the_geom, r.the_geom) ;kilometers------------------4.89151904172838(1 row)7. What is the largest municipality polygon that has a hole?SELECT gid, name, ST_Area(the_geom) AS areaFROM bc_municipalityWHERE ST_NRings(the_geom) > 1ORDER BY area DESC LIMIT 1;gid | name | area-----+--------------+------------------12 | SPALLUMCHEEN | 257374619.430216(1 row)

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

Saved successfully!

Ooh no, something went wrong!