For years I have pulled Open StreetMap datasets from Geofabrik and converted them to SQLite for use within QGIS. Until now, I've had no problem using the following in the OSGeo4W Shell window:

ogr2ogr -f "SQLite" -dsc SPATIALITE=YES destination.db source.osm.pbf

Running this conversion on several different OSM data sets today, I'm getting numerous warning messages that read:

Warning 1: Non closed ring detected. To avoid accepting it, set the OGR_GEOMETRY_ACCEPT_UNCLOSED_RING configuration option to NO

I've never seen this error before, and I'm having trouble finding any information about this error or how to solve it.


1 Answer 1


The warning means that some geometry in the OSM data that is defined to be an area object (for example building or parking area) does not form a closed ring where the first and the last points are the same. It is a warning, not an error. By default GDAL is closing the ring by adding the last closing point to the geometry. Most probably this gives the desired result. For more accurately analysis you should try to capture the OSM id of the conflicting geometry.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.