The Picarta Image Geolocalization API 🌍🔍 allows users to georeference aerial images captured by aircraft, drones, and satellites. By providing an image (either as a local file or via a URL), the API returns its estimated GPS coordinates.
To access the API, users need to provide an API token in the request headers. Users can obtain an API token by registering on the Picarta website.
To install the picarta package, use pip:
pip install picartaThe API accepts HTTP POST requests with a JSON payload containing the following parameters:
api_token: User's API token.aerial_image: Set toTruefor aerial imagery. IfFalse, use Picarta API for general image geolocation.img_path: image path or URL of the image to localize.center_latitude: Latitude of the center of the search area.center_longitude: Longitude of the center of the search area.radius: Radius of the search area around the center point in km.camera_altitude: (Optional) Estimated altitude of the camera in meters.
from picarta import Picarta
api_token = "YOUR_API_TOKEN"
localizer = Picarta(api_token)
# Geolocate a local image
gps_bbox_json, gps_bbox_kml = localizer.localize(
aerial_image=True, # Must be True for aerial images
img_path="img_vatican.jpg",
center_latitude=41.9022,
center_longitude=12.4580,
radius=1,
camera_altitude=300
)
print(gps_bbox_json) # Prints JSON output
if gps_bbox_kml is not None:
gps_bbox_kml.save("gps_bbox.kml") # Save the KML fileThe API returns:
- JSON Output containing the estimated GPS coordinates in a structured format.
- KML File for visualization in mapping applications like Google Earth.
{
"bbox": {
"bottom_left": {
"lat": 41.899539947509766,
"lon": 12.461053848266602
},
"bottom_right": {
"lat": 41.9051628112793,
"lon": 12.460865020751953
},
"top_left": {
"lat": 41.89933395385742,
"lon": 12.451663970947266
},
"top_right": {
"lat": 41.90496826171875,
"lon": 12.451440811157227
}
},
"camera_maker": null,
"camera_model": null,
"center": {
"lat": 41.90225124359131,
"lon": 12.456255912780762
},
"timestamp": null
}KML
For non-aerial images, please refer to this repository: Picarta API for general image geolocation.
For any inquiries or assistance, feel free to contact us via:
- Email: info@picarta.ai
- Discord: Join our Discord channel
- Share your feedback: API Feedback Survey

