[Tile-serving] [openstreetmap/osm2pgsql] Flex creating polygons from inner ways (holes) where outer ways not in dataset (Issue #1584)

rouen-sk notifications at github.com
Tue Nov 30 11:04:19 UTC 2021


Using osm2pgsql version 1.5.1 (1.5.1-24-ga50c54e2). 
If you have dataset containing "inner" ways but not "outer" ways for some relations, geometries created for those relations would be incorrect - I believe they are created from the inner ways used as outer ring, so the "hole" becomes the polygon itself. 

Example: Vatican city is "hole" in multiple italian administrative relations. If you try to import `boundary=administrative` relations from vatican extract (attached) into table with column `geom = { create = 'area' }`  you will get multiple Italian relations with the same geometry of vatican city (i.e. osm relations ids 41313, 41485, 40784, 365331)

```
function osm2pgsql.process_relation(object)
	-- osm_admin_area (polygons)
	if object.tags.boundary=='administrative' 
	then	
        tables.osm_admin_area:add_row({
	    iso_code = object.tags['ISO3166-1:alpha3'],
	    admin_level = object.tags.admin_level,
	    name = object.tags.name,
            tags = object.tags,
            geom = { create = 'area' }
        })		
	end
end
``
[vatican-city.osm.zip](https://github.com/openstreetmap/osm2pgsql/files/7625155/vatican-city.osm.zip)
`

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/osm2pgsql/issues/1584
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/tile-serving/attachments/20211130/b7fcb61a/attachment.htm>


More information about the Tile-serving mailing list