<p></p>
<p dir="auto">Using osm2pgsql version 1.5.1 (1.5.1-24-ga50c54e2).<br>
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.</p>
<p dir="auto">Example: Vatican city is "hole" in multiple italian administrative relations. If you try to import <code>boundary=administrative</code> relations from vatican extract (attached) into table with column <code>geom = { create = 'area' }</code> you will get multiple Italian relations with the same geometry of vatican city (i.e. osm relations ids 41313, 41485, 40784, 365331)</p>
<pre><code>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)
`
</code></pre>
<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/openstreetmap/osm2pgsql/issues/1584">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AA6353VJ7AIDMIPUWC6CEMLUOSVTHANCNFSM5JBP6NEA">unsubscribe</a>.<br />Triage notifications on the go with GitHub Mobile for <a href="https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675">iOS</a> or <a href="https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub">Android</a>.
<img src="https://github.com/notifications/beacon/AA6353UU6QRURJRZI6L3EUDUOSVTHA5CNFSM5JBP6NEKYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4P42TQZA.gif" height="1" width="1" alt="" /></p>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/openstreetmap/osm2pgsql/issues/1584",
"url": "https://github.com/openstreetmap/osm2pgsql/issues/1584",
"name": "View Issue"
},
"description": "View this Issue on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>