[prev in list] [next in list] [prev in thread] [next in thread]
List: postgis-users
Subject: [postgis-users] overlaps with different geometry types
From: Johannes =?ISO-8859-1?Q?B=FChler?= <johannesbuehler () oderbruecke ! de>
Date: 2004-11-26 16:59:43
Message-ID: 20041126175943.47fb5430 () localhost
[Download RAW message or body]
Hi
i want to have the same query syntax to make a query on a polgon, line point or \
geometrycollection column or any other geometry type.
is used the following syntax to query all lines in a box
SELECT AUXDAT.GEWAESSER.GEOM_ID as GEOM_ID, AUXDAT.GEWAESSER.NAME as NAME, \
AUXDAT.GEWAESSER.GEWAESSER as GEWAESSER FROM AUXDAT.GEWAESSER WHERE ( \
AUXDAT.GEWAESSER.GEWAESSER&&geometryfromtext('BOX3D(501540.296700 71680.601200, \
539906.562400 99260.534400)'::BOX3D,2) and OVERLAPS(AUXDAT.GEWAESSER.GEWAESSER, \
geometryfromtext('BOX3D(501540.296700 71680.601200, 539906.562400 \
99260.534400)'::BOX3D,2)) = true)
this is fine but doesent work on a polygon feature. Therefore i have to use the \
following syntax using the envelope function to create a polygon from the box3d.
SELECT GEODAT.ADMUNIT2.GEOM_ID as GEOM_ID, GEODAT.ADMUNIT2.NAME as NAME, \
GEODAT.ADMUNIT2.SELECT_NAME as SELECT_NAME, GEODAT.ADMUNIT2.ADMUNIT2 as ADMUNIT2 FROM \
GEODAT.ADMUNIT2 WHERE ( GEODAT.ADMUNIT2.ADMUNIT2 && geometryfromtext('BOX3D(8.980000 \
47.144667, 10.492000 47.808000)'::BOX3D,1) and OVERLAPS(GEODAT.ADMUNIT2.ADMUNIT2, \
envelope(geometryfromtext('BOX3D(8.98 47.144667, 10.492000 47.808000)'::BOX3D,1))) = \
true);
But this syntax doesnt work on the line features. Does anyone now a solution how to \
query different geometry types with the same query syntax?
thanks
Johannes
[Attachment #3 (application/pgp-signature)]
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic