Preprocess Buffers Invalid Topology Error

232
2
Jump to solution
05-28-2021 06:58 AM
RussellProvost1
New Contributor III

@MelindaMorang,  

Good morning and happy Friday. I have a very large regional GTFS file that I obtained directly from Washington Metropolitan Area Transit Authority (WMATA). It is the same GTFS file that runs their online trip planner. It combines all of the regional transit agencies into one large GTFS file.

I am attempting to create a transit coverage map for Montgomery County Maryland using the better bus buffers tool. This is actually a very important analyses as it is part of our transportation monitoring efforts. After 3.5 days of processing the "Preprocess Buffers" tool ended with an "Invalid Topology" error (see below). Could this be an issue of having run the process in a map with Maryland State Plane, but the GTFS station locations being represented in Lat/Long? Could it be a function of a station being located outside the extend of my network (I downloaded and processed OSM data for the entire Washington/Baltimore DC region so most stations should be covered)? I only need transit information for inside Montgomery County, so I was thinking of ways to trim the GTFS file so that it only contains stops in Montgomery County. Any advice on this potential strategy? Thanks for your help.

 

Step 1 - Preprocess Buffers
=====================
Parameters

Output directory C:\Users\Russell.Provost\OneDrive - The Maryland-National Capital Park and Planning Commission\Data\2020MAR\Transit\GTFSForBetterBusBuffers
Name for output geodatabase (created when the tool is run) BetterBussBuffers
SQL database of preprocessed GTFS data C:\Users\Russell.Provost\OneDrive - The Maryland-National Capital Park and Planning Commission\Data\2020MAR\Transit\GTFSForBetterBusBuffers\BetterBusBuffers.sql
Network dataset C:\Users\Russell.Provost\OneDrive - The Maryland-National Capital Park and Planning Commission\Data\2020MAR\Transit\GTFSForBetterBusBuffers\Network.gdb\Network\TransitNetwork_ND
Impedance attribute (Choose one that works for pedestrians.) Length (Units: Miles)
Buffer size (in the same units as your impedance attribute) 0.25
Network restrictions (Choose ones appropriate for pedestrians.)
Polygon trim (in meters) (Enter -1 for no trim.) 20



=====================
Messages

Start Time: Thursday, May 20, 2021 4:54:59 PM
Creating a feature class of GTFS stops...
Creating service areas around stops...
(This step will take a while for large networks.)
Reformatting polygons for further analysis...
(This step will take a while for large networks.)
Error post-processing polygons
Failed to create BetterBusBuffers polygons.
Traceback (most recent call last):
File "<string>", line 484, in execute
File "C:\Users\Russell.Provost\OneDrive - The Maryland-National Capital Park and Planning Commission\Data\2020MAR\Transit\Tools\BetterBusBuffers_0.14.0.0\BBB_Polygons_Step1.py", line 133, in runTool
arcpy.management.FeatureToPolygon(polygons, FlatPolys, clusTol, "", dummypoints)
File "C:\Program Files\ArcGIS\Pro\Resources\ArcPy\arcpy\management.py", line 4057, in FeatureToPolygon
raise e
File "C:\Program Files\ArcGIS\Pro\Resources\ArcPy\arcpy\management.py", line 4054, in FeatureToPolygon
retval = convertArcObjectToPythonObject(gp.FeatureToPolygon_management(*gp_fixargs((in_features, out_feature_class, cluster_tolerance, attributes, label_features), True)))
File "C:\Program Files\ArcGIS\Pro\Resources\ArcPy\arcpy\geoprocessing\_base.py", line 512, in <lambda>
return lambda *args: val(*gp_fixargs(args, True))
arcgisscripting.ExecuteError: ERROR 160196: Invalid Topology
Failed to execute (FeatureToPolygon).


Failed to execute (BBBPolygons_PreprocessBuffers).
Failed at Monday, May 24, 2021 7:47:48 AM (Elapsed Time: 86 hours 52 minutes 47 seconds)

 

0 Kudos
1 Solution

Accepted Solutions
RussellProvost1
New Contributor III

Thanks Melinda. Well this was user error. I made an error in setting up my distance cost attribute (in miles) which was causing gigantic walksheds to be created. I also managed to "trim" my GTFS file to my area of interest based on selecting stops within the County and then querying out all my related GTFS records based on that selection. I look forward to the native tool in 2.9 Thanks again.

 

Russ

View solution in original post

0 Kudos
2 Replies
MelindaMorang
Esri Regular Contributor

Hello Russell.  Unfortunately, the procedure used within BetterBusBuffers to parse the overlapping geometry of all the Service Area polygons sometimes has problems like this.

If you haven’t already, please take a look at this post: https://community.esri.com/t5/arcgis-for-public-transit/invalid-topology-error-when-running-betterbu...
I suspect the answer there may also help you out.

Other than tweaking those settings, I don't really have a good solution for you. You could definitely try to clip out the stops for only the area you care about, although I do not have any tools to help you do that easily.

The good news is that I am currently working on a ground-up rewrite of BetterBusBuffers that will be included as a core tool in the next release of ArcGIS Pro (2.9 - late 2021 or early 2022). The rewrite uses a different methodology for handling overlapping polygons (a rasterization and sampling approach) which will hopefully avoid these problems and make the final output less unwieldy. I know this doesn't help you out in the short term, but perhaps next time you have to do this task, you can use the improved version.

RussellProvost1
New Contributor III

Thanks Melinda. Well this was user error. I made an error in setting up my distance cost attribute (in miles) which was causing gigantic walksheds to be created. I also managed to "trim" my GTFS file to my area of interest based on selecting stops within the County and then querying out all my related GTFS records based on that selection. I look forward to the native tool in 2.9 Thanks again.

 

Russ

View solution in original post

0 Kudos