Opened 13 years ago

Closed 12 years ago

#2921 closed defect (fixed)

Geoconcept : error in writing 2.5D/3D export file

Reported by: dgrichard Owned by: dgrichard
Priority: normal Milestone: 1.7.0
Component: OGR_SF Version: 1.6.0
Severity: normal Keywords: geoconcept
Cc: Even Rouault

Description

The 3DOBJECTMONO is duplicated for each 2.5/3D coordinates in the export file instead of being written once for the feature's geometry.

This patch corrects this bug and also handles default precision when writting coordinates : cartesian coordinates are written with 2 decimals (~1cm) and geographical with 9 decimals (~3cm). The driver document is also updated.

The GDAL autotest data should be updated too.

Attachments (5)

geoconcept_coordinates25D.diff (12.6 KB) - added by dgrichard 13 years ago.
expected_tile.txt (1.1 KB) - added by dgrichard 13 years ago.
expected_tile.gxt (1.8 KB) - added by dgrichard 13 years ago.
expected_000_GRD.txt (1.1 KB) - added by dgrichard 13 years ago.
expected_000_GRD.gxt (1.9 KB) - added by dgrichard 13 years ago.

Download all attachments as: .zip

Change History (11)

Changed 13 years ago by dgrichard

Changed 13 years ago by dgrichard

Attachment: expected_tile.txt added

Changed 13 years ago by dgrichard

Attachment: expected_tile.gxt added

Changed 13 years ago by dgrichard

Attachment: expected_000_GRD.txt added

Changed 13 years ago by dgrichard

Attachment: expected_000_GRD.gxt added

comment:1 Changed 13 years ago by dgrichard

patch applied r16683

comment:2 Changed 13 years ago by dgrichard

test data applied r16684

comment:3 Changed 13 years ago by Even Rouault

Didier,

gcc warns that hCS at line 5106 of geoconcept.c may be used uninitialized.

comment:4 in reply to:  3 Changed 13 years ago by dgrichard

Contrarily to pCS which is always set, hCS is only set when in 25D/3D ... I am setting both of them to 0 :

Index: ogr/ogrsf_frmts/geoconcept/geoconcept.c
===================================================================
--- ogr/ogrsf_frmts/geoconcept/geoconcept.c     (révision 16683)
+++ ogr/ogrsf_frmts/geoconcept/geoconcept.c     (copie de travail)
@@ -5110,6 +5110,7 @@
   h= GetGCHandle_GCIO(H);
   n= CountSubTypeFields_GCIO(theSubType);
   iAn= -1;
+  pCS= hCS= 0;
   if( (i= _findFieldByName_GCIO(GetSubTypeFields_GCIO(theSubType),kGraphics_GCIO))==-1 )
   {
     if( (i= _findFieldByName_GCIO(GetSubTypeFields_GCIO(theSubType),kAngle_GCIO))==-1 )

comment:5 Changed 13 years ago by dgrichard

warn fixed at r16685

comment:6 Changed 12 years ago by Even Rouault

Milestone: 1.7.0
Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.