[gdal-dev] Appending to a single feature class in a gdb via ogr2ogr
jratike80
jukka.rahkonen at maanmittauslaitos.fi
Thu May 14 00:39:03 PDT 2020
Hi,
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?
-Jukka Rahkonen-
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
> looks
> 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)
> .....
> 99:
> output_1_2_3_4_5_6_7_8_9_10_11_12_13_14_15_16_17_18_19_20_21_22_23_24_25_26_27_28_29_30_31_32_33_34_35_36_37_38_39_40_41_42_43_44_45_98
> (Multi Polygon)
> 100:
> output_1_2_3_4_5_6_7_8_9_10_11_12_13_14_15_16_17_18_19_20_21_22_23_24_25_26_27_28_29_30_31_32_33_34_35_36_37_38_39_40_41_42_43_44_45_99
> (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!
> Ma
>
> _______________________________________________
> gdal-dev mailing list
> gdal-dev at .osgeo
> https://lists.osgeo.org/mailman/listinfo/gdal-dev
--
Sent from: http://osgeo-org.1560.x6.nabble.com/GDAL-Dev-f3742093.html
More information about the gdal-dev
mailing list