[gdal-dev] OSM to GDB
Michael Smith
michael.smith.erdc at gmail.com
Thu Feb 20 10:38:29 PST 2025
ogr2ogr -f OpenFileGDB -spat 39 30 40 41 -nlt MULTIPOLYGON -ds_transaction C:\TEMP\TEST5.gdb C:\TEMP\World_8_3.osm multipolygons
You need to just pass the single layer to ogr2ogr
Mike
From: John Oliver <john.oliver at rsi-visuals.com>
Date: Thursday, February 20, 2025 at 1:31 PM
To: Michael Smith <michael.smith.erdc at gmail.com>, "gdal-dev at lists.osgeo.org" <gdal-dev at lists.osgeo.org>
Subject: RE: [gdal-dev] OSM to GDB
Tried the -nlt option and the ERROR did go away, which is promising but output is still empty
C:\Program Files\QGIS 3.34.1>ogr2ogr -f OpenFileGDB -spat 39 30 40 41 -nlt MULTIPOLYGON -ds_transaction C:\TEMP\TEST5.gdb C:\TEMP\World_8_3.osm
Warning 1: Input datasource uses random layer reading, but output datasource does not support random layer writing
0...10...20...30...40...50...60...70...80...90...100 - done.
From: Michael Smith <michael.smith.erdc at gmail.com>
Sent: Thursday, February 20, 2025 1:08 PM
To: John Oliver <john.oliver at rsi-visuals.com>; gdal-dev at lists.osgeo.org
Subject: Re: [gdal-dev] OSM to GDB
I believe you need to do this by layer, eg points/lines/etc. One GDB per geometry class.
Mike
--
Michael Smith
Remote Sensing/GIS Center
US Army Corps of Engineers
From: gdal-dev <gdal-dev-bounces at lists.osgeo.org> on behalf of John Oliver via gdal-dev <gdal-dev at lists.osgeo.org>
Reply-To: John Oliver <john.oliver at rsi-visuals.com>
Date: Thursday, February 20, 2025 at 1:03 PM
To: "gdal-dev at lists.osgeo.org" <gdal-dev at lists.osgeo.org>
Subject: [gdal-dev] OSM to GDB
Excuse my ignorance. I am not a developer. But I’m trying what should be a relatively simple task.
I need to extract a subset of OSM to Esri FileGDB format.
My OSM file is valid:
C:\Program Files\QGIS 3.34.1>ogrinfo C:\TEMP\World_8_3.osm
INFO: Open of `C:\TEMP\World_8_3.osm'
using driver `OSM' successful.
1: points (Point)
2: lines (Line String)
3: multilinestrings (Multi Line String)
4: multipolygons (Multi Polygon)
5: other_relations (Geometry Collection)
But when I try to extract to GDB I get the following:
C:\Program Files\QGIS 3.34.1>ogr2ogr -f OpenFileGDB -spat 39 30 40 41 -ds_transaction C:\TEMP\TEST4.gdb C:\TEMP\World_8_3.osm
Warning 1: Input datasource uses random layer reading, but output datasource does not support random layer writing
0...10...20...30...40...50...60...70...80...90...100 - done.
ERROR 6: Unsupported geometry type
Needless to say the created GDB is empty.
Anyone got any idea how to make ERROR 6 go away and hopefully get some output
_______________________________________________ gdal-dev mailing list gdal-dev at lists.osgeo.org https://lists.osgeo.org/mailman/listinfo/gdal-dev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20250220/87aacc43/attachment-0001.htm>
More information about the gdal-dev
mailing list