2

I have a dataset with contours. Depression contours are separate of the normal contours and need to be digitized counter-clockwise. Still, there are usually some faulty ones with wrong direction and manually going through thousands of them is painful. I learned that it is possible to convert the contour lines to polygons and back to lines again since arcgis polygons outer edge is always digitized clock-wise - then I just reversed all the lines. Unfortunately, if I have several contours inside each other it creates polygons with holes and hole edge is always digitized counter-clockwise. Now if I convert the polygons to lines and reverse them all the holes are with wrong direction.

Is there a way to create polygons of each closed contourline without it creating a hole if there is a smaller contour inside? Or is there a possibility to somehow differentiate between lines that are the outer edge of the polygon and which have been the hole edge so I can only switch the direction of the outer ones?

Or maybe there is an even simpler solution in finding depression contours that are digitized in clock-wise movement and only flip them around?

If it can be done in some other software that keeps the elevation data, you can suggest that also.

  • 1
    With which version and license level of ArcGIS do you work? – GISGe Feb 17 '15 at 10:38
  • Is it creating multipart polygons (shape within hole within shape) or is it polygon, hole, new polygon inside that hole? You might look at the Eliminate Polygon Part tool (Advanced only) to see if it would help. You might also be able to use Buffer with a distance of zero to create solid polygons without holes (either on the lines with the correct side option or on the polygons). This question may also have some relevant information to select/flip appropriate rings. – Chris W Feb 17 '15 at 21:53
  • Related information at gis.stackexchange.com/questions/27255 – Chris W Feb 17 '15 at 22:00
2

With ArcGIS for Desktop Advanced, you could

1

If GISGe's solution works, I'd go for it. Nevertheless, if you still need a solution to remove the holes from polygons, you can just run the union tool and unselect the "gaps allowed" checkbox.

  • Doing this would theoretically fill in the holes with new polygons. However you're still left with the same problem as before, because you now have two lines for each contour - one in the correct direction (the outer ring of the inner shape) and one in the incorrect direction (the inner ring of the outer shape). How would you then select the correct line to keep or flip once you go back to lines? You might be able to address this with Eliminate Part, but your solution would need more steps to completely solve the problem. – Chris W Feb 17 '15 at 21:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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