[Qgis-developer] slow reading shp
Marco Hugentobler
marco at hugis.net
Tue Oct 20 10:37:42 EDT 2009
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.
cheers,
Marco
Program received signal SIGINT, Interrupt.
OGRLinearRing::isPointInRing (this=0x26fd9a0, poPoint=<value optimized out>,
bTestEnvelope=<value optimized out>) at ogrlinearring.cpp:485
485 const double y1 = getY(iPoint) - dfTestY;
(gdb) bt
#0 OGRLinearRing::isPointInRing (this=0x26fd9a0, poPoint=<value optimized
out>, bTestEnvelope=<value optimized out>) at ogrlinearring.cpp:485
#1 0x00007fb628e4cd53 in OGRGeometryFactory::organizePolygons
(papoPolygons=<value optimized out>, nPolygonCount=19587,
pbIsValidGeometry=0x7fff33eea2ec, papszOptions=<value optimized out>) at
ogrgeometryfactory.cpp:1115
#2 0x00007fb628e3a9df in SHPReadOGRObject (hSHP=<value optimized out>,
iShape=509) at shape2ogr.cpp:270
#3 0x00007fb628e3ab5f in SHPReadOGRFeature (hSHP=0x2134df0, hDBF=0x18b3070,
poDefn=0x270e6e0, iShape=509) at shape2ogr.cpp:836
#4 0x00007fb628e1c861 in OGRShapeLayer::GetNextFeature (this=0x273b550) at
ogrshapelayer.cpp:316
#5 0x00007fb616548992 in QgsOgrProvider::nextFeature (this=0x21d0de0,
feature=@0x7fff33eea680) at
/home/marco/src/qgis/src/providers/ogr/qgsogrprovider.cpp:444
Am Dienstag, 20. Oktober 2009 15.51:37 schrieb Giovanni Manghi:
> On Tue, 2009-10-20 at 15:47 +0200, Paolo Cavallini wrote:
> > On Tue, 20 Oct 2009 15:13:45 +0200, Marco Hugentobler <marco at hugis.net>
> >
> > wrote:
> > > Hi Paolo
> > >
> > > I reveive only empty feature collections from
> > > http://wms.pcn.minambiente.it/cgi-
> > > bin/mapserv.exe?map=/ms_ogc/wfs/comuni_wfs.map
> >
> > Anyway, it was just an example - it happens with any large shp. It would
> > be good if we could keep a test large shp for benchmark.
>
> This (big) shape for example
>
> http://www.iucnredlist.org/resources/spatial/mammals/cetartiodactyla_v12234
>00057.zip
>
> freezes qgis trunk.
>
>
> cheers
>
> -- Giovanni --
--
Dr. Marco Hugentobler
HUGIS - GIS programming and consulting
Webereistrasse 66
CH-8134 Adliswil
marco at hugis.net
http://homepage.hispeed.ch/hugis
More information about the Qgis-developer
mailing list