ICON

Help - How can I export latitude and longitude values

Help Center Knowledge Base Export latitude and longitude values

How can I export latitude and longitude values?

2 MIN INTERMEDIATE DATA, EXPORT GEOMETRY, CONVERT GEOMETRY TO LAT/LON


This functionality is only available in Spotzi Studio.

To achieve this, you have to go to your dataset.

Spotzi point datasets contain the_geom column with latitude and longitude coordinates. Exporting the_geom renders a column in well known Binary format, or WKB. For example, a field containing “-73.9695, 40.6754” appears in a CSV as “0101000020E6100000000000800D7E52C0E128A68274564440”. You can export the_geom as latitude and longitude instead by modifying your dataset with an SQL query.

  1. Create a new number type column for latitude, and one for longitude
  2. With the Editor, Custom SQL query option, enter:UPDATE my_dataset
    SET lon_column = ST_X(the_geom), lat_column = ST_Y(the_geom)
  3. Replace your datasets name for my_dataset
  4. Replace your new blank longitude column for lon_column
  5. Replace your new blank latitude column for lat_column

Click Apply query , the_geom coordinates are split into the appropriate latitude and longitude columns. If you export your dataset as a CSV, the values appear as numbers.

Related blog posts

Interested in our solutions? Please contact our sales team.

Whether you are new to data analytics or already an expert. We offer solutions for everyone. You don’t need to be a data expert to work with Spotzi Location. For more tailor made solutions we offer Spotzi Studio. With this plan you cannot only manage the data yourself but also connect to our API and manage users for the dashboards you create. Or work with our Market Ready Dashboards and drive on autopilot.