using the full xml (https://www.openstreetmap.org/api/0.6/relation/2323309/full) from the Netherlands, I can create a complet geojson using:
ogr2ogr -f GEOJSON nl.geojson nl.osm -oo CONFIG_FILE=osmconf_all.ini -sql “SELECT * FROM multipolygons”
this gives me the contours of the Netherlands with the enclave around Baarle-Hertog correctly displayed
at east in version 3.10,
when upgraded to version 3.11 and 3.12 the resulting geojson does not show the ‘main’ border anymore and only some of the enclaves.
Similar issues with Australia.
I dug through the release and migration notes and tested with different settings for OGR_ORGANIZE_POLYGONS but can’t get it working in 3.12
I found some posts ( Why Are Polygons Missing When Loading planet-v1.57.osm.pbf with GDAL? - #2 by woodpeck ) that might be related but couldn’t find an answer there either. IRL I extract the information from a planet file, but could reproduce the behavior. with the .osm file.
Does someone have an idea what I’m missing? The polygons in osm are probably not nicely (counter)clockwise for outer and inner rings, but OGR_ORGANIZE_POLYGONS=DEFAULT should ignore that.
I installed (and downgraded) gdal with OSGeo4W, the CONFIG_FILE is the default one.