Esri / arcgis-osm-editor

ArcGIS Editor for OpenStreetMap is a toolset for GIS users to access and contribute to OpenStreetMap through their Desktop or Server environment.
Apache License 2.0
395 stars 129 forks source link

Set hierarchy level #179

Open proma90 opened 6 years ago

proma90 commented 6 years ago

Hello everyone! I'm using this tool in order to create an OSM network dataset adn then use it to generate GTFS shapes. I'm following the docs so, I loaded the osm file from Manchester http://download.geofabrik.de/europe/great-britain/england/greater-manchester.html adding this osm tag: highway=all. Once done it, I used Create OSM Network Dataset tool, loading the new created OSM Feature Datase and the network configuration sample files (DriveGeneric.xml). The resultant network dataset looked promising.

image

However, when I run the Generate GTFS Shapes tool, where I need to use the osm network and the manchester gtfs https://transitfeeds.com/p/transport-for-greater-manchester/224, it gave me the following warning:

Unable to create on-street Routes because the Solve failed. Solve warning messages: Cannot use hierarchy when the hierarchy level count is zero.

And the resulting shapes don't match the osm network:

image

I've checked the network configuration sample file that I used for create the osm network dataset and it seems that the hierarchy settings are well written

`

Hierachy 0 roads From-To h_level roads To-From h_level ` Anyone can help me with this issue? Thank you so much in advance. (I'm runing ArcMap 10.4 in an Intel(R) Core(TM) i7-7500U CPU @ 2.70GHz, 2904 Mhz, 2)
mboeringa commented 6 years ago

@ThomasEmge ?

proma90 commented 6 years ago

Hi, any advise? Thanks.

ThomasEmge commented 6 years ago

@proma90 Have you contacted Melinda (author of the GTFS tools) to get her opinion? I'll take a look if the OSM tools do build a proper hierachy.

proma90 commented 6 years ago

@ThomasEmge no, I haven't do it because I don't know how to contact her. Where can I find fer email? And thank you.

mboeringa commented 6 years ago

@proma90 , her full name is listed on this ESRI Blog page linking to the different posts she made: https://blogs.esri.com/esri/arcgis/author/Melinda-6/

ThomasEmge commented 6 years ago

@proma90 It just tried building GTFS shapes with the data links you provided and I didn't run into the warning message you encountered. When checking the properties of the generated network I noticed that there is no travel mode specified, so I generated one after the fact, using the drive time as the impedance and I checked the option to use hierarchy levels.

proma90 commented 6 years ago

@ThomasEmge Thank you! However, I was using drive time as the impedance before. Where did you ckeck the hierarchy levels option?

mmorang commented 6 years ago

Hello @proma90. The best thing to do is to test your network dataset using a regular Route Network Analyst layer prior to running Generate GTFS Shapes, just to make sure the network dataset is working properly. Can you solve a Route with your network, or do you get the same solve failure? I'm guessing you'll get the same error.

I'm not very familiar with the OSM tools or the networks they produce. I talked to one of our network dataset developers, and he says he doesn't know how the hierarchy level count could have gotten set to 0 unless the OSM tools did something funny during the creation process. Can you share your network dataset for us to look at? And the full network configuration sample file?

proma90 commented 6 years ago

Hi @mmorang, I will try to test my network dataset using the Route Network Analyst layer as you propose. Here I attached the network configuration file and the network dataset in shapegile format generated from Greater Manchester osm file: netwk_conf.zip manchnetwork.zip Thank you.

mmorang commented 6 years ago

The network dataset was not included in your manchnetwork.zip file, only a couple of shapefiles. Did the simple route test work?

mmorang commented 6 years ago

Let's back up a little bit. Why do you even need hierarchy for this? Hierarchy is meant to make long-distance routes solve more quickly in a case where an exact solve would take too long. It's really not needed for routes within a single city with stops close together, as is the case with transit routes. It's only valuable if, say, you're calculating routes from one side of the country (or continent) to another with just a stop on either end. Hierarchy tells the Route solver to strategically check only the highways and skip searching all the small roads except on the ends near the stop. But you don't want that. If you're calculating GTFS shapes from GTFS stops, then your stops are all pretty close together and mostly on local roads anyway.

So, my recommendation is to just delete the hierarchy attribute from the network dataset entirely, rebuild the network, and try running the tool again.

Another tip for future reference: I highly recommend creating your network datasets in a file geodatabase rather than using shapefiles. Shapefiles are an older format with a lot of limitations. File geodatabases are faster and can be larger and work better on newer versions of our software.

mboeringa commented 6 years ago

@mmorang . The OSM import tools of the ArcGIS Editor for OpenStreetMap create a File Geodatabase by default. I think @proma90 only used the shapefiles as an export format to make it available here, but of course he / she needs to confirm.

ThomasEmge commented 6 years ago

@proma90 Were you successful in creating the shapes with our suggestions?

proma90 commented 6 years ago

Hi guys @mboeringa @ThomasEmge @mmorang , sorry for not getting back sooner, but I only have access to this computer from Monday to Wednesday. I will check now your answers and I will let you know about your suggestions (however, now I'm trying on Manchester, but I would like it to work for all UK). Thank you a lot.

proma90 commented 6 years ago

@mboeringa, yes, that's it. I only used the shapefiles as an export format.

@mmorang . The OSM import tools of the ArcGIS Editor for OpenStreetMap create a File Geodatabase by default. I think @proma90 only used the shapefiles as an export format to make it available here, but of course he / she needs to confirm.>

proma90 commented 6 years ago

I have found a solution. I uninstalled and installed again the tools so when I use it, it doesn't give me any issue (even thought it is not 100% accurate). The problem reappears if I use the same osm network...creating each time a new one, the hierarchy issue dissapear. Thanks for all your help and suggestions.