Select to view content in your preferred language

Need help with creating multimodal network and error with Add GTFS to a Network Dataset Step 2.

3744
28
Jump to solution
04-26-2018 06:42 PM
DestinyKelley1
Occasional Contributor

I am a college student looking to create a multimodal network so that I can locate the best restaurants in the area within 5-7 minutes walking distance from my school and within 10-15 minutes of MTA public transportation. I downloaded the following data from http://transitfeeds.com/:


1. Metro-North Railroad GTFS 
2. MTA Manhattan GTFS 
3. NYC Bus Company GTFS 
4. NYC Subway GTFS
5. NYC Subway Supplemented GTFS

I also downloaded the NYC street data from the following source: 

https://data.cityofnewyork.us/City-Government/NYC-Street-Centerline-CSCL-/exjm-f27b/data

I created a geodatabase for these files under the feature dataset TransNet. I added the NYC street data to the dataset. I downloaded the "Add GTFS to a Network Dataset" tool to aid me in creating a multimodal network from this data above. The first step, "Generate transit lines and stops," was executed successfully in ArcCatalog 10.6 and added the two feature classes "TransitLines" and "Stops" to the feature dataset for all the GTFS files above I put into the tool. However, for step 2, "Generate Stop Street Connectors," the tool produced the following error at step 8 of 14 for the wheelchair portion:

Messages:
Executing: GenerateStop2StreetConnectors C:\Users\Leah\Downloads\HCBestRs18BU.gdb\TransNet C:\Users\Leah\Downloads\HCBestRs18BU.gdb\TransNet\NYCStreets # 40 Meters
Start Time: Thu Apr 26 20:50:29 2018
Running script GenerateStop2StreetConnectors...
Snapping stops to streets network...
Creating connector lines between stops and streets...
Handling wheelchair_boarding...
Creating vertices in streets at location of stops...
(This step might take a while.)
Failed to generate stop-street connectors.
Failed script GenerateStop2StreetConnectors...

Traceback (most recent call last):
File "c:\program files (x86)\arcgis\desktop10.6\ArcToolbox\Toolboxes\scripts\GenerateStop2StreetConnectors.py", line 289, in <module>
arcpy.management.Integrate([[outStreetsSplit, 1], [TempSnappedStops, 2]])
File "c:\program files (x86)\arcgis\desktop10.6\arcpy\arcpy\management.py", line 2128, in Integrate
raise e
ExecuteError: ERROR 999999: Error executing function.
Invalid Topology [Negative point valence.]
Failed to execute (Integrate).


Failed to execute (GenerateStop2StreetConnectors).
Failed at Thu Apr 26 21:11:26 2018 (Elapsed Time: 20 minutes 56 seconds)

I used the check geometry tool to make sure something wasn't wrong with the three feature classes now in the dataset, and only the NYC street data came back with short line segment errors. I used the repair geometry tool to get rid of them. Then, I ran the tool again and got the same error. I am at a loss on how to fix this. If it cannot be fixed, can I still use it to create my network? 

Thank you!

0 Kudos
28 Replies
MelindaMorang
Esri Regular Contributor

Since you got the FDO error with the negative number, it means that the transit evaluator did not "register" properly during installation, so probably there's nothing wrong with your gdb, and you don't need to share it.  We just need to figure out why installation didn't work properly.

Are you using the latest version of the Add GTFS to a Network Dataset toolbox (ie, downloaded within the last month or two)?  http://arcg.is/10jXez  If not, please get the latest and try reinstalling.

If so, try uninstalling (there should be an item in your Programs and Features Uninstall a Program thing).  Then try reinstalling.  When the installer finishes its business, expand the message window, right-click, and choose Copy, and then tell me what it says.  I'm guessing there's an error in there somewhere.

0 Kudos
DestinyKelley1
Occasional Contributor

I just uninstalled the tool, deleted the old folder, and downloaded the installer folder again directly from your link. I also reinstalled the tool and got the following:

Searching the registry for ArcMap installation folder...

ArcMap installation found at: C:\Program Files (x86)\ArcGIS\Desktop10.6\

