Created
August 17, 2016 01:25
-
-
Save aaronpdennis/c6e24f981f8c4d42c58cd5fa844c12c2 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
DROP TABLE qlayer; | |
SELECT distances.dist, parcels.parcel_id, parcels.geometry INTO qlayer FROM | |
( SELECT min(ST_Distance(parcels.geometry,firm.geometry)::integer) AS dist, parcels.parcel_id | |
FROM parcels,firm | |
WHERE firm.zone = 'X500' | |
GROUP BY parcels.parcel_id | |
ORDER BY dist DESC | |
) AS distances, | |
parcels | |
WHERE parcels.parcel_id = distances.parcel_id; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment