Select to view content in your preferred language

ArcGIS Online and GeoTab API for live tracking as feature layer

1824
11
05-26-2023 11:05 AM
Labels (1)
RobynSnookCCB
Regular Contributor

My organization is using GeoTab to track vehicles. We are looking to bring in the live location tracking into ArcGIS Online ideally as a feature layer to place on webmaps to track transit and such.

GeoTab basically came back to us and said we need to built our own code using their API. We don't have a developer in the organization and my coding is limited. Has anyone accomplished this before? I'm also very curious as to where to house the code so it runs regularly and connects. 

0 Kudos
11 Replies
ctalleygreenville
Occasional Contributor

I was hoping someone had already responded to your question!  I am looking into the same thing.  

0 Kudos
ctalleygreenville
Occasional Contributor

Here is something with Velocity that I am copying here in case it helps.

https://doc.arcgis.com/en/iot/ingest/geotab.htm

0 Kudos
RobynSnookCCB
Regular Contributor

Yes I'm still searching and trying things out. Here is a link to the geotab community which I posted what GeoTab support told me to do in order to complete it. https://community.geotab.com/s/question/0D5Ht00009pnh2LKAQ/adding-geotab-map-service-to-arcgis

There are a few options with velocity and geoevent I believe through ESRI but my organization doesn't have them so we'll be stuck creating our own solution. 

0 Kudos
AdamGaudet
Regular Contributor

This is part of the same task I've been assigned to look into. Thought to post here as to document where this thread is. I will be checking back up on it every now and then I'm sure. I'll also post something if I'm able to figure things out from my end.

0 Kudos
ZachBray
Emerging Contributor

I am not sure of the status of this thread but what you are describing sounds like a good use case for ESRI's GeoEvent Server.  They already have connector built for GeoTab.  You would have to install an on-prem ArcGIS Server registered as GeoEvent with the GeoEvent Service installed on the same machine.  From there you can push the GeoTab data over to ArcGIS Online.  There would not need to be any real development or coding.

ESRI GeoEvent Server https://www.esri.com/en-us/arcgis/products/arcgis-geoevent-server

GeoTab GeoEvent Server connector https://www.arcgis.com/home/item.html?id=cf02f3b8564042db8de60f582e1ad2a3

 

0 Kudos
ctalleygreenville
Occasional Contributor

Thanks, Zach.

We are unable to make use of either GeoEvent Server or Velocity at this time.   The number of vehicles we would need to display in the other web application  would probably be no more than 10 (not too many snow removal vehicles here in the south!) We do not have access to the code for the other web app but we can configure that application to display Esri map services.

We are able to pull police and fire vehicle locations because we have direct access to the database (on-site). In the past with "APIs", I have been able to use some sort of ETL process to pull  .json from a URL and then process to a data table or .csv we can process to a map service.  We do have Data Interoperability that might be an option but I am having trouble determining how to use it with GeoTab.  

Thanks,

Carmen

0 Kudos
ZachBray
Emerging Contributor

Sounds like you may have some experience with REST services.  Have you looked into the GeoTab Developers SDK?  That should be able to give you what you are looking for.  I am investigating this for my organization and am considering both options but we have not started any development.  From looking at the code samples and documentation I do not think it would be terribly complicated to do something to poll for 10 devices and return lat/lon or other data.

https://geotab.github.io/sdk/software/guides/mygeotab-urls/

 

0 Kudos
ctalleygreenville
Occasional Contributor

yes, I have looked through the API documentation and I have posted to the GeoTab forum.  I thought the same thing as you when I first started reading the documentation.  I look forward to hearing whether you were able to access and process the data for use in Esri type products (if you go the non-GeoEvent Server or Velocity route).

0 Kudos
ZachBray
Emerging Contributor

I did some playing around with this in Postman and was able to get to some info that might help you.

First you have to Authenticate to get GeoTabs credentials object.  Then you use the credentials object to use their Get method to return your DeviceStatusInfo object.  Do not confuse the Get method with a HTTP Get.  They are different things in fact you what to use HTTP Post on these calls.

I made my calls to https://my.geotab.com/apiv1

I made sure I added headers Content-Type = application/json and Cache-Control = no-cache.

My Authentication request had body content of 

{"method":"Authenticate","params":{"database":"YOUR_DATABASE","userName":"YOUR_USERNAME","password":"YOUR_PASSWORD"}}
This returned a result of 
{
    "result": {
        "credentials": {
            "database""YOUR_DATABASE",
            "sessionId""Tt_9kpOlDATWvEW3cLFBZw",
            "userName""YOUR_USERNAME"
        },
        "path""ThisServer"
    },
    "jsonrpc""2.0"
}

 

Note that path is "ThisServer" so I could use the same URI.

With the same setup I made a request with the body content of: 

{"method":"Get","params":{"typeName":"DeviceStatusInfo","credentials":{"database""YOUR_DATABASE","sessionId""Tt_9kpOlDATWvEW3cLFBZw","userName""YOUR_USERNAME"},"search":{"DeviceSearch":{"deviceIds":["YOUR_DEVICE_ID"]}}}}.  If you delete the "search" portion you should get all devices.
 
you can look at the GeoTab Get method: https://geotab.github.io/sdk/software/api/reference/#Get1
 
The part that threw me for a while was adding in the "params" object with the method "Get".
Hope this gets you going.
0 Kudos