Take the 2-minute tour ×
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 am looking for some examples/tutorials on how to apply a topology rule to only a selected portion of a shp file using a script in ArcGIS/GRASS.

Using ArcGIS seems to always require an interactive approach - with the topology editor able to highlight exeption and the user can mark them as exeptions. GRASS seems to have much less detailed topology editing capabilities compared to ArcGIS.

I would like to have a script that automatically fixes exceptions or not depending on something like an sql statement or the proximity of exceptions to another vector file. For example, I want to fix dangles in roads everywhere but downtown, because downtown they are purposeful but out of downtown they are mistakes.

share|improve this question
    
What exactly are you trying to accomplish after adding the "topology rules"? Identification of errors/exceptions? Maintain connections between features when editing? What type of features are you wanting to apply rules to (line-line, line-poly, poly-poly)? Answering those will help you get more focused answers that are more relevant to your use case and needs. –  RyanDalton Nov 15 '11 at 16:48

2 Answers 2

In GRASS GIS, you have two possibilities:

  • v.digit: interactive topological editor, very powerful (see also related Wiki page)
  • v.edit: programmable vector editing; you can work non-interactively and even in a spatial subset using for example a bounding box for selecting features.
share|improve this answer

See the following Answer.

For ArcGIS 9x

Export Topology Exceptions

This code will export Topology Error Exceptions to a feature class. This is useful when one needs to archive Exceptions. When the exceptions are exported to the feature class they can be treated just like any other feature (attribute update/notes, identify). Then Export to Shapefile for your other users.

Tip:Create a Button and call InitiateExport from the Click Event

Create features from ArcGIS Topology errors

share|improve this answer
    
Hey mappers - this is definitely a good start, but as far as I understand, the script you refer to does not do exactly what I would like. It is used primarly to archive where expections occured before the user goes back and manually changes them. I would like to have a script that automatically fixes exceptions or not depending on something like an sql statement or the proximity of exceptions to another vector file. For example, I want to fix dangles in roads everywhere but downtown, because downtown they are purposeful but out of downtown they are mistakes. –  GIStack Nov 15 '11 at 16:12
2  
@GIS Why don't you just extract the portion of the shapefile you want to work on, fix it up in any way you want, then merge it back? –  whuber Nov 15 '11 at 16:23
    
whuber - thats a very good point. somehow I was thinking that is something that should be able to be done within an editing session. Perhaps it may be possible (probably using ArcObjects?), but your workaround is just as good. I guess I can't really accept your comment as the answer but I would like to! –  GIStack Nov 18 '11 at 18:16

Your Answer

 
discard

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.