Installing TransitEvaluator.dll and dependencies to: C:\Program Files (x86)\ArcGIS\Desktop10.6\ArcToolbox\Toolboxes\EvaluatorFiles

Output folder: C:\Program Files (x86)\ArcGIS\Desktop10.6\ArcToolbox\Toolboxes\EvaluatorFiles

Extract: ESRI.ArcGIS.ADF.Local.dll... 100%

Extract: ESRI.ArcGIS.CatalogUI.dll... 100%

Extract: ESRI.ArcGIS.Geodatabase.dll... 100%

Extract: ESRI.ArcGIS.NetworkAnalyst.dll... 100%

Extract: ESRI.ArcGIS.System.dll... 100%

Extract: ESRI.ArcGIS.Version.dll... 100%

Extract: TransitEvaluator.dll... 100%

Execute: "C:\Program Files (x86)\Common Files\ArcGIS\bin\ESRIRegAsm.exe" "C:\Program Files (x86)\ArcGIS\Desktop10.6\ArcToolbox\Toolboxes\EvaluatorFiles\TransitEvaluator.dll" /p:Desktop /s

Registration of TransitEvaluator.dll with ArcMap succeeded.

Installing additional binaries to: C:\Program Files (x86)\ArcGIS\Desktop10.6\ArcToolbox\Toolboxes\EvaluatorFiles

Extract: System.Data.SQLite.dll... 100%

Extract: GetEIDs.exe... 100%

Output folder: C:\Program Files (x86)\ArcGIS\Desktop10.6\ArcToolbox\Toolboxes\EvaluatorFiles\x64

Extract: SQLite.Interop.dll... 100%

Output folder: C:\Program Files (x86)\ArcGIS\Desktop10.6\ArcToolbox\Toolboxes\EvaluatorFiles\x86

Extract: SQLite.Interop.dll... 100%

Writing uninstallation information to the registry...

Installing documentation...

Output folder: C:\Users\Leah\Documents\ArcGIS\Downloaded Toolboxes\AddGTFStoaNetworkDataset\AddGTFStoaNetworkDataset

Extract: TroubleshootingGuide.html... 100%

Extract: TransitAnalysisTools_UsersGuide.html... 100%

Extract: AddGTFStoND_UsersGuide.html... 100%

Extract: TransitNetworkTemplate.xml... 100%

Output folder: C:\Users\Leah\Documents\ArcGIS\Downloaded Toolboxes\AddGTFStoaNetworkDataset\AddGTFStoaNetworkDataset\images

Extract: ConnectivityDiagram.png... 100%

Extract: Screenshot_AnalysisSettings_ExcludedSources.png... 100%

Extract: Screenshot_AnalysisSettings_ExcludeRoutes.png... 100%

Extract: Screenshot_AnalysisSettings_NetworkLocations.png... 100%

Extract: Screenshot_AnalysisSettings_SpecificDatesParameter.png... 100%

Extract: Screenshot_AnalysisSettings_TimeOfDay.png... 100%

Extract: Screenshot_Caching_Popup.png... 100%

Extract: Screenshot_CalculateAccessibilityMatrix_Dialog.png... 100%

Extract: Screenshot_CopyTraversedSourceFeaturesWithTransit_Dialog.png... 100%

Extract: Screenshot_GenerateStopStreetConnectors_Dialog.png... 100%

Extract: Screenshot_GenerateTransitLinesAndStops_Dialog.png... 100%

Extract: Screenshot_GetEIDs_Dialog.png... 100%

Extract: Screenshot_LayerEnableTime_10x.png... 100%

Extract: Screenshot_NDCreation_ConnectivityGroups.png... 100%

Extract: Screenshot_NDCreation_ConnectivityGroups_Override.png... 100%

Extract: Screenshot_NDCreation_Evaluators.png... 100%

Extract: Screenshot_NDCreation_NewAttribute.png... 100%

Extract: Screenshot_NDCreation_RestrictionFieldEvaluator.png... 100%

Extract: Screenshot_NDCreation_SourceFCs.png... 100%

Extract: Screenshot_PrepareTimeLapsePolygons_Dialog.png... 100%

Extract: Screenshot_Registration_Popup.png... 100%

