Esri / street-data-processing-tools

ArcGIS geoprocessing toolbox containing tools to create and build a network dataset from commercial street data.
Apache License 2.0
36 stars 15 forks source link

HRESULT 0x80042288 on Creating the Network #24

Closed Behseini closed 5 months ago

Behseini commented 6 years ago

I used the current tool (v10.6.0.1) with ArcGIS 10.6 (version 10.6.0.8321) and older releases v10.4.1.1, and v10.4.1.2 with ArcGIS 10.4.1 (version 10.4.1.5686) for processing HERE data 2017 in Canada and in all of them I am getting this error at the very end level of creating Network

Exception from HRESULT: 0x80042288 at ESRI.ArcGIS.Geodatabase.IDatasetContainer2.CreateDataset(IDEDataset DataElement) at GPProcessVendorDataFunctions.ProcessNavStreetsDataFunction.CreateAndBuildNetworkDataset(String outputFileGdbPath, Double fgdbVersion, String fdsName, String ndsName, Boolean createNetworkAttributesInMetric, Boolean createArcGISOnlineNetworkAttributes, String timeZoneIDBaseFieldName, Boolean directedTimeZoneIDFields, String commonTimeZone, Boolean usesHistoricalTraffic, ITrafficFeedLocation trafficFeedLocation, Boolean usesTransport) in C:\tmp\xxx\src\street-data-processing-tools-10.4.1.1\street-data-processing-tools-10.4.1.1\ProcessNavStreetsDataFunction.cs:line 6988 at GPProcessVendorDataFunctions.ProcessNavStreetsDataFunction.Execute(IArray paramvalues, ITrackCancel trackcancel, IGPEnvironmentManager envMgr, IGPMessages messages) in C:\tmp\xxx\src\street-data-processing-tools-10.4.1.1\street-data-processing-tools-10.4.1.1\ProcessNavStreetsDataFunction.cs:line 3137 Failed to execute (ProcessNavStreetsData).

I technically built same tool except of two changes: A - I removed two fields "EXPR_LANE", and "CARPOOLRD", from the StreetsFieldNames array and also their associated fields from StreetsFieldTypes

B - I removed the Avoid Unpaved Roads restriction attribute I dsiabeld

        evalNetAttr = CreateAvoidNetworkAttribute("Avoid Unpaved Roads", "[PAVED] = \"N\"",
                                                      true, fgdbVersion, edgeNetworkSource, AvoidHighFactor);
            attributeArray.Add(evalNetAttr);

and removed it from the restrictionsArray in ProccessNavStreetsDataFunctions.cs

Can you please let me know why this is happening and how can I fix this?

aHatakeyama commented 6 years ago

@Behseini, the HRESULT 0x80042288 translates as a 32-bit integer as -2147212664. Looking up this number in fdoError at https://enterprise.arcgis.com/en/sdk/latest/windows/fdoError.html shows the error returned is FDO_E_FIELD_EVALUATOR_FIELD_NOT_FOUND (The network field evaluator is associated with a field that cannot be found).

You mentioned in A that you removed the fields EXPR_LANE and CARPOOLRD, but did you also remove the restriction attributes that are created from these fields using CreateAvoidNetworkAttribute(), as well as any references to these restriction attributes when creating travel modes?

mmorang commented 5 months ago

My colleague answered this question in 2018 with the likely cause of the error, and there has been no further discussion since then. I'm going to close this issue, assuming that the problem has been resolved or is no longer relevant. If you're still experiencing problems, feel free to reopen!