Opened 9 years ago

Closed 9 years ago

#3784 closed defect (fixed)

Error Reading GML3 geometry.

Reported by: 19216801 Owned by: chaitanya
Priority: normal Milestone:
Component: OGR_SF Version: svn-trunk
Severity: normal Keywords: pg postgres
Cc: warmerdam

Description

Sometimes coordiantes like 712345.082 5432000.318 become 712345.082 5432 when using the postgres database driver. But everthing is correct when using the new pg_dump driver. The gml data is read by nas driver who used gml driver for converting geometrys.

Attachments (1)

nas_error.xml (3.7 KB) - added by 19216801 9 years ago.

Download all attachments as: .zip

Change History (6)

comment:1 Changed 9 years ago by warmerdam

Cc: warmerdam added
Component: defaultOGR_SF
Keywords: pg postgres added
Owner: changed from warmerdam to chaitanya

Ralf,

Could you provide a relatively simple input file and the ogr2ogr command you used to demonstrate this problem?

Chaitanya,

Once there is enough information, could you try to reproduce and fix it?

Changed 9 years ago by 19216801

Attachment: nas_error.xml added

comment:2 Changed 9 years ago by 19216801

I testet a little bit more. ogr2ogr -f PostgreSQL PG:"dbname=postnas" nas_error.xml and ogr2ogr -lco WRITE_EWKT_GEOM=ON -f PGDump /vsistdout/ nas_error.xml produce wrong INSERT INTO "ax_gdaltest" ("wkb_geometry" , "gml_id", "identifier") VALUES (GeomFromEWKT('SRID=-1;POLYGON ((777565.082

6654,777559.272 6654000.893,777559.272 6654000.893,777556.941 6653978.029,777556.941 6653978.029,777557.145 6653977.99,777557.145 6653977.99,777558.978 6653977.624,777558.978 6653977.624,777562.825 6653976.856,777562.825 6653976.856,777565.082 6654))'::TEXT) , 'AbuDhabi?', 'urn:adv:oid:AbuDhabi')

The HEX geometry from ogr2ogr -f PGDump /vsistdout/ nas_error.xml are ok.

comment:3 Changed 9 years ago by chaitanya

Status: newassigned

comment:4 Changed 9 years ago by Even Rouault

Ralf, I can't reproduce on latest trunk. Is your trunk version recent enough ? I made a fix for a very very similar error that was introduced a few months ago in trunk and corrected in r20468 (7 weeks ago) : "OGRFormatDouble(): correct regression (trunk only) that would truncate '5591000.590' to '5591'"

comment:5 in reply to:  4 Changed 9 years ago by 19216801

Resolution: fixed
Status: assignedclosed

Oh, yes r20468 fix it. Thanks a lot.

Note: See TracTickets for help on using tickets.