Opened 15 years ago

Closed 15 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 15 years ago.
expected_tile.txt (1.1 KB ) - added by dgrichard 15 years ago.
expected_tile.gxt (1.8 KB ) - added by dgrichard 15 years ago.
expected_000_GRD.txt (1.1 KB ) - added by dgrichard 15 years ago.
expected_000_GRD.gxt (1.9 KB ) - added by dgrichard 15 years ago.

Download all attachments as: .zip

Change History (11)

by dgrichard, 15 years ago

by dgrichard, 15 years ago

Attachment: expected_tile.txt added

by dgrichard, 15 years ago

Attachment: expected_tile.gxt added

by dgrichard, 15 years ago

Attachment: expected_000_GRD.txt added

by dgrichard, 15 years ago

Attachment: expected_000_GRD.gxt added

comment:1 by dgrichard, 15 years ago

patch applied r16683

comment:2 by dgrichard, 15 years ago

test data applied r16684

comment:3 by Even Rouault, 15 years ago

Didier,

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

in reply to:  3 comment:4 by dgrichard, 15 years ago

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 by dgrichard, 15 years ago

warn fixed at r16685

comment:6 by Even Rouault, 15 years ago

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