From f263576df7e924e48061813614aaf506996e0220 Mon Sep 17 00:00:00 2001 From: Regina Obe Date: Tue, 2 Jul 2013 13:56:35 +0000 Subject: [PATCH] minor adjustment git-svn-id: http://svn.osgeo.org/postgis/trunk@11605 b70326c6-7e19-0410-871a-916f4a2858ee --- doc/reference_measure.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/reference_measure.xml b/doc/reference_measure.xml index b147ce023..660618c5b 100644 --- a/doc/reference_measure.xml +++ b/doc/reference_measure.xml @@ -2150,7 +2150,7 @@ The current implementation supports only vertices as the discrete locations. Thi Examples For each building, find the parcel that best covers it. The answer will return at most one record per building -and will return the parcel that it intersects and parts of building that don't intersect the furthest part of building is closest to this parcel. +and will return the parcel that it intersects where parts of building that don't intersect the parcel, the furthest part of building is closest to this parcel. SELECT DISTINCT ON(buildings.gid) buildings.gid, parcels.parcel_id FROM buildings INNER JOIN parcels ON ST_Intersects(buildings.geom,parcels.geom) ORDER BY buildings.gid, ST_MaxDistance(buildings.geom, parcels.geom); -- 2.50.1