[postgis-users] returning records from spatial relationships
Fabiano Saraiva
fabisaraiva at gmail.com
Mon Nov 9 10:18:01 PST 2015
Hi Bob,
Something like this:
SELECT a.id,
b.id
FROM A AS a, B AS b
WHERE ST_WITHIN(a.geom, b.geom) -- or ST_CONTAINS(b.geom, a.geom)
Cheers
2015-11-09 14:50 GMT-02:00 Bistrais, Bob <Bob.Bistrais at maine.gov>:
> Spatial functions such as ST_Within and ST_Boundary return a Boolean.
> Instead, I would like to be able to return the feature id’s of the features
> used in these functions. Example, instead of ST_Within(A,B) being true or
> false, I’d like to get the feature ids of A that are within B. So if A
> contains points, B contains polygons, which point features of A are within
> B. How do I do this?
>
> _______________________________________________
> postgis-users mailing list
> postgis-users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/postgis-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20151109/cb31c610/attachment.html>
More information about the postgis-users
mailing list