Convert-IMCoordinatesToLocation
SYNOPSIS
Converts GPS coordinates to a human-readable location name.
SYNTAX
Convert-IMCoordinatesToLocation [[-Session] <ImmichSession>] [-Latitude] <Double> [-Longitude] <Double>
[-ProgressAction <ActionPreference>] [<CommonParameters>]
DESCRIPTION
The Convert-IMCoordinatesToLocation function performs reverse geocoding to convert GPS latitude and longitude coordinates into a human-readable location name or address. This is useful for adding location context to assets that have GPS metadata but lack descriptive location information.
The function uses Immich's geocoding service to translate coordinate pairs into location names, which can help with organizing and searching assets by location.
EXAMPLES
EXAMPLE 1
Convert-IMCoordinatesToLocation -Latitude 51.496637 -Longitude -0.176370
Converts the coordinates for a location in London, UK to a human-readable address.
EXAMPLE 2
Convert-IMCoordinatesToLocation -Latitude 40.7128 -Longitude -74.0060
Converts coordinates for New York City to a location name.
EXAMPLE 3
$coords = @{Latitude = 37.7749; Longitude = -122.4194}
Convert-IMCoordinatesToLocation @coords
Uses splatting to convert San Francisco coordinates to a location name.
EXAMPLE 4
# Convert multiple coordinates from asset metadata
$assets | Where-Object {$_.exifInfo.latitude -and $_.exifInfo.longitude} |
ForEach-Object { Convert-IMCoordinatesToLocation -Latitude $_.exifInfo.latitude -Longitude $_.exifInfo.longitude }
Processes multiple assets to convert their GPS coordinates to location names.
PARAMETERS
-Session
Optionally define a immich session object to use. This is useful when you are connected to more than one immich instance.
-Session $Session
Type: ImmichSession
Parameter Sets: (All)
Aliases:
Required: False
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-Latitude
Specifies the latitude coordinate in decimal degrees format. Positive values represent locations north of the equator, while negative values represent locations south of the equator. Valid range is -90 to +90 degrees.
Type: Double
Parameter Sets: (All)
Aliases:
Required: True
Position: 2
Default value: 0
Accept pipeline input: False
Accept wildcard characters: False
-Longitude
Specifies the longitude coordinate in decimal degrees format. Positive values represent locations east of the Prime Meridian, while negative values represent locations west. Valid range is -180 to +180 degrees.
Type: Double
Parameter Sets: (All)
Aliases:
Required: True
Position: 3
Default value: 0
Accept pipeline input: False
Accept wildcard characters: False
-ProgressAction
{{ Fill ProgressAction Description }}
Type: ActionPreference
Parameter Sets: (All)
Aliases: proga
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.
INPUTS
OUTPUTS
NOTES
This function requires an active internet connection and access to geocoding services. Coordinate precision affects the accuracy of the returned location information.
RELATED LINKS
EDIT THIS DOC
This page was auto-generated from the powershell command comment based help. To edit the content of this page, update the script file comment based help on github Github