>The TAB datasets (specifically the .map file) contains a spatial index. >The MITAB C API doesn't provide any way to use it, but through the C++ >classes, you can use the OGRLayer::SetSpatialFilter() method:
Thanks Daniel, I tried this with the area I'm viewing and it has reduced the amount of features, which is great. Is it possible to use SetSpatialFilter to dynamically filter the features I require as part of a map renderer? i.e. would this be feasible from a performance perspective? Thanks again for your quick reply. Tim -----Original Message----- From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of Daniel Morissette Sent: 05 June 2006 17:28 To: [email protected] Subject: Re: [mitab] Locating features in a particular area scumhampton wrote: > Hi, > > I have to say I'm really impressed with mitab. > > I'm creating my own map renderer - much like MapX. Primarily I will > use Navteq Street data. > Maybe you should have a look at MapServer (http://mapserver.gis.umn.edu/), it does exactly that and much more, and it uses the MITAB library (part of GDAL/OGR) to access MapInfo TAB files directly. > The problem I have is with large data sets. Currently my application > loads an entire layer into ram at the start (e.g. minor roads). This > is not a problem for Luxembourg, but when I load the whole of Europe > into ram, as you can imagine, things start to become an issue. > > I know loading all the data at once is not the right thing to do - I > only need to load the area that I am currenly displaying. But how? > How do I find the ID of the features that should be displayed? I > guess I need some sort of geospatial look-up table. How does MapInfo > do it - it must load from the file dynamically as you pan. Is this > possible with mitab - or would I need to create my own special look- > up table? > The TAB datasets (specifically the .map file) contains a spatial index. The MITAB C API doesn't provide any way to use it, but through the C++ classes, you can use the OGRLayer::SetSpatialFilter() method: http://ogr.maptools.org/classOGRLayer.html#a3 Daniel -- Daniel Morissette http://www.mapgears.com/ Yahoo! Groups Links ______________________________________________________________________ This email has been scanned by the MessageLabs Email Security System. For more information please visit http://www.messagelabs.com/email ______________________________________________________________________ ------------------------ Yahoo! Groups Sponsor --------------------~--> You can search right from your browser? It's easy and it's free. See how. http://us.click.yahoo.com/_7bhrC/NGxNAA/yQLSAA/dkFolB/TM --------------------------------------------------------------------~-> Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/mitab/ <*> To unsubscribe from this group, send an email to: [EMAIL PROTECTED] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
