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

Create Network Dataset in 10.5 - The row contains a bad value. [RestrictionType] #178

Closed DPetrusma closed 6 years ago

DPetrusma commented 6 years ago

I have downloaded and converted the .pbf file from here in an attempt to create a network dataset from the entire country of Australia: http://download.geofabrik.de/australia-oceania/australia.osh.pbf

Loading the OSM file works fine, but when creating the network dataset, the error that comes up is:

The row contains a bad value. [RestrictionType] at ESRI.ArcGIS.Geodatabase.IFeature.Store() at ESRI.ArcGIS.OSM.GeoProcessing.NetworkTurns.CreateTurnFeature_NO(TurnFeatureClassWrapper turnFCW, OSMTurnInfo osmTurn) at ESRI.ArcGIS.OSM.GeoProcessing.NetworkTurns.PopulateTurnsFromRelations() at ESRI.ArcGIS.OSM.GeoProcessing.RunTaskManager.ExecuteTask(String messageName, Action task) at ESRI.ArcGIS.OSM.GeoProcessing.NetworkTurns.ExtractTurnRestrictions() at ESRI.ArcGIS.OSM.GeoProcessing.NetworkDataset.ExtractTurnRestrictions() at ESRI.ArcGIS.OSM.GeoProcessing.RunTaskManager.ExecuteTask(String messageName, Action task) at ESRI.ArcGIS.OSM.GeoProcessing.NetworkDataset.CreateNetworkDataset() at ESRI.ArcGIS.OSM.GeoProcessing.OSMGPCreateNetworkDataset.Execute(IArray paramvalues, ITrackCancel TrackCancel, IGPEnvironmentManager envMgr, IGPMessages message) Failed to execute (OSMGPCreateNetworkDataset).

Is there a way to view the relations so I can find the row with the bad value and exclude/fix it somehow? From what I read at https://github.com/Esri/arcgis-osm-editor/wiki/Tools#Load_OSM_File, "Relations are stored as a standalone table in the geodatabase and are currently not exposed to you." so it seems like I'm a little stuck.

I have completed this process successfully on the entire NZ dataset, so I would think there are just some bad records, but unfortunately I seem to have no way to find them.

mboeringa commented 6 years ago

That tool assumes you have used the "Load OSM File" tool to create your File Geodatabase, as that tool loads all the required information to create a network dataset. Since it can only process OSM XML files, I am unsure how you loaded the PBF. Note, that you cannot use the newer "OSM File Loader (Load Only)" tool that supports multi-core processing, as that tool doesn't load all the required data for creating networks.

DPetrusma commented 6 years ago

Thanks for the reply, mboeringa. I see I missed a step - I use Osmconvert to turn the PBF into an OSM file. I ended up solving the problem by deleting the table causing the error from the geodatabase and re-running the tool. That means (I assume) that all of the restrictions and such aren't in my network, but it was closer enough for my purposes.

I think this issue can be closed as it's not really an error with the tool - I'm a bit of a newbie and I didn't realise that I really would need to do more cleaning up before actually using the map for a network dataset.