Opened 13 years ago
Closed 9 years ago
#3859 closed enhancement (invalid)
[geoconcept driver] open gtx file with polyline containing thousands (>5000) coordinates
Reported by: | ndavid | Owned by: | dgrichard |
---|---|---|---|
Priority: | normal | Milestone: | |
Component: | OGR_SF | Version: | svn-trunk |
Severity: | normal | Keywords: | geoconcept polyline |
Cc: | didier.richard@… |
Description
The geoconcept drivers can't handle gtx file with object containing huge coordinats list due to the size of the char buffer used for reading line.
struct _GCExportFileH { char cache[kCacheSize_GCIO+1]; char* path; .... }
#define kCacheSize_GCIO 65535
if you change this buffer size :
#define kCacheSize_GCIO 262143
It compile fine and at the execution time the geoemtry line is readed but it leads to strange error on "OGRGeoconceptDataSource::LoadFile" method. More precisely on ligne 184 of ogrgeoconceptdatasource.cpp
if( (_hGXT= Open_GCIO(_pszName,_pszExt,pszMode,_pszGCT))==NULL ) { return FALSE; } /* Collect layers : */ GCExportFileMetadata* Meta= GetGCMeta_GCIO(_hGXT); if( Meta ) { int nC, iC, nS, iS; if( (nC= CountMetaTypes_GCIO(Meta))>0 ) {
the "Open_GCIO(_pszName,_pszExt,pszMode,_pszGCT)" method works and all internal values seems ok, but after the return assigment the hGXT member are no longer correct ( memory seems corrupt). Even with a gtx file with "normal" line size.
Attachments (2)
Change History (5)
by , 13 years ago
Attachment: | test_polyline_2865_coord.gxt added |
---|
by , 13 years ago
Attachment: | test_polyline_5427_coord.gxt added |
---|
file not working with normal char buffer size
comment:1 by , 13 years ago
I have made the change and run ogrinfo on both files :
$ ogrinfo -ro test_polyline_2865_coord.gxt GEOCONCEPT: filename 'test_polyline_2865_coord.gxt' - 'gxt' - mode 'rt' - config path '???' GEOCONCEPT: Type 'Stereopolis#-1' added. GEOCONCEPT: SubType 'Stereopolis.Trajectoire#-1' added. GEOCONCEPT: Field 'Stereopolis.Trajectoire@@Identifier#-1' added. GEOCONCEPT: Field 'Stereopolis.Trajectoire@@Class#-1' added. GEOCONCEPT: Field 'Stereopolis.Trajectoire@@Subclass#-1' added. GEOCONCEPT: Field 'Stereopolis.Trajectoire@@Name#-1' added. GEOCONCEPT: Field 'Stereopolis.Trajectoire@@NbFields#-1' added. GEOCONCEPT: Field 'Stereopolis.Trajectoire@IDSEL#-1' added. GEOCONCEPT: Field 'Stereopolis.Trajectoire@@X#-1' added. GEOCONCEPT: Field 'Stereopolis.Trajectoire@@Y#-1' added. GEOCONCEPT: Field 'Stereopolis.Trajectoire@@XP#-1' added. GEOCONCEPT: Field 'Stereopolis.Trajectoire@@YP#-1' added. GEOCONCEPT: Field 'Stereopolis.Trajectoire@@Graphics#-1' added. GEOCONCEPT: This SysCoord value: -1:-1 was translated to : GEOCONCEPT: Feature Type [Trajectoire] starts at #317, line 8 GEOCONCEPT: Metadata = ( nb Types : 1 Charset : ANSI Delimiter : 0x9 Unit : m Resolution : 0.1 Quoted-Text : no Format : absolute CoordSystemID : -1; TimeZoneValue : -1 ) GEOCONCEPT: Export =( Path : . Basename : test_polyline_2865_coord Extension : gxt Mode : READ Status : NONE ) GEOCONCEPT: nLayers=1 - last=[Stereopolis.Trajectoire] OGR: OGROpen(test_polyline_2865_coord.gxt/0x839f600) succeeded as Geoconcept. INFO: Open of `test_polyline_2865_coord.gxt' using driver `Geoconcept' successful. OGR: GetLayerCount() = 1 1: Stereopolis.Trajectoire (Line String) GEOCONCEPT: 1 features on layer Stereopolis.Trajectoire.
then :
ogrinfo -ro test_polyline_5427_coord.gxt GEOCONCEPT: filename 'test_polyline_5427_coord.gxt' - 'gxt' - mode 'rt' - config path '???' GEOCONCEPT: Type 'Stereopolis#-1' added. GEOCONCEPT: SubType 'Stereopolis.Trajectoire#-1' added. GEOCONCEPT: Field 'Stereopolis.Trajectoire@@Identifier#-1' added. GEOCONCEPT: Field 'Stereopolis.Trajectoire@@Class#-1' added. GEOCONCEPT: Field 'Stereopolis.Trajectoire@@Subclass#-1' added. GEOCONCEPT: Field 'Stereopolis.Trajectoire@@Name#-1' added. GEOCONCEPT: Field 'Stereopolis.Trajectoire@@NbFields#-1' added. GEOCONCEPT: Field 'Stereopolis.Trajectoire@IDSEL#-1' added. GEOCONCEPT: Field 'Stereopolis.Trajectoire@@X#-1' added. GEOCONCEPT: Field 'Stereopolis.Trajectoire@@Y#-1' added. GEOCONCEPT: Field 'Stereopolis.Trajectoire@@XP#-1' added. GEOCONCEPT: Field 'Stereopolis.Trajectoire@@YP#-1' added. GEOCONCEPT: Field 'Stereopolis.Trajectoire@@Graphics#-1' added. GEOCONCEPT: This SysCoord value: -1:-1 was translated to : GEOCONCEPT: Feature Type [Trajectoire] starts at #317, line 8 GEOCONCEPT: Metadata = ( nb Types : 1 Charset : ANSI Delimiter : 0x9 Unit : m Resolution : 0.1 Quoted-Text : no Format : absolute CoordSystemID : -1; TimeZoneValue : -1 ) GEOCONCEPT: Export =( Path : . Basename : test_polyline_5427_coord Extension : gxt Mode : READ Status : NONE ) GEOCONCEPT: nLayers=1 - last=[Stereopolis.Trajectoire] OGR: OGROpen(test_polyline_5427_coord.gxt/0x82fb600) succeeded as Geoconcept. INFO: Open of `test_polyline_5427_coord.gxt' using driver `Geoconcept' successful. OGR: GetLayerCount() = 1 1: Stereopolis.Trajectoire (Line String) GEOCONCEPT: 1 features on layer Stereopolis.Trajectoire.
So, for me everything seems ok.
The driver is also working if you add -al to ogrinfo : the Geoconcept file are correctly dumped.
Could you check on your side what is the ogrinfo's behavior ?
comment:2 by , 13 years ago
i've checked on my side. everything is ok. I've just need to make clean and remarke all gdal, and not only re-make only the geoconcept drivers. So error is mine.
comment:3 by , 9 years ago
Resolution: | → invalid |
---|---|
Status: | new → closed |
Notices 4 years ago that it was not a bug at all.
file working with normal char buffer size