[gdal-dev] Appending to a single feature class in a gdb via ogr2ogr
jukka.rahkonen at maanmittauslaitos.fi
Thu May 14 00:39:03 PDT 2020
I do not program, but what if something unexpedted happens in your loop and
"i == 0:" is always true? Forget your code for a while and gather more
information with complete ogr2ogr commands like Even did. But I am
remembering that this has been asked before on gis.stackexchange and the
code worked fine when the target was GeoPackage, do I remember right?
Maggie Wooten wrote
> I am trying to iterate over some shapefiles (109 shapefiles to be exact)
> and append them to a *single* feature class in an output geodatabase, but
> the resulting output geodatabase is one with 100 feature classes that
> like this:
> INFO: Open of `output.gdb' using driver `FileGDB' successful.
> 1: output (Multi Polygon)
> 2: output_1 (Multi Polygon)
> 3: output_1_2 (Multi Polygon)
> 4: output_1_2_3 (Multi Polygon)
> 5: output_1_2_3_4 (Multi Polygon)
> (Multi Polygon)
> (Multi Polygon)
> These are the commands I'm running in the iteration:
> if i == 0: "ogr2ogr -nln output -a_srs EPSG:4326 -t_srs EPSG:4326 -f
> "FileGDB" output.gdb input1.shp"
> else: "ogr2ogr -nln output -a_srs EPSG:4326 -t_srs EPSG:4326 -update
> -append -f "FileGDB" output.gdb inputX.shp"
> What am I doing wrong here? How can I get the desired result? I tried a
> bunch of different things and flags and still could not get it all to
> append to one feature class. Any advice would be greatly appreciated and
> I'd be happy to provide whatever information may be necessary.
> Thank you!
> gdal-dev mailing list
> gdal-dev at .osgeo
Sent from: http://osgeo-org.1560.x6.nabble.com/GDAL-Dev-f3742093.html
More information about the gdal-dev