Opened 18 years ago
Last modified 18 years ago
#1010 closed defect (fixed)
Problem in 2d and 3d constructors
Reported by: | Owned by: | warmerdam | |
---|---|---|---|
Priority: | high | Milestone: | |
Component: | OGR_SF | Version: | unspecified |
Severity: | minor | Keywords: | |
Cc: |
Description
In separating the 2D and 3D constructors, I have found the following problem: I am reading an S57 ENC file with the following record: OGRFeature(BCNLAT):1 RCID (Integer) = 2 PRIM (Integer) = 1 GRUP (Integer) = 2 OBJL (Integer) = 7 RVER (Integer) = 1 AGEN (Integer) = 550 FIDN (Integer) = 253485345 FIDS (Integer) = 1302 BCNSHP (Integer) = 4 CATLAM (Integer) = 2 COLOUR (String) = COLPAT (String) = (null) CONDTN (Integer) = (null) CONRAD (Integer) = (null) CONVIS (Integer) = (null) DATEND (String) = (null) DATSTA (String) = (null) ELEVAT (Real) = (null) HEIGHT (Real) = (null) MARSYS (Integer) = (null) NATCON (String) = (null) NOBJNM (String) = (null) OBJNAM (String) = Sakonnet Breakwater Light 2 PEREND (String) = (null) PERSTA (String) = (null) STATUS (String) = 1 VERACC (Real) = (null) VERDAT (Integer) = (null) VERLEN (Real) = (null) INFORM (String) = (null) NINFOM (String) = (null) NTXTDS (String) = (null) PICREP (String) = (null) SCAMAX (Integer) = (null) SCAMIN (Integer) = 120000 TXTDSC (String) = (null) RECDAT (String) = (null) RECIND (String) = (null) SORDAT (String) = 19570901 SORIND (String) = US,U1,reprt,NM 38/57 POINT (-71.19532300 41.46649200) In: void S57Reader::AssemblePointGeometry( DDFRecord * poFRecord, OGRFeature * poFeature ) { . . . poFeature->SetGeometryDirectly( new OGRPoint( dfX, dfY, dfZ ) ); } which calls the 3D constructor and makes: nCoordDimension = 3; Then in: OGRwkbGeometryType OGRPoint::getGeometryType() { if( nCoordDimension < 3 ) return wkbPoint; else return wkbPoint25D; } this returns the wkbPoint25D which is wrong.
Note:
See TracTickets
for help on using tickets.