Network distance from multiple origin points to nearest highway

867
5
01-03-2012 10:55 AM
doca
by
New Contributor
Hi,
I need to calculate the distance from a number of census tract centroids (origin - which is a point shp file) to the nearest highways spread around the city (destination, a polyline shp file) using the street network as line class (in a third polyline shp file). (It's to calculate distance to the nearest highway from multiple origin points).

My destination (highways) are also part of the street network and identified by a field, so I can also use the same file (network) for both the route as well as the destination.

I have tried to set up OD cost matrix in Network Analyst but it requires the destination to be a point feature class (whereas in my case, it's a polyline, where the solution needs to find the shortest route using the street network). So, I'm really not sure how to go about this.

I've been told that it's a common feature to calculate network distance to highways, so I'm hoping that someone has already done this and know a way of doing it.

It'd be great if anyone can help with this.

Many thanks in advance!!
Tags (2)
0 Kudos
5 Replies
JaySandhu
Esri Regular Contributor
To get to a highway, which is a polyline, you have to get to the closest end of that line. The ends are point feature class and available in the system junction feature class that is automaically created when you create/build your own network dataset. So you could select all the highways and then select all the junctions that fall on them and use that as your destinations for finding the distance from multiple origins to the closes highway.

Jay Sandhu
0 Kudos
doca
by
New Contributor
Thanks and good point! But the problem is how I'd distinguish the junctions (that of highways) from that of the streets?

Actually (sorry for not clarifying earlier), I created the network dataset using the Streets files (It has different hierarchy of streets, such as local roads, main roads, highways etc). So the system junction feature class that's created by default has all junctions of all the streets. However, what I need is the junctions of the Highway feature class only. Does that mean I should create another network dataset using only the Highway polyline shape file (this is something I extracted for the main Streets file for another of my analyses)? 

Thanks again!
0 Kudos
JaySandhu
Esri Regular Contributor
As I mentioned previously:
"So you could select all the highways and then select all the junctions that fall on them and use that as your destinations"

In ArcMap, top level menu there is a Selection drop down that has the option to "Select by Attributes" and "Select by Location".

So add both the street and the junctions to Arcmap.

Use the "Select by Attributes" and select the streets of type highways from the streets attribute table.

Then use the "Select by Location" and do a spatial selection of selecting from the junctions that "intersect the source layer" of selected highways (click on the Use Selected features option).

Jay Sandhu
0 Kudos
doca
by
New Contributor
Hi,

Thanks for the tip. I tried it but the resultant file is a polyline, not a point feature class (as you might have guessed by now, I'm fairly new to this, and trying my best. Sorry for multiple questions).

Here's what I did:
Selected highways via Select by Attribute (using street("rte") table)
Then in Select by Location:
Selection method: select from the currently selected features in
Target layer: rte_ND_Junctions
Source layer: rte
Use selected features: checked
Spatial selection method: intersect the source layer

as I said the resultant selection is that from the rte layer (polyline file) and not the junctions that intersect with the polyline (highway) layer.

I also tried the inverse combination of source and target layer (may not make sense, but I tried) and still get the polyline layer as a result.

thanks in advance for helping again!
d
0 Kudos
JaySandhu
Esri Regular Contributor
You appear to be doing things correctly. That is, attribute selection on RTE and then spatial selection where the target is the rte_ND_Junctions and the source is the RTE with the "use selected features".

Make sure you clear selection before you start.

After the spatial selection, OPEN the rte_ND_Junctions attribute table and see what selections are on it.

That is, the result of selecting from target rte_ND_Junctions HAS to be in the rte_ND_Junctions attribute table. It CANNOT be polyline as it is a POINT feature class.

Jay Sandhu
0 Kudos