In this blog post I will describe how you can integrate Survey123 with Spike. Spike is a laser-based measurement solution by Esri partner ikeGPS. What makes Spike unique is that it allows you to easily measure the dimensions of remote objects, such as areas and lengths, all from a photo.
Say, for example, while doing a property inspection you need to calculate the height of a balcony, or the size of a garage door. Rather than using a ladder and measuring tape, you can simply take a photo of the building, and then calculate dimensions by drawing on top of the photo. You can similarly use Spike to calculate the size of road signs, billboards, poles, etc.
You can embed Spike questions within Survey123 and automatically bring all measurements from Spike into your form: Tap on a Spike question, snap a photo, measure on it… and your measurements will get persisted in ArcGIS along with the rest of the survey data.
The integration of Survey123 with Spike is exciting news, because it has the potential to boost the productivity of certain data capture workflows tremendously. This short video tutorial describes the basics of how Survey123 and Spike work together:
Lets next get into the details...
The Spike laser: The most visible aspect of Spike is the laser instrument. It is an eye safe Class-1 laser, designed to measure distances in a range between 2 and 200 meters with an accuracy of 5 centimeters. The laser is designed to be attached to your smartphone or tablet and paired using a Bluetooth connection.
Spike units have a retail price of $499 and are sold online and through a network of resellers.
The Spike app: Once the laser is paired, the Spike app uses the camera on your smartphone or tablet so you can take a photo of your object of interest. Using the distance to the photographed object captured by the laser, the Spike app can accurately calculate lengths and areas as you draw lines and polygons over the photo.
The Spike app is available for iOS and Android operating systems and is certified for use against a wide collection of smartphones and tablets.
Getting familiar with Spike: Spike is straight-forward to use, but knowing a handful of tips and good practice in the field is key to get the best out of it. The best reference to take your first steps is the Spike User Manual.
Spike can be operated through two main modes:
Photo Measurement mode:In its simplest form, the Photo Measurement mode will allow you to simply snap a photo of an object, and get back the exact distance to that object form your current location. This alone can be useful in multitude of use cases. Say for example you need to document the width of a road: stand on one side of the road and take a photo targeting at the other end across. After taking the photo, Spike will give you the exact distance. Not only you can get an accurate measurement, but you can do it without risking your life; safely from one side of the road.
With Photo Measurement mode you can also measure distances (and areas) on objects by simply drawing on top of the photo you just took. For example, say you want to know what is the height of a building. Well, you take a photo of it, and then you extract the height by drawing on that photo. If you want to derive measurements from a photo in this way, certain conditions need to be met. When used correctly and in ideal conditions, you can expect a measurement with an accuracy of 1%. For example, if you measure the height of an object to be 10 meters, you can expect the accuracy to be around 10 centimeters.
Let’s describe next what used correctly and ideal conditions means:
So far all of this may sound a little bit intimidating, but once you have the Spike device in your hand things are much simpler. Not just simpler, but also fun. Next you can see Brandon having a good time while ‘spiking’ outside Esri.
From our own experience, the Photo Measurement mode works best with man-made structures: walls, signs, billboards, doors, straight poles, streetlights etc. Measuring the height of trees, rocks etc is much more challenging because you often do not have a good plane to reference your measurements. If you do not have a good 2D plane to make your measurements on, then you should consider using the Point to Point measurement mode.
Point to Point Measurement mode: Point to Point or P2P is very useful when all you need is to measure the distance between two objects in front of you and you either cannot fit the two objects within a single photo, or when you do not have a good 2D plane on which to base your measurements. With P2P, you simply need to center your camera on your first target, say for example a tree and take a photo. Then you turn from that same location to take a photo of your second target, say for example a wall. Spike will compute the horizontal and vertical distances between the two photographed objects.
Like with any tool out there, it takes a bit of practice to fully understand what is the best measurement mode for the job. Spike can greatly boost the productivity of field workers saving valuable time. It also can provide a much safer way to make measurements. For hard to reach objects, Spike can make it possible to perform measurements that could not be done otherwise.
Now that I have described the basics of Spike, it is time to go into the details of how Survey123 and Spike work together.
Starting with Survey123 version 2.6, you can incorporate Spike functionality into your form. This allows you to streamline the use of Spike within your data collection workflows. For example,
if you have a survey to help map the presence of graffiti in the city, you will want to capture many things including the location, typology (Tag, Throw-up, Blockbuster…), surface, photo and size. Spike can help you capture the size accurately, so you can estimate the cost of removal.
Adding Spike questions into a survey: You can add Spike questions to a survey using Survey123 Connect for ArcGIS. In your XLSForm, add a question of type image, and then set the appearance to either spike-full-measure, spike or spike-point-to-point:
When using the spike-full-measure, spike-point-to-point and spike appearances, Survey123 will let users easily launch the Spike app from within the form. Once the photo has been taken and measurements added, Spike will return back to Survey123, so all measurements of interest can be extracted and stored in the survey. The measure object with Spike help topic describes step by step how Survey123 and Spike work together.
Spike photos will be stored as an attachment automatically. This is a great feature because photos will become a verifiable record persisted with your data. Photos will show how accurately the measurement was made in the field, and if needed, the photo itself could be used in the back-office to make additional measurements.
The use of Spike within Survey123 is only available to logged-in users. Spike questions can be used while online or offline, but you must be logged-in.
Extracting Spike measurements with pulldata(): Spike uses EXIF photo headers to store information such as the location from which the photo was taken, the direction, distance and measurements made in the Spike app. In a previous blog post we explored how to extract EXIF metadata from an image in Survey123 using the pulldata() function. This same technique can be used to extract Spike metadata.
The Spike metadata in the EXIF of the image is split between standard EXIF tags and custom information stored in the ImageDescription tag. The following table describes standard tags populated by Spike:
EXIF tag | Description |
---|---|
gpsdestlongitude | The estimated X coordinate of the photographed object |
gpsdestlatitude | The estimated Y coordinate of the photographed object |
gpsdestcoordinate | The XY coordinate pair of the photographed object |
gpstimestamp | The time when the photo was taken |
gpsdatestamp | The date when the photo was taken |
gpsdestdistance | The distance between the photographed object and your device |
imageDescription | A JSON string including measurements captured by the Spike app |
This expression will extract the distance in meters between the photographed object and the device:
pulldata("@exif", ${spike}, "gpsdestdistance")
In order to extract photo-measurements from Spike, your pulldata() function will need to first get the ImageDescription EXIF tag, and then parse the returning JSON string to extract the specific dimensions you are looking for.
For example, the following expression assumes the first measurement made in Spike was of type length, and gets its value in meters:
pulldata("@json", pulldata("@exif", ${spike }, "ImageDescription"), "Spike.objects[1].dimensions")
The next expression assumes the first measurement made was of type area and extracts its value in square meters:
pulldata("@json", pulldata("@exif", ${spike_full}, "ImageDescription"), "Spike.objects[1].area")
This expression gets the horizontal distance between two objects as measured through the Point to Point measurement mode:
pulldata("@json", pulldata("@exif", ${spike }, "ImageDescription"), "P2P.horizontal_distance")
Spike returns many other properties through the ImageDescription EXIF tag including: the pitch, roll and direction of your device when the photo was taken, the unique identifier of the specific Spike laser unit that captured the distance measurement etc. The Spike section of the Media help topic describes in detail the contents of the JSON object stored in the ImageDescription.
Another way to explore the contents of the ImageDescription tag is to simply add a text question to your form and have it populated with the contents of the ImageDescription tag through a calculation. When you do this, it is important that you set the esriFieldLength column of your text question to 1000 characters. The ImageDescription JSON string can be quite big.
A great starting point to experiment with all the things you can do with XLSForms and Spike is our Spike sample. I strongly recommend that you have a look at it:
1. Open Survey123 Connect for ArcGIS
2. Click on Create New Survey
3. Search for the Spike survey in the Samples category
4. Publish it and test from your smartphone
5. Look into the XLS file to learn all the techniques used in the sample.
While the heart of what Spike excels at is helping you measuring dimensions over photos, you can also use Survey123 to roughly estimate the location of remote objects. For example, you can map the location of a building without stepping out of your car, or the location of a streetlight across the street.
Before we go into the details of estimating the location of remote objects, I want to emphasize that Spike is not a high accuracy surveying device. It can measure accurately distances to objects, but when estimating the location of remote objects there are several sources of error that will come into play outside of what Spike is designed to do.
To define the location of a remote object, Spike relies on the following:
The gpsdestlongitude and gpsdestlatitude properties will be populated with both the spike and spike-full-measure appearances.If you do not plan to capture any length or area measurements and all you want is the location of the photographed object, then the best is to use the spike appearance.
To extract the estimated latitude and longitude of the photographed object, you will use the pulldata() function within a calculation. For example, the following expression will extract the latitude:
pulldata("@exif", ${spike}, "gpsdestlatitude")
You can store the latitude and longitude as attributes in your survey, and then create an XY Event Layer with them in ArcGIS Pro or other tools.
While it should be possible for you to calculate a geopoint question with the latitude and longitude values extracted from the Spike photo, there is currently a known limitation in Survey123 preventing the successful calculation when applied. This is in our backlog and we will work towards resolving the problem as soon as possible.
As stated before, it is best that you exercise Spike in the field in all its capabilities. To fully understand its potential and limitations you must experience it in the field in real working conditions.
If you need some ideas, here is an informative video by IkeGPS further describing some common use cases for Survey123 and Spike.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.