Please disregard my message however for anyone who wants to know or who has
the same problem I was having this is what the problem was. 

When I Spatially filtered I tried to use GetFeatureRef(indx) to return the
four features I was getting in a loop. However it appears that the actual
TABFile index order is preserved so I was returning the first four items in
the tabfile even though I had placed a filter. 

In order to get the filter to work you must use the GetNextFeature method
instead. Then it correctly returns the features which are within the
filtered area.

Hopefully this will maybe help other people given the lack of documentation
on the C++ API's in MITAB.
Thanks,
Andy

-----Original Message-----
From: Canfield, Andrew 
Sent: Friday, September 10, 2004 12:52 PM
To: '[EMAIL PROTECTED]'
Subject: [mitab] Bug in SetSpatialFilter or am I just not doing it
right?


I am setting a spatial filter as Frank suggested in response to my earlier
post. I am setting it with an OGRLineString that has five points in it. 

However the features it's returning are 36,000 feet outside of the bounds
that I set for the spatial filter. 

I checked the points I am passing to the OGRLineString setPoints method.
They are correct and when I do a GetSpatialFilter the feature returned has
the correct points just as I passed them in. 

However the features being returned aren't anywhere close to those points. I
opened the table in MapInfo and retrieved the points of the features being
returned and they are, like I said 36,000 feet from the points I passed into
the filter. 

I also checked to ensure the points I am passing into the filter are in the
same projection and Datum as the table itself. They are correctly projected.

Has anyone else had this problem? Or is there something common I might be
doing wrong?
Thanks,
Andy







 
Yahoo! Groups Links



 



------------------------ Yahoo! Groups Sponsor --------------------~--> 
$9.95 domain names from Yahoo!. Register anything.
http://us.click.yahoo.com/J8kdrA/y20IAA/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/
 

Reply via email to