class OutlookGeoCoordinates
A data class representing geographic coordinates, elevation, and their accuracy for a physical location in Microsoft Outlook/Office 365 context.
/tf/active/vicechatdev/SPFCsync/venv/lib64/python3.11/site-packages/office365/outlook/geo_coordinates.py
4 - 27
simple
Purpose
This class encapsulates geographic location data including latitude, longitude, altitude, and their respective accuracy measurements. It inherits from ClientValue, making it suitable for serialization and transmission in Office 365 API calls. Used to represent physical location information with precision metadata for Outlook-related geographic features.
Source Code
class OutlookGeoCoordinates(ClientValue):
"""The geographic coordinates, elevation, and their degree of accuracy for a physical location."""
def __init__(
self,
accuracy=None,
altitude=None,
altitude_accuracy=None,
latitude=None,
longitude=None,
):
"""
:param float accuracy: The accuracy of the latitude and longitude. As an example, the accuracy can be measured
in meters, such as the latitude and longitude are accurate to within 50 meters.
:param float altitude: The altitude of the location.
:param float altitude_accuracy: The accuracy of the altitude.
:param float latitude: The latitude of the location.
:param float longitude: The longitude of the location.
"""
self.accuracy = accuracy
self.altitude = altitude
self.altitudeAccuracy = altitude_accuracy
self.latitude = latitude
self.longitude = longitude
Parameters
| Name | Type | Default | Kind |
|---|---|---|---|
bases |
ClientValue | - |
Parameter Details
accuracy: The accuracy of the latitude and longitude measurements in meters. Indicates how precise the horizontal position is (e.g., accurate to within 50 meters). Optional float value, defaults to None.
altitude: The elevation/altitude of the location, typically measured in meters above sea level. Optional float value, defaults to None.
altitude_accuracy: The accuracy of the altitude measurement in meters. Indicates the precision of the vertical position. Optional float value, defaults to None.
latitude: The latitude coordinate of the location in decimal degrees, ranging from -90 (South Pole) to +90 (North Pole). Optional float value, defaults to None.
longitude: The longitude coordinate of the location in decimal degrees, ranging from -180 to +180, with 0 being the Prime Meridian. Optional float value, defaults to None.
Return Value
Instantiation returns an OutlookGeoCoordinates object with all geographic coordinate properties set. The object inherits from ClientValue, enabling it to be serialized for Office 365 API communication. All properties are accessible as instance attributes.
Class Interface
Attributes
| Name | Type | Description | Scope |
|---|---|---|---|
accuracy |
float | The accuracy of the latitude and longitude measurements in meters | instance |
altitude |
float | The altitude/elevation of the location in meters | instance |
altitudeAccuracy |
float | The accuracy of the altitude measurement in meters (camelCase for API compatibility) | instance |
latitude |
float | The latitude coordinate in decimal degrees (-90 to +90) | instance |
longitude |
float | The longitude coordinate in decimal degrees (-180 to +180) | instance |
Dependencies
office365
Required Imports
from office365.runtime.client_value import ClientValue
from office365.outlook.mail.geo_coordinates import OutlookGeoCoordinates
Usage Example
from office365.outlook.mail.geo_coordinates import OutlookGeoCoordinates
# Create a geo coordinate object for a specific location
coordinates = OutlookGeoCoordinates(
latitude=37.7749,
longitude=-122.4194,
altitude=52.0,
accuracy=10.0,
altitude_accuracy=5.0
)
# Access the properties
print(f"Location: {coordinates.latitude}, {coordinates.longitude}")
print(f"Altitude: {coordinates.altitude}m (±{coordinates.altitudeAccuracy}m)")
print(f"Horizontal accuracy: ±{coordinates.accuracy}m")
# Create a minimal coordinate object with just lat/long
basic_coords = OutlookGeoCoordinates(
latitude=40.7128,
longitude=-74.0060
)
# Use with Office 365 API (example context)
# This object can be assigned to location-aware Outlook entities
# event.location.coordinates = coordinates
Best Practices
- All parameters are optional, but for meaningful geographic data, at minimum latitude and longitude should be provided
- Latitude values should be between -90 and 90 degrees; longitude between -180 and 180 degrees
- Accuracy values should be positive numbers representing meters
- The class uses camelCase for the internal property 'altitudeAccuracy' to match Office 365 API conventions, while the constructor parameter uses snake_case (altitude_accuracy) following Python conventions
- This class inherits from ClientValue, which handles serialization for Office 365 API communication - do not manually serialize
- The object is immutable in practice after creation; modify by creating a new instance rather than changing properties
- When accuracy values are not known, leave them as None rather than guessing or using placeholder values
- Altitude is typically measured in meters above sea level; ensure consistent units when setting this value
Tags
Similar Components
AI-powered semantic similarity - components with related functionality:
-
class Location 73.0% similar
-
class FieldGeolocationValue 68.4% similar
-
class SignInLocation 60.6% similar
-
class PhysicalAddress 59.7% similar
-
class OutlookUser 56.3% similar