Create vector grid with diagonal connections

876
1
11-26-2012 06:45 AM
ScottStephenson
New Contributor
Hello all,

I am trying to convert a raster to a vector line grid for use in building a network dataset. The standard "raster to polyline" tool produces a grid with lines along the edges of each raster cell, but I also need diagonal connections across each cell in order for the network processing to work correctly.

One possible solution I considered, if it is not possible to directly convert a raster to a grid with these properties, is to create a "template" line grid, convert the raster to a polygon, and spatial-join the grid to the polygon so that each line in the grid picks up the correct attributes from the raster. Unfortunately I haven't found a way to create a "template" grid with diagonal connections.

I am aware that I can use cost path analysis to perform route-finding functions in the raster domain, but for this particular function I need to work within the vector domain.

Thank you very much for your help.

Scott
0 Kudos
1 Reply
ScottMurray
New Contributor
See the attached zip file for an example model to create a lattice from a raster. The method is to convert the raster to points, use generate near table to get the point pairs, then use point to line to create lines of the point pairs. The Generate Cost Distance Network model also computes the impedance value so that the network analyst solve route will give the same results as spatial analyst cost path.
0 Kudos