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>174 / 3107.8.8 ST_CoveredByST_CoveredBy — Returns 1 (TRUE) if no point in Geometry/Geography A is outside Geometry/Geography BSynopsisboolean ST_CoveredBy(geometry geomA, geometry geomB);boolean ST_CoveredBy(geography geogA, geography geogB);DescriptionReturns 1 (TRUE) if no point in Geometry/Geography A is outside Geometry/Geography BPerformed by the GEOS moduleImportantDo not call with a GEOMETRYCOLLECTION as an argumentImportantDo not use this function with invalid geometries. You will get unexpected results.Availability: 1.2.2 - requires GEOS >= 3.0This function call will automatically include a bounding box comparison that will make use of any indexes that are available onthe geometries. To avoid index use, use the function _ST_CoveredBy.NOTE: this is the "allowable" version that returns a boolean, not an integer.Not an OGC standard, but Oracle has it too.There are certain subtleties to ST_Contains and ST_Within that are not intuitively obvious. For details check out Subtleties ofOGC Covers, Contains, WithinExamples--a circle coveredby a circleSELECT ST_CoveredBy(smallc,smallc) As smallinsmall,ST_CoveredBy(smallc, bigc) As smallcoveredbybig,ST_CoveredBy(ST_ExteriorRing(bigc), bigc) As exteriorcoveredbybig,ST_Within(ST_ExteriorRing(bigc),bigc) As exeriorwithinbigFROM (SELECT ST_Buffer(ST_GeomFromText(’POINT(1 2)’), 10) As smallc,ST_Buffer(ST_GeomFromText(’POINT(1 2)’), 20) As bigc) As foo;--Resultsmallinsmall | smallcoveredbybig | exteriorcoveredbybig | exeriorwithinbig--------------+-------------------+----------------------+------------------t | t | t | f(1 row)See AlsoST_Contains, ST_Covers, ST_ExteriorRing, ST_Within

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

Saved successfully!

Ooh no, something went wrong!