Tuesday, 21 November 2017

shapefile - converting shp to fileGDB with ogr2ogr changes geometry type?


I'm converting a shapefile to file geodatabase with GDAL 1.11.3 and the ESRI FileGDB driver.


ogrinfo on the .shp gives:


$ ogrinfo NED1_Index.shp
INFO: Open of `NED1_Index.shp'
using driver `ESRI Shapefile' successful.

1: NED1_Index (Polygon)

I run this command:


$ ogr2ogr -f "FileGDB" nedtest.gdb NED1_Index.shp

or this one specifying the geometry type:


$ ogr2ogr -f "FileGDB" -nlt POLYGON nedtest.gdb NED1_Index.shp

and then ogrinfo on the output fileGDB gives:


$ ogrinfo nedtest.gdb/  

INFO: Open of `nedtest.gdb/'
using driver `FileGDB' successful.
1: NED1_Index (Multi Polygon)

Why is the geometry changing to MultiPolygon?




No comments:

Post a Comment

arcpy - Changing output name when exporting data driven pages to JPG?

Is there a way to save the output JPG, changing the output file name to the page name, instead of page number? I mean changing the script fo...