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

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

<strong>PostGIS</strong> <strong>1.5.8</strong> <strong>Manual</strong>208 / 310This 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_Within.NOTE: this is the "allowable" version that returns a boolean, not an integer.This method implements the OpenGIS Simple Features Implementation Specification for SQL 1.1. s2.1.1.2 // s2.1.13.3 -a.Relate(b, ’T*F**F***’)This method implements the SQL/MM specification. SQL-MM 3: 5.1.30Examples--a circle within a circleSELECT ST_Within(smallc,smallc) As smallinsmall,ST_Within(smallc, bigc) As smallinbig,ST_Within(bigc,smallc) As biginsmall,ST_Within(ST_Union(smallc, bigc), bigc) as unioninbig,ST_Within(bigc, ST_Union(smallc, bigc)) as biginunion,ST_Equals(bigc, ST_Union(smallc, bigc)) as bigisunionFROM(SELECT ST_Buffer(ST_GeomFromText(’POINT(50 50)’), 20) As smallc,ST_Buffer(ST_GeomFromText(’POINT(50 50)’), 40) As bigc) As foo;--Resultsmallinsmall | smallinbig | biginsmall | unioninbig | biginunion | bigisunion--------------+------------+------------+------------+------------+------------t | t | f | t | t | t(1 row)See AlsoST_Contains, ST_Equals,ST_IsValid

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

Saved successfully!

Ooh no, something went wrong!