Created
February 21, 2017 09:28
-
-
Save ljwolf/d9f8b19704c8443c0f4d8a5145c0080d to your computer and use it in GitHub Desktop.
sql query for queen adjacency, given a table with geometry in the_geom and an index in geom_uid
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
select | |
t1.geom_uid as geom_uid, | |
t2.geom_uid as neighbor_uid | |
from | |
geo6311 as t1, | |
geo6311 as t2 | |
where | |
st_touches(t1.the_geom, t2.the_geom); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment