1

Using ArcGIS 10.1 and Python IDLE 2.7.2...

I'm trying to find the minimum value of a polyline with a raster layer and turn that LOCATION into a point. I put everything together in model builder, but the raster calculator doesn't like 32-bit floating points, which is what my DEM is. I tried to get around the raster calculator with the Con tool in python, but I believe an attribute table is required for this (which I don't have due to floating point). I could convert the DEM to integer and build one, but this is already a lengthy process that involves many scripts and tools and wanted to see if anyone else out there had any thoughts? I'm open to any anything, really, conversion of polyline to polygon, etc...attaching a screenshot of modelbuilder process that works, but I need a script as I am doing this 1000+ times.enter image description here

I can turn the polyline into a 3D feature and find the minimum value, but I don't know how to find WHERE that minimum value is. If I could locate it with XY coordinates, I can then generate the point.

Thoughts? If I'm wrong about the Con tool and my syntax is wrong, that would be awesome, so please feel free to suggest something. It finds where the min is along the polyline that has been converted to raster and where that min is within the DEM, thus returning a min pixel:

tempRas1 = Con(Raster(LG_DEM_0_tif == LG_0_Zonalmin_img), LG_DEM_0_tif)

2
  • 1
    try this (in arcpy): tempRas1 = Con(Raster(LG_DEM_0_tif) == Raster(LG_0_Zonalmin_img), LG_DEM_0_tif). In the raster calculator, you don't need to mention raster(), so Con(LG_DEM_0_tif == LG_0_Zonalmin_img , LG_DEM_0_tif) should work
    – radouxju
    Commented Apr 17, 2014 at 7:40
  • @radouxju, your syntax worked perfectly; just what I was looking for. Thank you!
    – Beardo
    Commented Apr 17, 2014 at 15:20

1 Answer 1

1

This is how I would do it:

  1. Convert your line to a raster (Polyline to Raster)
  2. Convert the raster to points (Raster to Point)
  3. Add Z value from the raster to the points (Extract Values to Points). A new field named RASTERVALU with the raster Z value is added.
  4. Turn the points into a feature layer and select the point with the minimum Z field value using for example Select Layer by Attributes and an expression like [RASTERVALU] in (SELECT min( [RASTERVALU] ) FROM points_Z). See here for more details on Select min/max values with Select By Attributes.
1
  • Thanks, @GISGe. If something breaks down the line, I may use this as a backup plan.
    – Beardo
    Commented Apr 17, 2014 at 15:31

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.