Geo Features
Starsky provides comprehensive geolocation features to help you manage and visualize where your photos were taken. From storing GPS coordinates to syncing location data from GPX files and viewing maps, Starsky makes it easy to organize your photos by location.
π Overviewβ
The geo features in Starsky include:
- GPS Metadata Storage - Store latitude, longitude, and altitude in your photos
- GPX File Support - Import location tracks from GPS devices and mobile apps
- Reverse Geocoding - Automatically convert coordinates to city, state, and country names
- Map Visualization - View GPX tracks and photo locations on interactive maps
- Location Editing - Manually edit location data in the detail view
- API Endpoints - Programmatic access to geo sync and lookup features
πΊοΈ GPS Metadataβ
Starsky stores GPS information in your photos using IPTC and XMP metadata standards, ensuring compatibility with other photo management tools.
Supported GPS Fieldsβ
- GPS Latitude and Longitude - The exact coordinates where the photo was taken
- GPS Altitude - Elevation above sea level
- Location City - The city where the photo was taken
- Location State - The state or province (optional since v0.7.4)
- Location Country - The country name
- Location Country Code - ISO 3166-1 alpha-2 country code
All this information is stored directly in the image file metadata, so even if you remove the database, a rescan will restore the location information.
π² GPX File Supportβ
GPX (GPS Exchange Format) files contain location tracks recorded by GPS devices, fitness apps, or mobile tracking applications. Starsky can use these files to automatically add location data to photos.
How GPX Sync Worksβ
- Record Your Location - Use a sports app, fitness tracker, or GPS device to record your location while taking photos
- Export GPX File - Export the location track as a GPX file
- Import to Starsky - Place the GPX file in the same folder as your photos
- Sync Locations - Use the geo sync feature to match photo timestamps with GPS track points
The sync process matches the date and time of each photo with the corresponding location in the GPX track. Important: Your camera clock must be accurate for the locations to match correctly.
Viewing GPX Filesβ
Starsky can display GPX files with an interactive map powered by Leaflet and OpenStreetMap. When viewing a GPX file:
- See the complete track on an interactive map
- Zoom in/out to explore the route (GPX mode only)
- Use the unlock button to pan around the map
- View current location markers
- Enable touch zoom and double-click zoom when unlocked
π Reverse Geocodingβ
Reverse geocoding converts GPS coordinates into human-readable location names (city, state, country). This feature runs automatically during import or can be triggered manually.
Automatic Reverse Geocodingβ
Since version 0.7.0-beta.1, Starsky can automatically perform reverse geocoding during the import process. This means:
- Photos with GPS coordinates are automatically enriched with location names
- City, state, and country fields are populated without manual intervention
- Works seamlessly with the import workflow
Manual Reverse Geocodingβ
You can also trigger reverse geocoding manually:
- Through the web interface's detail view
- Using API endpoints (
/api/geo/syncor/api/geo-reverse-lookup) - Via command-line tools
Data Sourceβ
Starsky uses offline geocoding data files for reverse geocoding, which are downloaded automatically at startup (unless disabled via GeoFilesSkipDownloadOnStartup). This allows geocoding to work without requiring external API calls.
πΌοΈ Location in Detail Viewβ
When viewing a photo's details, you can:
- View GPS Coordinates - See the exact latitude, longitude, and altitude
- View Location Names - See the city, state, and country
- Edit Location Data - Manually update coordinates or location names
- Trigger Geo Sync - Initiate reverse geocoding for the current photo
The detail view provides a convenient way to verify and correct location information for individual photos.
π§ API Endpointsβ
Starsky provides several API endpoints for geo operations:
/api/geo/status (GET)β
Get the current geo sync status - useful for monitoring long-running sync operations.
/api/geo/sync (POST)β
Perform reverse lookup for geo information and/or add geo location based on a GPX file. This is the main endpoint for triggering geo sync operations.
/api/geo-reverse-lookup (GET)β
Perform reverse geo lookup for specific coordinates. Returns city, state, and country information.
βοΈ Configurationβ
GeoFilesSkipDownloadOnStartupβ
By default, Starsky downloads geo-related files on startup. You can disable this behavior with the GeoFilesSkipDownloadOnStartup configuration flag.
Recommended setting: false (default)
This ensures that geo data files are available when needed.
π Use Casesβ
Camera Without GPSβ
Many DSLR and mirrorless cameras don't have built-in GPS. Use Starsky's GPX sync feature to:
- Track your location with a mobile app while shooting
- Export the GPX file
- Let Starsky automatically match timestamps and add locations
Organizing by Locationβ
With location metadata properly tagged:
- Search for photos by city or country
- Create albums based on travel destinations
- Filter photos by geographic region
- Export location data with your photos
Privacy Controlβ
Location data is stored in the image metadata, giving you complete control. When publishing photos, you can:
- Choose to strip location metadata
- Keep GPS data private while sharing
- Maintain your own copy with full location details
π± Mobile Workflowβ
The typical mobile workflow for adding GPS data:
- Use a fitness or tracking app (Strava, Runkeeper, etc.) on your phone
- Record your activity while taking photos
- Export the GPX track from the app
- Import photos and GPX file together in Starsky
- Run geo sync to automatically add locations
This workflow is especially useful for hiking, travel photography, or any situation where your camera lacks GPS.
ποΈ Related Featuresβ
- Metadata Management - Learn more about metadata storage in Starsky
- Import Options - Configure automatic reverse geocoding during import
- Search - Search photos by location
- Bulk Editing - Update location data for multiple photos at once
π Technical Detailsβ
- Uses IPTC and XMP metadata standards
- Compatible with other photo management tools
- Location data stored directly in image files
- OpenStreetMap integration for maps and geocoding
- Leaflet-powered interactive map viewer
- Timestamp-based GPX track matching
- ISO 3166-1 alpha-2 country code support