[Gdal-dev] importFromWkt() problem

Frank Warmerdam warmerdam at pobox.com
Sat Sep 2 11:25:04 EDT 2006


Petteri Packalen wrote:
> In the comment within the ogrgeometryfactory.cpp it states that 
> "createFromWkt() now updates pointer to text to indicate how much text 
> was consumed". I understand that this can be useful in many occasions 
> although I don't understand why it is implemented this way. 

Petteri,

Well, I do regret having implemented it this way.  At the time it seemed
like a good way to preserve the information about how much text was
consumed, but in retrospect that has not proven to be very useful, and
the interface is quite confusing and awkward.

 > Anyway, why
> the first solution does not work? In addition, in an example 1 the 
> problem occurres only after very many (>million) calls to 
> importFromWkt(). Something is happening in the background (related to 
> reference counting etc.?) I don't understand.

The code shown in both cases looks fine.  As Mateusz suggests, I'd guess
the problem lies in some of the code that is not shown.

Best regards,
-- 
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up   | Frank Warmerdam, warmerdam at pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush    | President OSGeo, http://osgeo.org




More information about the Gdal-dev mailing list