On 11-08-23 04:57 AM, Martin Landa wrote:
Hi,

I have tested speed of random access to PostGIS features with simple
testing application.

     // about 1e4 points
     poLayer = poDS->GetLayerByName("bridges");

     nfeatures = poLayer->GetFeatureCount();

     for (int fid = 1; fid<  nfeatures; fid++)
        poFeature = poLayer->GetFeature(fid);

Martin,

I agree with Even's comments about the speed.  I would just add that you
cannot generally assume that features id's are contiguous as is done above.
Also, you are missing feature "0" due to the bounds of your for loop.

Best regards,
--
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up   | Frank Warmerdam, warmer...@pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush    | Geospatial Programmer for Rent

_______________________________________________
gdal-dev mailing list
gdal-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/gdal-dev

Reply via email to