My organization recently gave me access to ArcGIS Velocity and I am working to pull some data from an external XML file. Within the XML schema, the geocoding for location is shown like this "36.63610131 -81.9392393". I'm trying to find if there is a calculation in Velocity that will allow me to fix the geocoding so that it matches the needed schema for the feature service to map the point. This is my first time using Velocity so any assistance would be greatly appreciated.
Solved! Go to Solution.
Thanks for providing the additional information. The Public URL in XML format can be brought into a HTTP Poller feed.
https://www.511virginia.org/mobile/data/RSS/StatewideIncident.xml
For this feed you can flatten and use channel as the root to get down to a usable schema. The geometry is still nested in the item-link field and looks like this
“ http://www.511virginia.org/?lon1=-77.462688&lat1=37.5759&lon2=-77.462688&lat2=37.5759”
It will need to be calculated in a Real Time analytic to pull the Latitude and Longitude.
In a Real-Time Analytic add the feed that was just created and add a calculate field tool to the analytic.
In the Calculate Field tool
- Add new Geometry field
Use an arcade expression to calculate Geometry
var a = Split($feature.item_link, '?',10 ) [1]
var b = Split(a,'=', 5)[1]
var Long = Number(Split(b,'&', 2)[0])
var a = Split($feature.item_link, '?',10 ) [1]
var b = Split(a,'&', 5)[1]
var Lat = Number(Split(b,'=', 2)[1])
Point({"x" : Long, "y" : Lat, "spatialReference" : {"wkid" : 4326}})
Let me know if you have any other questions
@Bryan_Wade Thanks for the question we do have a few way to work with projections and calculations. Message me directly and we can set up a few minutes to look at your data.
Thanks for providing the additional information. The Public URL in XML format can be brought into a HTTP Poller feed.
https://www.511virginia.org/mobile/data/RSS/StatewideIncident.xml
For this feed you can flatten and use channel as the root to get down to a usable schema. The geometry is still nested in the item-link field and looks like this
“ http://www.511virginia.org/?lon1=-77.462688&lat1=37.5759&lon2=-77.462688&lat2=37.5759”
It will need to be calculated in a Real Time analytic to pull the Latitude and Longitude.
In a Real-Time Analytic add the feed that was just created and add a calculate field tool to the analytic.
In the Calculate Field tool
- Add new Geometry field
Use an arcade expression to calculate Geometry
var a = Split($feature.item_link, '?',10 ) [1]
var b = Split(a,'=', 5)[1]
var Long = Number(Split(b,'&', 2)[0])
var a = Split($feature.item_link, '?',10 ) [1]
var b = Split(a,'&', 5)[1]
var Lat = Number(Split(b,'=', 2)[1])
Point({"x" : Long, "y" : Lat, "spatialReference" : {"wkid" : 4326}})
Let me know if you have any other questions