I have ROAD (POLYLINE) Shape File with more than 400,000 Records. I am working on a code which goes like this:
- Loop through all Feature of the Shape File
- Take First Feature
- Find the LAST VERTEX of that feature. I get a POINT
- Query to FEATURE Layer all the POLYLINES Connected to that POINT and get back result in feature cusros
- Do some Process on returned feature of RESULT Cursor
- Go to Step1 until Loop is not completed.
When I do STEP-4, it obviously take lot of time because, I create a BUFFER of Say 1 meter on that POINT and Make a spatial FILTER and Run LAYER.SEARCH QUERY on entire featurelayer using that SPATIAL FILTER. Everytime querying 400,000 records making it very slow.
Is there a better way to do this thing ?
- I have to use ArcObjects VBA.
- I do not want to Create NETWORK from the layer.