Polyline to Raster - any way to set value preference

2439
11
02-07-2020 04:42 AM
JeffChartrand
New Contributor III

Hi,  I have a road feature class.  I want to change the vector lines to raster values.  Is there any easy way to specify cell value by preference at junctions?.  For example, Road type A with Road B at a T junction.  Some times it chooses to make the cell  Road Value A some time Road Value B.  Two junctions below.  Western junction takes value of Brown.  The Eastern junction takes value of Green.   For my use I want the cell to always take A value at junctions of A/B .

 

I am using Arcmap 10.6.1. Raster cell size is 1m.

0 Kudos
11 Replies
by Anonymous User
Not applicable

Hi Jeff

Are you still seeing this behavior at 10.7?

Can you confirm that you constructed your accumulative cost surface using as source the geometry in the upper right of your screenshot?

This thread may be helpful. In short, I recommend switching workflows like yours to using euclidean distance with barriers.

Regards,

-Jim TenBrink

0 Kudos
JeffChartrand
New Contributor III

Dear Jim,

We are still on 10.6.1 for next month or two at least.  Then moving to 10.7.1.  

I assume that the geometry is correct as it will work if I use a single destination or if I use a single destination selected in a feature file.   The files are all in gdb so the geometry is being updated with any changes.  My understanding is that Euclidean distance with barriers works with a homogeneous surface not with a heterogeneous impedance or friction surface. My cost surface treats each cell to a impedance or friction value.

This layer is being done in Projected coordinates British National Grid using OSGB36 and is in metres.

Cheers

Jeff

0 Kudos
by Anonymous User
Not applicable

HI Jeff

can you post data and precise steps to repro please?

You're correct: If you're using cost distance for more than just barriers, you can't switch to euc dist + barriers. At ArcGIS Pro 2.5, you can consider switching to Distance Accumulation.

Regards,

-jt

0 Kudos
JeffChartrand
New Contributor III

Dear Jim,

Okay please find attached a file geodatabase containing:

Hovercraft_base [single point vector feature - origin]

Travel_points [point vector feature with two points - destination]

Cost_surface_water [raster layer with two conditions - 1 or 3 [impedance layer]

Step 1:  Run Cost Path to produce Cost surface from point of origin, and corresponding backlink

Step 2: Run Cost Path or Cost Path as Polyline 

Input Raster or feature destination: Travel Points [no selection of points or both points selected]

Input cost distance raster: CostDist [product of Step1]

Input cost backlink raster: Cost_surface_water_blk  [product of Step1]

Output Raster: CostPath

Path Type: Each_Cell

Set Environment  Processing Extent to same as Cost_surface_water

Ok Environment settings

Ok to Cost Path Settings

Okay now it ran for raster output to both points [the other day neither worked so unsure why it worked today].

Repeat the same process for Cost_path to Poly and it produces only one line to second point in destination file.

Can not figure how to add file to this message so added to original.

Cheers

Jeff Chartrand

0 Kudos
JeffChartrand
New Contributor III

Dear Jim,

Tried to run the costpath tool with 4 destinations and a completely different data set.  Using same steps, but result is an error message as attached to original message.   It seems to freeze up for about 6 to 15 mins and then return an error message about memory. 

Our machines are Dell Precision 5910

Cheers

Jeff

0 Kudos
by Anonymous User
Not applicable

Hi Jeff

Unfortunately, i can't repro this. If you continue to experience this, please log an incident with esri tech support. They will be able to spend more time with you tracking this down. Also, please log an incident for the second problem that you've encountered.

Incidentally, here's what your output will look like at Pro 2.5, using the new 'Distance Accumulation' and 'Optimal Path As Line' Tools. The 2.5 output is in blue and the 10.6.1 output is in yellow.

You *might* be able to fix the worst of this distortion in the 10.6.1 version by trying the following (which I haven't tried yet): introduce a very slight 'towards shore' bias into your input cost raster as follows. Run euclidean distance from the island polygon. Transform the distance values from [0, max distance from island] to the ranges [0.999,  1.001], and [2.999 , 3.001]. Combine the transformed ranges based on the green mask shown above. Use the combined ranges as the input cost (friction) surface. That may get rid of the worst of the 'meandering' that can occur over sections of a constant valued input cost raster. Let me know.

Regards,

-jt

JeffChartrand
New Contributor III

Thanks for all your help.   ESRI UK have been out to our site a number of times to try and address some 'issues' we have on our network and we will feed back to them.  As you indicate it may be a site specific issue with our IT.  Hopefully when we move to 10.7.1 in the next months some of these problems will disappear.   Then we can start our planing regards ArcPro.

Best wishes,

Jeff Chartrand

0 Kudos
by Anonymous User
Not applicable

you're welcome. Do you see the same problem if you first rasterize your destination points using PointToRaster gp tool, then use the raster version as input to cost path as polyline?

Also, have you applied the 10.6.1 SA patch: ArcGIS (Desktop, Engine, Server) 10.6.1 Spatial Analyst Patch 

regards,

-jt

0 Kudos
JeffChartrand
New Contributor III

Hi have asked about the SA patch and am awaiting word.

Also tried the converting of the points from Vector to Raster  and it does the same hang up with memory error message.

Cheers,

Jeff

0 Kudos