Last active
December 16, 2016 04:44
-
-
Save chiragtoor/7e49fd73d958203e2c95e26b3ca2fa48 to your computer and use it in GitHub Desktop.
This file contains 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
commercial_zones = get_commercial_zones() | |
|> Enum.map(fn(%{"geometry" => %{"coordinates" => [coordinates]}}) -> | |
coordinates | |
end) | |
commercial_blocks = get_blocks() | |
|> Enum.map(fn(geoJson = %{"geometry" => %{"coordinates" => [coordinates]}}) -> | |
# we need the coordinates to check for intersections and the | |
# original geoJson because if this block is in a commercial | |
# zone we will want to output it to a new file | |
{geoJson, coordinates} | |
end) | |
|> Enum.map(fn({geoJson, block}) -> | |
# figure out if the block intersects with any of the zones, if so | |
# it is valid, if not we can skip it | |
end) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment