Created
March 16, 2016 20:59
-
-
Save 00krishna/42b42fd14e3b846f87a2 to your computer and use it in GitHub Desktop.
postgis update query where there is an intersection
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
update census_tracts_2014 | |
set council_district = t1.dist | |
from (select council_districts.dist, census_tracts_2014.affgeoid, council_districts.geom | |
from census_tracts_2014 inner join council_districts | |
on | |
ST_Intersects(census_tracts_2014.geom, ST_Transform(council_districts.geom,4269))) t1 | |
where | |
ST_Intersects(census_tracts_2014.geom, ST_Transform(t1.geom,4269)); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment