Network dataset in GCS North America 1983

454
6
08-23-2011 09:14 AM
JoannaLaroussi
New Contributor
I would like to build a street network dataset for routing purpose from data included on media kit ArcGIS 9.3. I try to use streets feature class, which is in GCS North America 1983. I hardly found any metadata and I assume that Speed field defines values in miles per hour, and Shape Length in degrees. I need two directions attributes??? distance and time. In a network wizard I used Shape (value created by a network) as distance evaluator field and Shape /Speed as time evaluator. I checked the results and distance looks all right, but time value does not make sense at all. I thought that this is problem with units and tried Shape/(Speed*26.8224) to change miles per hour to meters per minute, but still is does not return any reasonable result. I know I am missing something, but I can???t see what. Does anybody used successfully this dataset to build a network?
Tags (2)
0 Kudos
6 Replies
JaySandhu
Esri Regular Contributor
The street data in SDC format already has a network dataset build and ready to route. Can you use that directly?
Jay Sandhu
0 Kudos
JoannaLaroussi
New Contributor
The street data in SDC format already has a network dataset build and ready to route. Can you use that directly?
Jay Sandhu


Thank you for your suggestion. Unfortunately attributes included in a network dataset do not work for me and there are read only, so I cannot modify them or even see used evaluators. I need to construct my own network dataset from a subset of streets, with distance and time attributes. Do you know or can you suggest what evaluators can work to calculate distance and time attributes?
0 Kudos
JaySandhu
Esri Regular Contributor
Open the attribute table of the streets and add two fields type double called something line Length and Time.
Then right-click on the Length and bring up the Field Calculator. Make sure to click on the PYTHON (not VBScript)
and type this formula with the exclaimation signs:
!Shape.Length@miles!

and click ok. This will compute the shape length in miles for each edge and put the value in for that field.

Now you need to convert this meters lenght into travel time in minutes. The speed is in Miles per hour.
So knowing that their are 60 minuets in an hour, bring up the field calculator for the Time field and type this formula
[Length] / [SPEED] * 60.0
Click ok. Note the length and speed are the existing fields in your data.
Now you should have the length in miles and travel time in minutes that you can use as evaluators.

Regards,
Jay Sandhu
0 Kudos
JoannaLaroussi
New Contributor
I tried your Python formula:

!Shape.Length@miles! And received an error: <type �??exceptions.SyntaxError�??>:invalid syntax(<string>, line1), ERROR 00539:error running expression 0.105649822848036

I also tried:
!Shape_Length@miles! error:Invalid field Shape_Lenght@miles
!Shape!Lenght@miles error: ERROR 00539:error running expression: GPVARIANTOBJECT0Lenght@miles
!Shape!Lenght@miles! error: ERROR 00539:error running expression: GPVARIANTOBJECT0Lenght@miles
!Shape.Length!@miles  error: ERROR 00539:error running expression: 1.52909253060023E03@miles

I am using data from 9.3, but I have installed ArcGIS 10 on my desktop. Would be possible that this Python formula works only for ArcGIS 9.3?
0 Kudos
JaySandhu
Esri Regular Contributor
Get the SP2 for 10 and then the python formula will work.
Or you can do the following:
Add your streets to ArcMap, then set the data frame property and choose an appropriate projection to display the data. Now open the attribute table, click on the newly added Miles field, right-click and choose "Calculate Geometry". Pick "Length" in the property and Miles for the units and make sure the Use Coordinate system of the data frame is checked on. Click Ok and it will fill in the projected length in miles for that field.

Jay Sandhu
0 Kudos
JoannaLaroussi
New Contributor
You were right about SP2: I installed it and finally was able to calculate Length. Thank you for all your help!
0 Kudos