Given that your csv or other tabular data was imported with it's longitude and latitude data as columns 'longitude' and 'latitude' there are two queries that you can consider depending on whether or not they were imported as text or float.
Imported as Text:
select *, ST_SetSRID( ST_MakePoint( cast(longitude as float), cast(latitude as float) ), 4326) as geom from dataset_14472
Imported as Float:
select *, ST_SetSRID( ST_MakePoint(longitude, latitude), 4326) as geom from dataset_14472
Using these queries in the advanced queries page and then creating a dataset from the query will turn your tabular data into a spatial dataset.
For more helpful queries, view the postgis documentation on ST_MakePoint and ST_SetSRID.
Comments
0 comments
Please sign in to leave a comment.