Skip to content

Instantly share code, notes, and snippets.

@awoodruff
Last active September 14, 2015 18:01
Show Gist options
  • Save awoodruff/cb296cd300a0a904b74c to your computer and use it in GitHub Desktop.
Save awoodruff/cb296cd300a0a904b74c to your computer and use it in GitHub Desktop.

Have:

A ton of overlapping polygons, representing neighborhoods that people drew and named. (GeoJSON here.) Well-known neighborhoods will have many polygons with the same name, and similar shapes.

Want:

A summary map of polygons representing the area where each neighborhood name is dominant. That is, the area where a given neighborhood name is used more than any other neighborhood name.

My approach:

Overlay a (hexagonal) grid, and for each cell get all neighborhood polygons overlapping it, then assign to the cell the name that appears most among those polygons. Essentially, this is a raster map.

Question:

Is there a way to do this with a more genuine vector approach? My grid is sufficiently fine, but it's still a grid, bumpy and hexagon-y rather than smooth and precise-looking.

@dmede
Copy link

dmede commented Sep 14, 2015

You can always re vectorize and simplify or smooth the grid once comeplete.

@danmaps
Copy link

danmaps commented Sep 14, 2015

@Virtakuono
Copy link

A stupid question: what would you do if a point (or a hexagon, for that matter) is designated equally many times in two areas?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment