[GIS] Converting polylines to raster, assigning value of total length of lines within cell

arcgis-10.2arcgis-desktoplinerasterization

I have a polyline shapefile representing a road network. I want to rasterise this data, with the resulting values in the raster showing the total length of lines that fall within the raster cell, similar to this question: Convert line shapefile to raster, value=total length of lines within cell – however I wish to use ArcGIS 10.2. The data is projected so the units will be metres.

I have attempted to do this via the polyline to raster tool (however the value assigned is the length of the whole segment) and also some spatial analyst tools such as line density (which requires a radius). I'm sure I am missing an easy way to do it but I can't seem to find it.

Best Answer

A way of doing this is this:

  1. Create a vector grid using the fishnet tool to the required cell resolution.
  2. Run the intersect tool, this will cut up your road network and attach the polygon ID to the cut road segments.
  3. Run the summary statistics tool on your intersected data grouping by polygon ID and summing polyline length.
  4. Join the summary table back to the vector grid by the ID. This attaches the summed polyline lengths to the grid. Where there are no polylines you'll have null entries.
  5. Run the polygon to raster tool using the summed length field.
Related Question