This content describes Snap 11. For Snap 10, the equivalent page will be in Snap 10 help
Geolocation data is captured in the ID.location variable in WGS84 (World Geodesic System) format. You can export the variable data for further analysis.
The variable can either contain location data or an error code if the location data was not found.
You can extract the separate elements of the location data by using the system patterns provided.
Element |
Text |
Latitude |
|
Longitude |
|
Altitude |
|
± Accuracy of location in meters |
|
Error code |
|
Example 1
Create a derived variable to extract the longitude to 3 decimal places (d.p.). This assumes that you have added the paradata ID.location to your survey.
Name: Latitude
Label: Latitude
Type: Derived (the variable will derive its data from other existing variables).
Response: Quantity
Decimals: To access the Decimals field, click
. Change the figure from 0 to 3.
Values: ID.location as geo latitude

Example 2
Extract the longitude and latitude to a single derived literal variable. This example tests to see if an error has been received, so only valid geolocations are stored. It then stores the latitude and the longitude, separated by a comma.
Name: LatLong
Label: Latitude and Longitude
Type: Derived (the variable will derive its data from other existing variables).
Response: Literal
NA: unless ((ID.location as geo unavailable) == "")
Values: ID.location as geo latitude:", ":ID.location as geo longitude

The : is a literal operator in Snap. It allows you to put different values together
|
See Also |