[gdal-dev] [driver geoconcept] how to manage polyline with thousand of coordinates

nicolas david ericnico.david at gmail.com
Thu Dec 2 08:35:25 EST 2010


hi list

I've encountered some issue with a *.gxt file and ogr2ogr.
This file contains only one geometry with more than 5000 intermediate
coordinates. It's goemtry type is polyline (format 2). The size of this
polyline is too big for the char buffer of the geoconcept driver. So I've
got a "Too many characters at line .. " error message.

I've tried ( naively) to increase the size of this char buffer in the
geoconcept.h file.
*************************************************************************
struct _GCExportFileH {
  char                  cache[kCacheSize_GCIO+1];
  char*                 path;
  ....
}

with first :
#define  kCacheSize_GCIO          65535
and then :
#define  kCacheSize_GCIO          262143
****************************************************************************

It compile 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 the
"Open_GCIO(_pszName,_pszExt,pszMode,_pszGCT)"  method works and all internal
values seems ok after the return assigment the hGXT member are no longer
correct ( memory seems corrupt).

I've solve this issue by splitting my polyline object on multiple polylines
objects. But I'll be very  grateful if someone could explain to me what's
wrong with increasing the char buffer size !

Nicolas David
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/gdal-dev/attachments/20101202/57762427/attachment.html


More information about the gdal-dev mailing list