Massachusetts County Borders

Posted by Tomash Pilshchik on 28 September 2010 in English (English)

I have long wanted to import the Massachusetts town boundaries from MassGIS. Not only is it nice to see the boundaries, but Nominatim works much better if towns have boundaries and not just a single node indicating the town center. If it has to fall back to central nodes, it frequently ascribes houses at the edge of town to the wrong town.

I have spent considerable time learning how to convert the shapefiles and to tag the boundaries. I have still not figured out how to handle the coastline (which is included in the town boundaries. I have decided that if I wait until I have figured out how to import boundaries for the whole state, it will never get done. So, I have chosen a single county without coastline (Hampden County) and imported that.

The process I used was as follows:
1) Use Ogr2osm to convert the entire MassGIS towns layer.
2) Use a custom Python script to extract Hampden county and tag the ways (of which the relations are composed) as town boundaries.
3) Open the resulting file in JOSM and create a relation consisting of the outer was. This represents the county.
4) Change the admin_level of the outer ways to the proper value for a county boundary.
5) Change the tagging of the ways which comprise the southern boundary of the county to the proper admin_level for a state border.
6) Upload.
7) Delete the existing county boundary (which was less precise and did not include the boundaries of the contained towns).

I have not yet attempted to merge the boundary ways with existing ways in those cases where the boundary corresponds to a river or road centerline.

In my next diary entry I will describe the fixes which were required in order to get Nominatim to find addresses within Hampden county.

Location: Plymouth Terrace, West Springfield, Hampden, Massachusetts, 01089, United States of America

Login to leave a comment