Paweł Byszewski wrote:
Hello,
I have some map in ShapeFile and I am using OGR to display it. I folow
the example od OGR website: OGR C++ API Read/Write Tutorial
<http://gdal.org/ogr/ogr_apitut.html>(http://gdal.org/ogr/ogr_apitut.html).
Unfortunately that way is very slow. I have map of whole country(only
roads) and even when I try to display onlu one big city and I set
spatial filter it takes very much times. Could you tell me if gdal/ogr
has oportunity to read big files in faster way?
Paweł,
I get the impression you have a very large shapefile and are only wanting
to draw a subarea. I would suggest you spatially index the file and use
the SetSpatialFilter() method to fetch only features in the area of interest.
There is some information on spatial indexing for shapefiles at:
http://www.gdal.org/ogr/drv_shapefile.html
Best regards,
--
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up | Frank Warmerdam, [email protected]
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
[email protected]
http://lists.osgeo.org/mailman/listinfo/gdal-dev