Geolocation is an informative metadata, but it's not always embedded in the image. Users can input the latitude and longitude in the form, but it's time-consuming to switch to another page with a map, find out the coordinates, and then copy and paste the values.
To make it easier to input and edit geolocation data, the user could directly click on a map to extract the coordinates.
GeoDjango is a full app for dealing with geolocation data in Django. It might be an overkill for what we need, but it does seem to have a built-in functionality for extracting coordinates from a map by clicking (PointField). See this article for an example approach.
This functionality was included in the desktop editor Véliger. See the DockGeo class and the functions therein. How to convert between sexagesimal and decimal is here.
Currently, the fields storing latitude and longitude are regular a CharField. But perhaps more appropriate would be a DecimalField. The FloatField apparently is not ideal for that. How many digits should we include in these decimal values? According to this table, four digits give us an 11-meter accuracy, which should be good enough for the type of data we have. Or perhaps five digits (1m)? (also see the responses here)
Some map frameworks and APIs:
Leaflet. Open-source library using OpenStreetMap (free). It can capture the lat/long when the user clicks on the map.
Google Maps. The embed API has the functionality we need and is free for unlimited requests.
Mapbox. Has a nice static interface that can fulfill our needs. But the free tier is limited to 50k requests per month.
Bing Maps. Free plan limited to 10k requests per month.
Geolocation is an informative metadata, but it's not always embedded in the image. Users can input the latitude and longitude in the form, but it's time-consuming to switch to another page with a map, find out the coordinates, and then copy and paste the values.
To make it easier to input and edit geolocation data, the user could directly click on a map to extract the coordinates.
GeoDjango is a full app for dealing with geolocation data in Django. It might be an overkill for what we need, but it does seem to have a built-in functionality for extracting coordinates from a map by clicking (
PointField
). See this article for an example approach.This functionality was included in the desktop editor Véliger. See the
DockGeo
class and the functions therein. How to convert between sexagesimal and decimal is here.Currently, the fields storing latitude and longitude are regular a
CharField
. But perhaps more appropriate would be aDecimalField
. TheFloatField
apparently is not ideal for that. How many digits should we include in these decimal values? According to this table, four digits give us an 11-meter accuracy, which should be good enough for the type of data we have. Or perhaps five digits (1m)? (also see the responses here)Some map frameworks and APIs: