[Talk-us] Problem with Newton County, MO
Frederik Ramm
frederik at remote.org
Tue Dec 29 10:08:43 UTC 2020
Hi,
many US counties have a relation member in a role of "admin_centre",
usually a node representing the county seat.
There is one single county - Newton, MO - where the admin_centre points
not to a node and not to a relation but instead to a closed way; for
Newton, that is the administrative boundary of the city of Neosho, the
county seat:
https://www.openstreetmap.org/relation/1180491
Now from a logic perspective it should not matter whether the
admin_centre is a node or a way. However, due to the way in which the
Osmium library processes multipolygons, *all* way-type members are used
for polygon building. This means that in any geometry database built by
Osmium, Newton County has a gaping hole in its middle where the city of
Neosho is.
This becomes visible on the map, where a county boundary surrounds the
city, labeleld "Newton County" on the outside and "Neosho" on the inside:
https://www.openstreetmap.org/#map=15/36.8147/-94.3583
Also, if you use Nominatim to reverse geocode a point that is in Newton
County but outside of Neosho you get a correct result of "Newton County,
Missouri, United States"
https://www.openstreetmap.org/search?whereami=1&query=36.8097%2C-94.3317#map=15/36.8097/-94.3317
whereas if you reverse geocode a point in Neosho, you only get "Neosho,
Missouri, United States" without a county:
https://www.openstreetmap.org/search?whereami=1&query=36.8385%2C-94.3586#map=15/36.8385/-94.3586
Anyone who would e.g. use an osm2pgsql import to generate geometries for
all counties would also end up with a hole punched into Newton County,
while an Overpass GeoJSON export will handle this situation correctly.
In the long run, maybe the Osmium library needs to be modified to ignore
such relation members when building polygons (the current approach of
"try to use everything regardless of role" avoids a lot of broken
polygons where people have misspelled an "outer" or accidentally mixed
up "outers" and "inners").
I would, however, suggest that in the mean time, the mapping of Newton
County be changed to either (a) use just a city node as its
admin_centre, or alternatively (b) use a boundary relation forming
Neosho's boundary as the admin_centre. Both of these would work around
the problem for now.
I am aware that some people might call this "mapping for the processing
software" and you're of course at liberty to ignore my suggestion. Just
trying to be practical ;)
Bye
Frederik
--
Frederik Ramm ## eMail frederik at remote.org ## N49°00'09" E008°23'33"
More information about the Talk-us
mailing list