Extract: Screenshot_TransitIdentify_Dialog.png... 100%

Installing doc shortcuts to: C:\ProgramData\Microsoft\Windows\Start Menu\Programs\ArcGIS\TransitTools

Create folder: C:\ProgramData\Microsoft\Windows\Start Menu\Programs\ArcGIS\TransitTools

Create shortcut: C:\ProgramData\Microsoft\Windows\Start Menu\Programs\ArcGIS\TransitTools\Public Transit Tools - Troubleshooting Guide.lnk

Create shortcut: C:\ProgramData\Microsoft\Windows\Start Menu\Programs\ArcGIS\TransitTools\Public Transit Tools - Users Guide.lnk

Create shortcut: C:\ProgramData\Microsoft\Windows\Start Menu\Programs\ArcGIS\TransitTools\Public Transit Tools - Add GTFS to Network Dataset Users Guide.lnk

Writing registry key for DocShortcutLocation:  C:\ProgramData\Microsoft\Windows\Start Menu\Programs\ArcGIS\TransitTools

Installing toolboxes and scripts to: C:\Program Files (x86)\ArcGIS\Desktop10.6\ArcToolbox\Toolboxes

Output folder: C:\Program Files (x86)\ArcGIS\Desktop10.6\ArcToolbox\Toolboxes

Extract: Add GTFS to network dataset.tbx... 100%

Extract: Transit Analysis Tools.tbx... 100%

Output folder: C:\Program Files (x86)\ArcGIS\Desktop10.6\ArcToolbox\Toolboxes\scripts

Extract: AnalysisHelpers.py... 100%

Extract: CalculateAccessibility.py... 100%

Extract: CopyTraversedSourceFeatures_wTransit.py... 100%

Extract: CreateTimeLapsePolygons.py... 100%

Extract: GenerateStop2StreetConnectors.py... 100%

Extract: GenerateStopPairs.py... 100%

Extract: GetEIDs.py... 100%

Extract: hms.py... 100%

Extract: sqlize_csv.py... 100%

Extract: TransitIdentify.py... 100%

Writing uninstaller...

Created uninstaller: C:\Users\Leah\Documents\ArcGIS\Downloaded Toolboxes\AddGTFStoaNetworkDataset\AddGTFStoaNetworkDataset\AddGTFStoaNetworkDataset_Uninstall.exe

Completed

Hope this helps!

0 Kudos
MelindaMorang
Esri Regular Contributor

That appears to have worked correctly.  Have you tested your network again yet?  Does it work now?

In case it's not working: Did you by any chance previously have a different version of ArcMap installed on this machine and an older version of the transit evaluator registered/installed with it?

DestinyKelley1
Occasional Contributor

I have recently upgraded to ArcMap 10.6 from ArcMap 10.5. I am uncertain if I had the tool installed on the older version. Like last time, the toolbox has not been automatically added to the default toolbox list on ArcCatalog after installation. I had to add the toolbox manually by creating a new one and specifying the location of the "AddGTFStoaNetworkDataset" toolbox. However, I just realized last time I didn't take the location of the install toolbox from the program files (x86), but instead took it from another folder. This may have caused the conflict. The network is now loading up in ArcMap 10.6 after I just did Step 3 with the tool to add the network EIDs. 

0 Kudos
MelindaMorang
Esri Regular Contributor

Yeah, this sort of thing was kind of messy before I implemented the installer (just under a year ago).  So, if you had an older version, it's not surprising that there were weird conflicts with the toolbox location and possibly the evaluator reference in the registry.  Sounds like you've got that part working, though.  Phew!

0 Kudos
DestinyKelley1
Occasional Contributor

So, now that I have the network, what method could I use to draw polygons that are within a 7 minute walk (one way) away from my school? I also need polygons that are within a 10 minute public transportation trip (one way) within my school as well. Once I have these polygons, I can start manually entering the restaurants that lie within them for later evaluation.

0 Kudos
MelindaMorang
Esri Regular Contributor

If you're unsure of how to run a Service Area analysis, I suggest you run through this tutorial: Exercise 5: Calculating service areas and creating an OD cost matrix—Help | ArcGIS Desktop 

