Tell me more ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

I have ROAD (POLYLINE) Shape File with more than 400,000 Records. I am working on a code which goes like this:

  1. Loop through all Feature of the Shape File
  2. Take First Feature
  3. Find the LAST VERTEX of that feature. I get a POINT
  4. Query to FEATURE Layer all the POLYLINES Connected to that POINT and get back result in feature cusros
  5. Do some Process on returned feature of RESULT Cursor
  6. 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.
share|improve this question
 
Welcome to GIS.SE. Please read gis.stackexchange.com/help/formatting on how to format your questions correctly. –  Nathan W Jul 10 at 6:46
1  
I notice you mention shapefile, have you added a spatial index? This can significantly improve the performance for such types of processing. –  Hornbydd Jul 10 at 9:28
 
@Hornbydd, Yes. Spatial Indexes are created on Shape File. Step-4 is eating most of the time and making loop run very slowly. Any other suggestion ? –  user17345 Jul 18 at 9:35
add comment

Know someone who can answer? Share a link to this question via email, Google+, Twitter, or Facebook.

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.