<div dir="ltr"><span style="font-size:12.8px">Evan,</span><div style="font-size:12.8px"><br></div><div style="font-size:12.8px">I wanted to circle back to you and thank you for the suggestion regarding "fieldmap identity".  It turns out this was indeed the problem.  I was convinced that it needed to be used to ensure that the domains and sub-types of the filegeodatabase were transferred.</div><div style="font-size:12.8px"><br></div><div style="font-size:12.8px">Thanks again!</div></div><div class="gmail_extra"><br clear="all"><div><div class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr">David Vick</div><div dir="ltr"><br>Professional Services Engineer | <a href="http://www.boundlessgeo.com" target="_blank">Boundless</a><br><a href="mailto:dvick@boundlessgeo.com" target="_blank">dvick@boundlessgeo.com</a><br>mobile: 1-636-698-3174</div><div dir="ltr"><br><img src="https://docs.google.com/a/boundlessgeo.com/uc?id=0B47HJesavZUJaks1NUN1cEsxNFU&export=download"><span></span><span></span></div></div></div></div></div></div></div></div></div>
<br><div class="gmail_quote">On Tue, Nov 17, 2015 at 7:12 PM, David Vick <span dir="ltr"><<a href="mailto:dvick@boundlessgeo.com" target="_blank">dvick@boundlessgeo.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Evan,<div><br></div><div>Thanks for the reply.</div><div><br></div><div>We are using gdal 1.11, I have tried with setting PG_USE_COPY=NO and -skipfailures yields no results as all features within the layer fail.  I will try without the -fieldmap identity, but doubt that will have any effect as the schema of the the file geodatabase is copied into postgis prior to running ogr2ogr.</div><div><br></div><div>I have tried the OGR_TRUNCATE "YES" --config option and using -overwrite deletes the schema that we need as part of our business process.</div><div><br></div><div>Yes there is an ESRI column, the geometries are stored in the "shape" column in the db as we are currently tied to using ESRI's st_geometry as part of the business process.  If we could use postgis' native geometry this ogr2ogr process would be a perfect fit.<br></div><div><br></div><div>I will try the ingest again without the -fieldmap identity parameter to see if it makes a difference.  Thanks again, and please reach out if you think of anything else.</div></div><div class="gmail_extra"><span class=""><br clear="all"><div><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr">David Vick</div><div dir="ltr"><br>Professional Services Engineer | <a href="http://www.boundlessgeo.com" target="_blank">Boundless</a><br><a href="mailto:dvick@boundlessgeo.com" target="_blank">dvick@boundlessgeo.com</a><br>mobile: <a href="tel:1-636-698-3174" value="+16366983174" target="_blank">1-636-698-3174</a></div><div dir="ltr"><br><img src="https://docs.google.com/a/boundlessgeo.com/uc?id=0B47HJesavZUJaks1NUN1cEsxNFU&export=download"><span></span><span></span></div></div></div></div></div></div></div></div></div>
<br></span><div><div class="h5"><div class="gmail_quote">On Tue, Nov 17, 2015 at 4:55 PM, Even Rouault <span dir="ltr"><<a href="mailto:even.rouault@spatialys.com" target="_blank">even.rouault@spatialys.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div>Le mardi 17 novembre 2015 23:36:29, David Vick a écrit :<br>
> Hi,<br>
><br>
> I'm currently using OSGeo4W with ESRI's 1.4 version of the File Geodatabase<br>
> API and trying to ingest a filegdb into postgresql 9.2.2 that is configured<br>
> with ArcSDE and is using st_geometry as the default type.  When I execute<br>
> an ogr2ogr -update -append on a feature class that contains either<br>
> mulitlinestring or multipolygon I get an error that the copy statement<br>
><br>
> failed.  The debug info is listed below:<br>
> >ogr2ogr -update -append -preserve_fid -fieldmap identity -f "PostgreSQL"<br>
><br>
> PG:"host=******* user=**** dbname=******* port=5432 password=*****"<br>
> C:\Users\dvick99\Documents\fgcm\TDS61_Merged_FJ.gdb AeronauticSrf_AM<br>
> --config PGSQL_OGR_FID "objectid" --config PG_USE_COPY "YES" --config<br>
> PG_USE_BASE64 "YES" --config FGDB_BULK_LOAD "YES" --config<br>
> PG_LIST_ALL_TABLES "YES" --config OGR_TRUNCATE "YES" --debug ON -progress<br>
><br>
> FileGDB: Really opening C:\Users\dvick99\Documents\fgcm\TDS61_Merged_FJ.gdb<br>
> OGR: OGROpen(C:\Users\dvick99\Documents\fgcm\TDS61_Merged_FJ.gdb/03B3D220)<br>
> succeeded as FileGDB.<br>
> PG: DBName="fgcmdev3wk"<br>
> PG: PostgreSQL version string : 'PostgreSQL 9.2.2 on<br>
> x86_64-unknown-linux-gnu, compiled by gcc (GCC) 4.4.6 20110731 (Red Hat<br>
> 4.4.6-3), 64-bit'<br>
> PG: PostGIS version string : '2.0 USE_GEOS=1 USE_PROJ=1 USE_STATS=1'<br>
> OGR: OGROpen(PG:host=<a href="http://lnsvr0800.gcsd.harris.com" rel="noreferrer" target="_blank">lnsvr0800.gcsd.harris.com</a> user=fgcm dbname=fgcmdev3wk<br>
> port=5432 password=fgcm/054050E8) succeeded as PostgreSQL.<br>
> PG: Using column 'objectid' as FID for table 'aeronauticsrf_am'<br>
> PG: Field shape is of unknown format type st_geometry (type=st_geometry).<br>
> 0...10...20...30...40...50...60...70...80...90...100 - done.<br>
> PG: PQputCopyEnd()<br>
> ERROR 1: COPY statement failed.<br>
> ERROR:  ESRI: invalid hexa character in hexa string [30000]:<br>
> CONTEXT:  COPY aeronauticsrf_am, line 1, column shape:<br>
> "{C8CDC53F-9478-4CB9-9CD3-7ADA9558FFC2}"<br>
><br>
> OGR2OGR: 118 features written in layer 'aeronauticsrf_am'<br>
> FileGDB: ref_count of C:\Users\dvick99\Documents\fgcm\TDS61_Merged_FJ.gdb =<br>
> 0 now<br>
> FileGDB: Really closing C:\Users\dvick99\Documents\fgcm\TDS61_Merged_FJ.gdb<br>
> now<br>
><br>
> Does anyone have any other suggestions to try?  Our current process of<br>
> loading data is taking in excess of 12 hours and getting ogr2ogr to work<br>
> will improve this time to just minutes.<br>
<br>
</div></div>David,<br>
<br>
Difficult to know what happens with just that.<br>
Which GDAL version ?<br>
You could try without PG_USE_COPY=YES to check if it is an issue with the copy<br>
mode.<br>
And -skipfailures to identify if there's a particular feature that cause<br>
problem or if it is more general.<br>
Perhaps a field mismatch with "-fieldmap identity" ? This option only works if<br>
the column names in source and target datasets are listed in same order (check<br>
with ogrinfo)<br>
Did you try creating a new target layer instead of -update + --config<br>
OGR_TRUNCATE "YES"  ?<br>
<br>
I'm not sure when the error "ERROR:  ESRI: invalid hexa character in hexa<br>
string [30000]:" comes from. Is there a 'ESRI' column ?<br>
<span><font color="#888888"><br>
Even<br>
<br>
--<br>
Spatialys - Geospatial professional services<br>
<a href="http://www.spatialys.com" rel="noreferrer" target="_blank">http://www.spatialys.com</a><br>
</font></span></blockquote></div><br></div></div></div>
</blockquote></div><br></div>