What feature classes to include in a Network Dataset?

2141
10
04-26-2010 09:58 AM
Highlighted
New Contributor
Hello, I have a question regarding what feature classes to include in a Network Dataset.

I know the feature classes in the feature dataset need to have some kind of time/distance as the cost/measure and they need to be edge sources.
I am just wondering if this is possible:
If I want to create a OD Cost Matrix analysis layer, all the data I have are the Lat/Long of points and the relationships between the origins and destinations.
1. I can use a road/street shape with a time/distance field
This is definitely plausible, my only problem is that this shape is too detailed (Is it possible to use a very simple road/street shape?)

2.Can I use a polyline shapefile and join it with a table that contains the relationships between the origins and destinations?

All I really want is just lines connecting points together, and I have an ArcEditor license.
Any help is greatly appreciated.
Tags (2)
Reply
0 Kudos
10 Replies
Highlighted
Esri Regular Contributor
If you have a set of point locations that you want to compute the OD distances/travel times and you are not
interested in the shape of the shortest paths, then use the OD Cost Matrix solver. For this you need a network
dataset that has a time attribute. If you do not have street data then I can suggest that you install the
free streetmap data that comes ont the Data and Maps DVD and use that.

Once you have the data installed, start ArcMap, add the street network to ArcMap, add you origin/destination
point feature class to ArcMap (if it is simply a table of Lat/Long's, then you can use the Add Data from XY
capabilities to turn that into feature class), create a new OD Cost Matrix layer, load the points as origins and
destinations and solve.

Regards,
Jay Sandhu
Reply
0 Kudos
Highlighted
New Contributor
Thanks for replying Jay.

That was the method I have been using.
I am curious if I can create a network dataset without any street data. Say, I have 4 points and I have their lat/long, all I want is the 6 straight lines between these 4 points.

Also, is there a way I can convert point to polyline?

Thanks,
Reply
0 Kudos
Highlighted
Esri Regular Contributor
>I am curious if I can create a network dataset without any street data. Say, I have 4 points and I have
>their lat/long, all I want is the 6 straight lines between these 4 points.

Technically you can create network dataset with no street data, just points. However it will be unuseable as it will only have some disconnected points. It is not going to generate any lines between them.
Also I am not sure how you would get 6 lines between 4 points.

>Also, is there a way I can convert point to polyline?

I am not sure how you can convert a point to a polyline, unless you want to create lines between sets of points.
In that case, take a look at the following script and modify as needed:

http://resources.arcgis.com/content/kbase?fa=articleShow&d=31879

Regards,
Jay Sandhu
Reply
0 Kudos
Highlighted
Esri Contributor


Also, is there a way I can convert point to polyline?


Along with the script that Jay mentioned, you can also see if this script tool, Convert Points To Line works for your data.

Hope this helps
Deelesh
Reply
0 Kudos
Highlighted
New Contributor
Thank you so much for your help, Jay and Deelesh!

I have another question though.
I am using OD Cost Matrix for my task and I find out once you load your locations into either origins and destinations, they are assigned new attributes, which have nothing in common with the original points.
I am just wondering is there any way I can keep some if not all attributes from the original point layer.
I know on the map, they are two separated layers, I am thinking I could use spatial join, but I am afraid it would not help much.
Reply
0 Kudos
Highlighted
Esri Regular Contributor
Thank you so much for your help, Jay and Deelesh!

I have another question though.
I am using OD Cost Matrix for my task and I find out once you load your locations into either origins and destinations, they are assigned new attributes, which have nothing in common with the original points.
I am just wondering is there any way I can keep some if not all attributes from the original point layer.
I know on the map, they are two separated layers, I am thinking I could use spatial join, but I am afraid it would not help much.


When you do a Load Locations, you have the option to map in some fields such as NAME. So you could map in a field to NAME and later use that to do a JOIN. However another thing you can do is after you create the OD Cost Matrix layer, open the attribute table of the Origins (or destinations) and Add Fields that you want to bring over from the original point layer. Now when you do a Load Locations, you will see your new fields listed on the analysis proprties and now you can map in these fields from the original point layer and load them as part of loading the point locations.

Regards,
Jay Sandhu
Reply
0 Kudos
Highlighted
New Contributor
Woo, thank you so much Jay!
Both methods worked!
Reply
0 Kudos
Highlighted
New Contributor
Hi Jay, I have a follow up question.

I notice that once I have created a OD Cost Matrix, in the attributes table of the lines, the OriginID and DestinationID does not carry over.
But I do find out in the OD Cost Matrix properties, under the Network Locations tab, that we can change the Candidate Fields in Network Location Field Mapping. I am just wondering is there any documentation that I can refer to if I want to customize my Lines JOIN?

Thanks!
Reply
0 Kudos
Highlighted
Esri Contributor
The OriginID field in the lines layer is related to the ObjectID field in Origins layer. Similarly the DestinationID field in lines is related to the ObjectID field in Destinations. So you can use attribute joins to transfer the necessary fields from Origins and Destinations to Lines.
If you have a ArcInfo license, you can use the Join Field geoprocessing tool.
For example, to transfer a field called "MyUniqueOriginID" from Origins to lines, use these parameter values asumming you have a layer named "OD Cost Matrix"

JoinField "OD Cost Matrix\Lines" OriginID "OD Cost Matrix\Origins" ObjectID MyUinqueOriginID

If you don't have an ArcInfo license, this has to be done in multiple steps

1) First add the necessary fields to the Lines layer
2) Join Origins to Lines using OriginID and ObjectID.
3) Calculate the new fields on Lines based on the Joined fields from Origins
4) Remove the join.

Hope this helps
Reply
0 Kudos