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
400 stars 131 forks source link

Unable to load .osm file #231

Open hdd3NYU opened 3 years ago

hdd3NYU commented 3 years ago

Hi,

I am ultimately trying to create a network dataset of greater NYC using the create OSM Network Dataset tool, but currently, I am running into the problem of not being able to load any .osm files at all. I am using ArcGIS10.8.1. I've tried both the 32 and 64-bit versions of the editor tool. I've tried running it in the background and foreground. I've tried using the full file loader and just the load-only loader. I've tried running it with cutouts straight from OSM, queries I've run myself, and the simplest .osm file I can generate, but I keep getting the same error very early on.


Start Time: Mon Aug 16 22:13:40 2021 Counting elements in OSM file... Counted 2275006 nodes, 175525 ways, and 4 relations. Preparing geodatabase... Object reference not set to an instance of an object. at ESRI.ArcGIS.OSM.GeoProcessing.OSMGPFileLoader.Execute(IArray paramvalues, ITrackCancel TrackCancel, IGPEnvironmentManager envMgr, IGPMessages message) Failed to execute (OSMGPFileLoader). Failed at Mon Aug 16 22:15:16 2021 (Elapsed Time: 1 minutes 36 seconds)


The object reference not set to an instance of an object, but I can't track down anything more specific inside the OSMGPFileLoader, and I'm pretty sure its not the input file. If I give it an input with nothing at all, just header and closer, it runs trivially, but including even 1 node causes it to break. I'm attaching the file with 1 node. Hopefully, this is enough to find something.

Thanks test.txt

hdd3NYU commented 3 years ago

Update: I had a colleague download the 10.8 editor and take a fresh cut from OSM, and he got the same error. I then found a copy of ArcMap 10.7, downloaded the 10.7 editor, took a fresh cut from OSM, and got the same error.

hdd3NYU commented 3 years ago

Fascinating update: I found a copy of 10.5, and it worked to load an OSM file once, but the second file attempt gave the same error

skmoore commented 3 years ago

@hdd3NYU Can you post the parameters you're using when running the tool? It's possible that an unusual path or something like that is causing the tool to fail.

hdd3NYU commented 3 years ago

Which parameters are you referring to? My file path does go through OneDrive if that is useful but other than that it's just C:/User/etc...

ThomasEmge commented 3 years ago

When you execute the gp tool as the messages are displayed, you should see the parameters on how the tool is being executed as one one of the very first entries in the messages section -

Messages
Executing: OSMGPMultiLoader C:\Users\thomas\Downloads\andorra-latest.osm # # # DELETE_NODES DO_NOT_DELETE_OSM_FILE C:\data\osm_testing.gdb\andorra_pt C:\data\osm_testing.gdb\andorra_ln C:\data\osm_testing.gdb\andorra_ply
Start Time: Fri Aug 20 18:16:21 2021
Counted 248722 nodes, 12900 ways, and 288 relations.
Loading nodes...
hdd3NYU commented 3 years ago

Executing: OSMGPFileLoader "C:\Users\H3's Machine\OneDrive - haggai@hagdav.com\NYU PHD\Research\Freight Analysis\OpenStreeMap\HuntersPoint.osm" CONSERVE_MEMORY # "C:\Users\H3's Machine\OneDrive - haggai@hagdav.com\NYU PHD\Research\Freight Analysis\OpenStreeMap\Testing16Aug\HPtest" "C:\Users\H3's Machine\OneDrive - haggai@hagdav.com\NYU PHD\Research\Freight Analysis\OpenStreeMap\Testing16Aug\HPtest\HPtest_osm_pt" "C:\Users\H3's Machine\OneDrive - haggai@hagdav.com\NYU PHD\Research\Freight Analysis\OpenStreeMap\Testing16Aug\HPtest\HPtest_osm_ln" "C:\Users\H3's Machine\OneDrive - haggai@hagdav.com\NYU PHD\Research\Freight Analysis\OpenStreeMap\Testing16Aug\HPtest\HPtest_osm_ply" Start Time: Fri Aug 20 21:36:00 2021

ThomasEmge commented 3 years ago

I am not seeing a name of either an enterprise or a file geodatabase in the path name. For my parameters you see something to the extend of 'C:\data\osm_testing.gdb' as a file geodatabase on my local hard disk. If you are using the file selector in the UI of the geoprocessing interface, then additional error checking should take place and flag invalid storage locations.

In your case, something like "C:\Users\H3's Machine\OneDrive - user_name\NYU PHD\Research\Freight Analysis\OpenStreeMap\Testing16Aug\OSMData.gdb\HPtest" might work as the target feature dataset. The additional feature class locations will should then be derived by the gp tool from that.

malleswar22 commented 3 years ago

I was trying to load file of entire country (india). and convert it to network dataset. but I'm stuck at loading the file. I get error immediately after executing the tool. Anyone please help or suggest any other way to create a network dataset. Thank you.

hdd3NYU commented 3 years ago

I was trying to load file of entire country (india). and convert it to network dataset. but I'm stuck at loading the file. I get error immediately after executing the tool. Anyone please help or suggest any other way to create a network dataset. Thank you.

As I mentioned above, I literally had to go find an old copy (shout out to my university) and run it fresh on a machine that had never tried the conversion before