3

I have raster file of line segment. I need to convert it to line and get the distance of that line. How can i do using Python and ArcGIS 10? I have tried with GIS tools Convert Raster to Polyline but the line segment is not straight and it is divided into no of segments, isn't it possible to get single line segment.

enter image description here

I have attached herewith pictures. My problem is to find out the width of dam. For that I have drawn cross section at a regular interval along the stream. I have also shown how I will find out the width.. If you have any suggestion please provide me. And talking about my problem, after raster analysis of taking the difference of two raster. I have a raster segment shown in right side of picture. I tried to Convert Raster to Polyline but line is not straight and break into several segment. I need to have one line segment which is straight.

5
  • Could you post a screenshot so we have a better understanding of the problem?
    – Aaron
    Commented May 26, 2013 at 14:48
  • 1
    I have attached picture for the better understanding of my problem. Please provide me some guidance in this matter.
    – Ja Geo
    Commented May 26, 2013 at 15:43
  • How is the image to the right flawed? To me it appears as if Raster to Line worked properly. Could you also please define "...it is divided into no of segments..."? Thanks for the clarifications
    – Aaron
    Commented May 26, 2013 at 16:00
  • When I convert raster into Polyline. It is converted into several segments with short distances. Is it possible to make only one segment so that I can get width directly ?
    – Ja Geo
    Commented May 26, 2013 at 16:10
  • 2
    Why not just apply the ruler tool to read off the length(s)? If you need an automated solution, it's often more reliable to convert the shape to a polygon, compute its centerline, and obtain that length.
    – whuber
    Commented Jun 12, 2013 at 15:56

1 Answer 1

2

If you want a programmatic solution, you could use arcpy.sa.Thin and then RasterToPolyline.

I think @whuber has the easiest solution for one time tasks with the measure tool.

Found a few things on the centerline from a polygon idea (e.g., http://resources.arcgis.com/en/help/main/10.1/index.html#//010n00000019000000), but still sounds kind of involved.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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