Opened 9 years ago
Closed 8 years ago
#6357 closed defect (fixed)
SXF Fixes
Reported by: | warmerdam | Owned by: | warmerdam |
---|---|---|---|
Priority: | normal | Milestone: | |
Component: | OGR_SF | Version: | unspecified |
Severity: | normal | Keywords: | SXF |
Cc: | bishop, alexey |
Description
Transcribed from gdal-dev-owner:
some time ago jratike80 recommended send mail to gdal-dev http://trac.osgeo.org/gdal/ticket/5647 i am writing: From: Alexey ILchenko <lexa.ilc@…> To: gdal-dev@… Cc: Date: Mon, 8 Feb 2016 01:14:20 +0300 Subject: SXF Driver Hi all. I think i found some bugs on SXF driver. Check, please.
1)error on index in file ogrsxfdatasource.cpp line 620 and 687 "switch (anData[5])" replace "switch (anData[4])"
2)error in conversion multy part line. in this time they converted on point or one line. examle: "----- ----- -----" -> "." or "----" its not save all geometry
3)if RSC file has no description layer description of objects, all layers after this layer will be removed. why, because y save all object in additional layer:
ogrsxfdatasource.cpp: 1269 papoLayers = (OGRLayer**)CPLRealloc(papoLayers, sizeof(OGRLayer*)* (nLayers + 1)); 1270 papoLayers[nLayers] = new OGRSXFLayer(fpSXF, &hIOMutex, 255, CPLString("Not_Classified"), oSXFPassport.version, oSXFPassport.stMapDescription); 1271 nLayers++; ogrsxflayer.cpp: "127int OGRSXFLayer::AddRecord(long nFID, unsigned nClassCode, vsi_l_offset nOffset, bool bHasSemantic, size_t nSemanticsSize) 128{ 129 if (mnClassificators.empty() || mnClassificators.find(nClassCode) != mnClassificators.end())"
if the empty layer not last will be bad.
4) i think y can add epsg:4326 if (iEllips == 9 && iProjSys == 33) and anData[4]=65 and adfParams[i]=0
Attachments (2)
Change History (9)
comment:1 by , 9 years ago
Cc: | added |
---|
comment:2 by , 9 years ago
comment:3 by , 9 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Fixed in r33512 The 2 and 3 need some samples to reproduce the bug. If files will be provided, please reopen ticket.
follow-up: 5 comment:4 by , 9 years ago
It looks to me that the following lines will leak memory since pszRecoded is assigned previously with CPLRecode or CPLStrdup. Also, minor note, CPLStrnlen(pszRecoded, 255) == 0 could be written more simply (and efficiently) as pszRecoded[0] != 0.
if(CPLStrnlen(pszRecoded, 255) == 0) pszRecoded = CPLStrdup("Unnamed");
comment:6 by , 9 years ago
Resolution: | fixed |
---|---|
Status: | closed → reopened |
2)problem with geometry metric text lable 3)objects going from layer "signature" to layer "direct"
comment:7 by , 8 years ago
Resolution: | → fixed |
---|---|
Status: | reopened → closed |
Fix in r34024.
Several notes about problem 2:
- The problem geometries in test file (fordebug.sxf) are not multi part line, but multi part text. I added support for such geometries. But this is not error, just new functionality.
- The mentioned "incorrect conversion" line to point is correct. According to specification (see. http://gistoolkit.ru/download/doc/sxf4bin.pdf page 17) code xххх0100 is vector POINT object wich has 2 coordinates. First coordinate is anchor, and second - for direction. GDAL create feature with point geometry and add direction to the ANGLE field. This is useful for rotating point symbols according the ANGLE value in most GIS programs.
Can you provide test sxf + rsc for 2) and 3) to reproduce the bug?