Geocoding data
Last updated
Last updated
Two types of geocoding are available: address-level geocoding, which transforms a given address into its corresponding point location, and latitude/longitude geocoding, which converts a pair of latitude and longitude coordinates into a point geometry.
Address level geocoding is currently available for BigQuery, Snowflake and Redshift connections. PostgreSQL and Databricks support is coming soon.
To geocode your data, select a connection and click on the table you would like to geocode from the collapsible tree. Then, click on the Geocode data button at the top right of the screen. Please note that this option will only be available if your table does not have a geography column.
A new dialog will open for you to choose whether to geocode your table by address or by latitude/longitude.
If you are using BigQuery and you plan to repeat the geocoding process, bear in mind that if you drop columns from your table you won't be able to create columns with the same name for a period of time (7 days) because BigQuery reserves the deleted columns names for time travel purposes. So, for example, instead of dropping the geom
column to re-geocode all rows, update the table and set it to NULL
.
To geocode your data, select geocode by Address and fill in the options:
select the column of your table that contains the addresses to geocode.
optionally, select the country where your addresses are located. This is recommended as it generally improves the geocoding results.
optionally, specify the name of the geometry column (geom
by default) where the result of the geocoding will be stored.
Then, click on Continue. A new dialog will appear allowing you to confirm your selection. Click on the Geocode button to confirm or click Cancel to abort the process.
As a result of the geocoding process, two new columns will be added to your existing table: a geometry column with the locations of your addresses, and a carto_geocode_metadata
column with additional information regarding the geocoding results.
Address-level geocoding requires the advanced Analytics Toolbox for Snowflake/Redshift to be available for your connection. Please get in touch at support@carto.com and we will guide you through the installation process.
To geocode your data, select geocode by Latitude/Longitude and fill in the options:
select the columns of your table where the latitude and longitude coordinates are stored.
optionally, specify the name of the geometry column (geom
by default) where the result of the geocoding will be stored.
Bear in mind that the expected input are WGS84 coordinates in separate columns for latitude and longitude.
The decimal separator should always be a point, for example: 40.534243
Then, click on Continue. A new dialog will appear allowing you to confirm your selection. Click on the Geocode button to confirm or click Cancel to abort the process.
As a result of the geocoding process, a new geometry column will be added to your existing table containing the points corresponding to your latitude/longitude coordinates.