Opened 9 years ago

Closed 9 years ago

Last modified 9 years ago

#6070 closed defect (fixed)

EDIGEO driver : geometries distorded (simplified ?) in Linux and NOT in Windows platform

Reported by: kimaidou Owned by: warmerdam
Priority: high Milestone: 1.11.3
Component: default Version: unspecified
Severity: critical Keywords: edigeo
Cc:

Description (last modified by kimaidou)

Problem :

  • polygon geometries seems distorded under Linux (look like over-simplified), and not under Windows. This lead to wrong data when using ogr2ogr to imprt files in PostGIS or export to Shapefile.

CF attached image: ubuntu box on the left side / Windows box on the right side, same THF

Steps to reproduce:

  • Open some EDIGEO THX file with QGIS in a Linux box (tested with Ubuntu and OpenSuze ) build with GDAL/OGR 1.11.2
  • Open the same file with QGIS in Windows , build also with GDAL/OGR 1.11.2

Attachments (4)

bug_ogr_edigeo_linux.png (116.7 KB ) - added by kimaidou 9 years ago.
ogrinfo_linux.txt (702 bytes ) - added by kimaidou 9 years ago.
ogrinfo_windows.txt (721 bytes ) - added by kimaidou 9 years ago.
commune-edigeo-020.tar.bz2 (560.0 KB ) - added by kimaidou 9 years ago.

Download all attachments as: .zip

Change History (11)

by kimaidou, 9 years ago

Attachment: bug_ogr_edigeo_linux.png added

comment:1 by kimaidou, 9 years ago

Description: modified (diff)

comment:2 by kimaidou, 9 years ago

It feels like a SnapToGrid more than a simplification

comment:3 by kimaidou, 9 years ago

Summary: EDIGEO driver : geometries distorded (simplified ?) in Linux and in Windows platformEDIGEO driver : geometries distorded (simplified ?) in Linux and NOT in Windows platform

by kimaidou, 9 years ago

Attachment: ogrinfo_linux.txt added

by kimaidou, 9 years ago

Attachment: ogrinfo_windows.txt added

by kimaidou, 9 years ago

Attachment: commune-edigeo-020.tar.bz2 added

comment:4 by Even Rouault, 9 years ago

I meant full dumps with "ogrinfo -al XXXXXXX". Anyway I've just tried on my own custom builds (with GDAL trunk) and I don't get any significant differences (just in the SRS definition but likely due to different proj.4 versions, and some neglectable floating-point differences in an attribute, but geometries are strictly identical)

Last edited 9 years ago by Even Rouault (previous) (diff)

comment:5 by Kimaidou, 9 years ago

Thanks for your help. It must simply be a decimal separator problem then. It really looks like nodes are "moved" to a 1mX1m grid. I will try to run qgis command line with LC_NUMERIC="C" and report back

comment:6 by Even Rouault, 9 years ago

Resolution: fixed
Status: newclosed

Ah this is very likely ! I indeed see atof() calls in the 1.11 version of the driver have been convererted to locale insensite CPLAtof() in 2.0 during the global pass done on such issues.

Backporting that in 1.11 branch (just for EDIGEO driver) r29641 "EDIGEO: backport 2.0 conversion of atof() to CPLAtof() to avoid truncatof floating point numbers including coordinates on a non C locale (#6070)"

comment:7 by kimaidou, 9 years ago

Just tried with export LC_NUMERIC="C" && qgis and geometries are now OK

Thanks a lot for this fix and backporting.

Note: See TracTickets for help on using tickets.