Actually, this is a particularly good tutorial for you because it also covers the OD Cost Matrix analysis, which might be more appropriate for what you're trying to do.  I can't tell for sure what you're trying to do, but if you're trying to identify restaurants within a certain travel time of school, then using OD Cost Matrix is more appropriate than calculating a Service Area and then finding which restaurants fall inside the polygons.  OD is more exact.

I think what you're asking in part is how you do one analysis for just walking and another analysis for walk+transit.  One way to do this is to create a separate WalkTime attribute where transit lines are forbidden (just use -1 in both directions for the evaluator).  Or, if you turn the time of day off and just use your transit travel time attribute, it effectively does the same thing because the transit lines won't be used unless a time of day is specified.

0 Kudos
DestinyKelley1
Occasional Contributor

I projected the features to GCS_WGS_1984 in the network using the "Define Projection" tool so it would fit a street basemap that uses the same coordinate system. I also set the data frame to GCS_WGS_1984. I got the following result:

According to the basemap, a stop was incorrectly connected to 62nd street rather than 59th street (I used the identify tool on the stop point to make sure). Would the basemap be accurate, or should I ignore the basemap locations? If the basemap is correct, I will have to redo the network. I can manually move the stop (along with any other misplaced features) with the editor toolbar before the network is built after Step 2, correct? I was going to place the restaurants with the editor tool using the basemap once I have my service area polygons surrounding the school, but if it is not accurate, I could place the restaurants by using their geo-coordinate locations instead.

My other concern is that the "Streets_UseThisOne" appear to be triangular. Is this correct? This is my first time building my own network, so I am uncertain. I think that I should avoid messing with the transit lines as they are underground and don't always align to the streets. 

Thank you for all of your help!

0 Kudos
MelindaMorang
Esri Regular Contributor

Okay, there's a lot of stuff going on here.  Let's try to break it down into little pieces.

1) Streets_UseThisOne: This feature class is just a copy of whatever original street features you put in in Step 2, with some vertices added.  So, what you need to do is to find a reliable feature class of streets for your area of interest.  If your original streets were junk, then Streets_UseThisOne will be junk, and your analysis won't be very good.  You might be able to find some good street data from the City or other sources, or you could download OpenStreetMap data (which often needs to be cleaned up a little to make sure everything is well connected).

2) Transit lines don't follow the streets: That's correct.  They're not supposed to.  The TransitLines represent straight-line connections between directly-connected stops and do not attempt to mimic the actual geometry of the routes.  So, don't worry about this.

3) Stops not connected to the correct streets: Unfortunately, this is a common problem.  The GTFS data contains a simple lat/lon value for each stop and my Step 1 tool just sticks a point in that location.  Step 2 has to snap the stop to a street feature so that the transit stuff will be adequately connected to the streets.  I have no information to work with besides the lat/lon of the stop, so it just snaps to the closest street feature.  Sometimes this isn't the actual street where the stop is located but is instead a side street.  Sometimes this is because the original lat/lon was a bit off, and sometimes it's because the side streets are narrower than the main street, so the stop just falls closer to the side street's centerline.  You CAN edit the transit stops and lines after running Step 1, but you have to make sure that the transit lines still connect to the stops.  What might be easier is to download the Edit GTFS Stop Locations tool, update stop locations that way, and then start your network dataset creation process over again with the updated GTFS stops.txt file.  But that could be a lot of work.

I don't quite follow what you're talking about regarding the basemap.  Hopefully the basemap is accurate, but I can't be completely sure.  It might also show station entrance locations (any given station could have several), and GTFS doesn't always have the entrance locations, unfortunately.

4) I don't follow what you're talking about regarding the restaurants.

DestinyKelley1
Occasional Contributor
Hi Melinda,
I tried to use a service area polygon to find the time (10 minutes) that can be traveled from my college using MTA public transportation according to the network I created. 
Here is what I put for the analysis settings of the service area layer:
I get the following result after clicking the solve button:
This cannot be correct. This encompasses the entire network! What could be going wrong here? I am at a complete loss. Thank you for all of help.
0 Kudos