1

I have a vector contour data(polyline). I want to add values to each contour lines. Means I want to digitize my contour lines with proper values. Those values are with me in a paper. I'm adding those (z values) in the "id" column in the attribute table after selecting each line separately. it's taking a lot of time since there are around 20000 lines. Actually I created these contours after digitizing my raster map.(raster to vector conversion after scanning those maps)

Is there any way to add values automatically in between lines, if I select two extreme lines (contour is varying by an interval of 1 unit) or is it possible to create a GUI like that, or can I program like that in ArcMap 10.4?

I'm new to this.

enter image description here

I checked whether is there any pattern of change in "FID" of lines. But I couldn't find a common pattern. I'm adding my contour values to the "id" table.

  • Do your lines have a Z component? Depending on how they were created they may have correct Z values in which case you could calc !shape.z! (or was that !shape.firstPoint.z!) in ArcGIS as per your screen grab; other methods also exist for QGIS which you have tagged. – Michael Stimson Oct 31 at 5:09
  • 1
    It's not clear to me what you are asking. Are you asking how to create extra contour lines between your existing contour lines (at a smaller contour interval)? Or are you asking how to calculate values for a new/existing attribute (eg elevation) for your existing contour lines? Or something else? – Son of a Beach Oct 31 at 5:27
  • @SonofaBeach. I want to digitize my contour lines with proper values. Those values are with me in a paper. I'm adding those (z values) in the "id" column in the attribute table after selecting each line separately. it's taking a lot of time. – bibinwilson Oct 31 at 5:31
  • @MichaelStimson Can you suggest any arcgis or qgis method to solve this? I couldn't get to a proper solution. I even put an another question gis.stackexchange.com/questions/340315/… – bibinwilson Oct 31 at 15:36
2

In my earlier comment I said:

Try running a transect line across your contours and then doing an Intersect of that with your contours. If the resultant points preserve the order you want then you could iterate through them to select the contours (Select By Location) and update their values (Calculate Field or UpdateCursor). This would be easier to do with ArcPy but I think would be doable in ModelBuilder too.

To flesh that out a bit these are more detailed steps, but if you have trouble with any of them, then I think that specific step should be asked about in a new question.

  1. Create a new Line feature class and digitize into it a "transect" that crosses the contours that you want to update the attribute of. It can be a two or many point line.
  2. Intersect this line feature class with the contour feature class. This should create a point feature class, and I am hoping the feature IDs of those points will be in the order that they crossed the contours. If not, then this workflow will need to be re-thought.
  3. Add an attribute to the point feature class and calculate values into it that match what you want to put onto your contours.
  4. Iterate through the points in your point feature class and use each to Select Layer By Location on the contour feature class.
  5. Each point should select a different contour.
  6. Read the current point's attribute value and write it to the attribute of the only selected contour using Calculate Field.

If you wanted to get fancy you could use a Feature Set parameter on your tool to enable you to capture the transect line at the start of the tool.

I would be more comfortable doing all of the above using ArcPy, but I think it is all doable in ModelBuilder too.

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.