[Qgis-developer] slow reading shp

Frank Warmerdam warmerdam at pobox.com
Tue Oct 20 11:59:23 EDT 2009


Paolo Cavallini wrote:
> On Tue, 20 Oct 2009 16:37:42 +0200, Marco Hugentobler <marco at hugis.net>
> wrote:
>> Hi Giovanni
>>
>> It seems this is caused by the OGR library. Interrupting QGIS a few times
>> with 
>> the debugger gives that the program spends much time in the function 
>> OGRLinearRing::isPointInRing (see debugger backtrace below).
>>
>> Probably something you could report to the GDAL/OGR project.
> 
> Good to know - however, it seems that other programs, also using OGR, do
> not have the same problem (maybe we should test, eg udig or gvsig?).
> All the best.

Folks,

It sounds like this is the code in OGR's shapefile driver for reading
polgyon rings and correctly assigning them as inner, or outer rings
and for which component of a multipolygon.

For some complex polygon files this can become quite expensive.

Depending on the version of OGR it may be possible to define
OGR_ORGANIZE_POLYGONS in the environment with the value SKIP to avoid
this work.  I'd appreciate your testing this to confirm this is the issue.

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    | Geospatial Programmer for Rent



More information about the Qgis-developer mailing list