LocalRouteTask geodatabase format, documentation/how?

5073
13
Jump to solution
03-14-2016 05:16 AM
JakobGaardsted
New Contributor III

I am trying to set up offline streeet routing in ArcGisRuntime for Qt, Using LocalRouteTask.

However, I cannot find adequate documentation for how to obtain/configure an appropriate database.

The info I've found, just refers to two string parameters, with no further details. The main things I've been able to guess, is from examining/reverse engineering the demo "RuntimeSanFrancisco.geodatabase" files.


What I've learned so far:

- There are 4 "geodatabase" formats. (One for each format name would have been sufficient for me.)

Until that page is moved, a link here: https://developers.arcgis.com/qt/cpp/guide/supported-geodatabase-formats.htm

describing the 4 formats.
- the 'RuntimeSanFrancisco' is format 1 - .geodatabase-SQLite.

Using QGis, I can see the SanFrancisco offline-routing example contains

ALL the following data - I don't know how much of it is required for a street routing example.

  I notice the N_1_* tables, and the 3 Streets* tables (relevant because the named network is called Streets_ND)

and the ND_27* tables, and Streets_ND_Junctions.

(however, I note that the geometry-type is different compared to the next picture I show.)

SF.png


We had an ESRI partner prepare a 'geodatabase' data set for our client for offline routing, and they came up with

a ".gdb" folder, which I, based on the link above, guess to be a socalled "file geodatabase" type (it's called 'file', because it's stored in a directory, as opposed to the SQLite variant, which is stored in a file. In case you wonder.)

When I open that 'file geodatabase' in QGis, I get this:

fileGeo.png

Again we see names 'Streets', 'Streets_ND_Junctions', and 3 ND_XXX* tables.

However, trying to load this in our ArcGis Runtime application, just leads to crashes giving us no relevant info.

(executing the LocalRouteTask constructor gives a crash.)

The only documentation I find is this:

https developers.arcgis.com/qt/cpp/guide/find-a-route.htm

Find a route—ArcGIS Runtime SDK for Qt | ArcGIS for Developers

from which I don't seem to find any info about how to obtain/build routing geodatabases?

QUESTION: Anybody got any hints for how to figure this out / how one is supposed to figure this out?

The ESRI partners who built the 'geodatabase' are nice people, but it appears to me, they have access to the same lack of documentation as I find..?  How does one figure out how to build a usable routing-network data set for ArcGisRuntime LocalRouteTasks, and is it possible to diagnose it with other things than mute crashes?

I spent some time googling this, but only found people asking similar questions in threads around the web, that never attracted any replies 😞

Detail question: I would like to know, if LocalRouteTask only works with the SQLite variant? From the linked 'supported' page, it suggests that "geodatabase file" would work too, but given the very little doc-details on LocalRouteTask itself, and my crashes, I'm wondering..? IE SQLite is the thing I've seen it work with..

Thank you for any help or advice you can offer on this.

URLs:

http developers.arcgis.com/qt/cpp/guide/supported-geodatabase-formats.htm

0 Kudos
13 Replies
JakobGaardsted
New Contributor III

A question from the analyst/ESRI partner:
"Does it matter whether it is arcmap 10.3 or 10.4. ?" (that they use to build the geodatabase).

My own instinct says 'no', but given the situation, I thought it might be better to ask..?

0 Kudos
JakobGaardsted
New Contributor III

It works now :-).

The esri partner reports this about what caused it:

"...

When I run this Arcruntime version there is a popup window that opens below the dataframe and cuts the dataframe extent, from below

.."

So presumably that is the UI aspect to be aware of, when building/exporting such a network graph.

Again, Thank you for  all your assistance in getting this to work!

0 Kudos
LucasDanzinger
Esri Frequent Contributor

You are welcome. Everything you did here in QML can be done with C++ as well.

-Luke

0 Kudos
JakobGaardsted
New Contributor III

Just an update: I ported your QML example (for visualizing the network layer) in C++, and thought I'd add that snippet here,

to aid others working with similar stuff (in particular, it was something I wish I had worked out for myself..)

(excuse the weird formatting, I tried to repair it as best I could)

  // First, find us a geodatabase:

  QString gdbPath = "straeto_network.geodatabase";

  ER::Geodatabase* geodatabase = new ER::Geodatabase(gdbPath);

    // Then, make a featureTable:

    ER::GeodatabaseFeatureTable* gdft = new ER::GeodatabaseFeatureTable;
    gdft->setGeodatabaseWithLayerName(geodatabase, "Streets");

// Now make a layer out of that table:
ER::FeatureLayer* featureLayer = new ER::FeatureLayer(gdft);
// Hmm, we should probably set some symbol stuff?
// Finally, add that layer to the map.
m_map->addLayer(featureLayer);
0 Kudos