Skip to content

PicartaAI/Picarta-Aerial-Imagery

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Picarta-Aerial-Imagery

Overview

Overview

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.

Authentication

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.

Installation

To install the picarta package, use pip:

pip install picarta

Usage

Request Format

The API accepts HTTP POST requests with a JSON payload containing the following parameters:

  • api_token: User's API token.
  • aerial_image: Set to True for aerial imagery. If False, 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.

Example Request using the picarta Package

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 file

Response Format

The API returns:

  • JSON Output containing the estimated GPS coordinates in a structured format.
  • KML File for visualization in mapping applications like Google Earth.

Example API Response

{
  "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

Example Image

Note

For non-aerial images, please refer to this repository: Picarta API for general image geolocation.

Contact Information

For any inquiries or assistance, feel free to contact us via:

Releases

No releases published

Packages

 
 
 

Contributors