I have been using ogr2ogr GDAL tool to migrate geospatial data from DXF file to PotgresQL database without much problems. But now there is a special problem I can not fix.
I have a DXF file with LINESTRINGs that when I import them to the PostgreSQL database some of the linestrings are imported in the correct geometric coordinates but some other LINESTRINGs are imported with the negative longitude, so that LINESTRINGs are mirrored to the west.
When I open the DXF file with my QUANTUM GIS viewer I can see all the LINESTRINGs together with the correct coordinates, but when I export them to the postgres database and I print them in a map (by a web application) or later I export then I see some of the LINESTRINGs mirrored "away home" from the original coordinates.
That is my ogr2ogr commandline:
ogr2ogr -select "" -f PostgreSQL "PG:host=192.168.*.* user=**** password=**** dbname=****" C:\PATH\FILE.dxf -s_srs "EPSG:23031" -a_srs "EPSG:23031" -lco GEOMETRY_NAME=the_geom -nlt LINESTRING
There is no error output from the ogr2ogr tool, so it is difficult to get the reason of that problematic.
Any help or recommendation?
I have tried without much effect the ogr2ogr opions: -lco GEOM_TYPE=geometry -lco DIM=2 --config PG_USE_COPY YES -lco PRECISION=YES -clipsrc xmin ymin xmax ymax