Changes between Version 3 and Version 4 of CPTMS
- Timestamp:
- 02/22/2019 11:48:25 AM (7 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
CPTMS
v3 v4 15 15 In the selection boxes at the top specify "Type: Station Metadata" and desired district number, then click Submit. 16 16 17 The report page which appears shows two columns, Field Specification and Available Files. The former describes what is in each field of the data file. In the Available Files column select the most recently dated file. Download and save to your local computer as `d05_pm_vds_all.csv` (changing the extension from ".txt" to ".csv"). (For this exercise we'll pretend to be working with District 5 and name the files accordingly).17 The report page which appears shows two columns, Field Specification and Available Files. The former describes what is in each field of the data file. In the Available Files column select the most recently dated file. Download and save to your local computer as `d05_pm_vds_all.csv` (changing the extension from ".txt" to ".csv"). (For this exercise we'll pretend to be working with District 5 and name the files accordingly). 18 18 19 19 Open the file in Libre Office Calc (or other spreadsheet). Delete unneeded columns, retaining: Fwy, Dir, State_PM, Latitude, Longitude, and Name. Save as .csv. Open in a text editor and remove the first row containing column headers. Also remove quotation marks. … … 30 30 Open "`prep_postmiles.py`" in a text editor and modify the name of the postmileFile string to be the name of your file. 31 31 32 Run it: 32 Run it: 33 33 34 34 {{{ 35 35 python prep_postmiles.py 36 36 }}} 37 38 37 Observe output, correct any bad data in the file that causes the program to crash. 39 38 40 When done, run it and redirect output to a new file: 39 When done, run it and redirect output to a new file: 41 40 42 41 {{{ 43 42 python prep_postmiles.py > d12_postmile_prepped.csv 44 43 }}} 44 Run the csv to json converter: 45 45 46 Run the csv to json converter:47 46 {{{ 48 47 ./convertCSVtoJSON.bash d12_postmile_prepped.csv > highways.json 49 48 }}} 50 51 Edit the json file to remove an extraneous comma after the last feature. The last three lines should appear as: 49 Edit the json file to remove an extraneous comma after the last feature. The last three lines should appear as: 52 50 53 51 {{{ … … 56 54 } 57 55 }}} 58 59 60 56 Make a copy the STMS html file, and open it in a text editor. Specify the correct center location for the target district. 61 57 … … 63 59 var centerPoint = {lat: 33.687228, lng: -117.872148}; 64 60 }}} 65 66 61 Load the STMS html file into a browser and observe the results. 67 62 68 Use unix "cut" to remove the last column of the csv file and copy it to TMC config folder. 63 Use unix "cut" to remove the last column of the csv file. 64 69 65 {{{ 70 66 cut -f1-6 -d"," d12_postmile_prepped.csv > postmile_coords.txt 71 67 }}} 68 69 Move postmile_coords.txt to the TMC config folder. 70 71 {{{ 72 mv postmile_coords.txt trunk/config/vds_data 73 }}} 74
