Week 17 - Geospatial
Brooklyn is having issues with a particular supergang : The rectangles.
They focus on controlling busy points within the city and carve out a particularly shaped area of influence: a rectangle. 1 point of interest, or node, is central to their operation, they control every other node within 750 meters.
They only seem to settle down if a node has at least 3 other nodes within 750 of a central node and they've also got a strange fascination with electronic stores. This means that there will be at least 4 nodes in a group.
Data is contained within the OpenStreetMap New York (by Sonra) on the Snowflake Marketplace
Requirements
- connect to OpenStreetMap New York by Sonra
- use the v_osm_ny_shop_electronics view
- If 3 nodes are within 750 meters of another central node, group these together.
- Build a rectangle containing these groups , 1 rectangle per group
- The central node should be within the city of Brooklyn (look in addr_city and ignore the null values)
- Be able to plot all these rectangles on a single map using wkt formatting (search for wkt plotting to find these sites)
END RESULT
And below is what you should end up with if you were to plot the single line on a wkt plotter (pay attention to the red rectangles):

DATA SOURCES:
- https://clydedacruz.github.io/openstreetmap-wkt-playground/
- https://app.snowflake.com/marketplace/listing/GZSVZ3XQXH?search=OpenStreetMap%20New%20York
Remember, if you want to participate:
- Sign up as a member of Frosty Friday. You can do this by clicking on the sidebar, and then going to ‘REGISTER‘
- Post your code to GitHub and make it publicly available (Check out our guide if you don't know how to here)
- Post the URL in the comments of the challenge