Official websites use .gov
A .gov website belongs to an official government organization in the United States.

Secure .gov websites use HTTPS
A lock ( ) or https:// means you’ve safely connected to the .gov website. Share sensitive information only on official, secure websites.




::: {role=“main”}

Module sscws.coordinates

::: {#section-intro .section} Module defining classes to represent the coordinate related classes from https://sscweb.gsfc.nasa.gov/WebServices/REST/SSC.xsd.\

Copyright © 2013-2021 United States Government as represented by the National Aeronautics and Space Administration. No copyright is claimed in the United States under Title 17, U.S.Code. All Other Rights Reserved.

Expand source code

#!/usr/bin/env python3

#
# NOSA HEADER START
#
# The contents of this file are subject to the terms of the NASA Open
# Source Agreement (NOSA), Version 1.3 only (the "Agreement").  You may
# not use this file except in compliance with the Agreement.
#
# You can obtain a copy of the agreement at
#   docs/NASA_Open_Source_Agreement_1.3.txt
# or
#   https://sscweb.gsfc.nasa.gov/WebServices/NASA_Open_Source_Agreement_1.3.txt.
#
# See the Agreement for the specific language governing permissions
# and limitations under the Agreement.
#
# When distributing Covered Code, include this NOSA HEADER in each
# file and include the Agreement file at
# docs/NASA_Open_Source_Agreement_1.3.txt.  If applicable, add the
# following below this NOSA HEADER, with the fields enclosed by
# brackets "[]" replaced with your own identifying information:
# Portions Copyright [yyyy] [name of copyright owner]
#
# NOSA HEADER END
#
# Copyright (c) 2013-2023 United States Government as represented by
# the National Aeronautics and Space Administration. No copyright is
# claimed in the United States under Title 17, U.S.Code. All Other
# Rights Reserved.
#

"""
Module defining classes to represent the coordinate related classes from
<https://sscweb.gsfc.nasa.gov/WebServices/REST/SSC.xsd>.<br>

Copyright &copy; 2013-2021 United States Government as represented by the
National Aeronautics and Space Administration. No copyright is claimed in
the United States under Title 17, U.S.Code. All Other Rights Reserved.
"""

import xml.etree.ElementTree as ET
from enum import Enum
from abc import ABCMeta


class CoordinateSystem(Enum):
    """
    Enumerations representing the CoordinateSystem type defined
    in <https://sscweb.gsfc.nasa.gov/WebServices/REST/SSC.xsd>.
    """
    GEO = 'Geo'
    GM = 'Gm'
    GSE = 'Gse'
    GSM = 'Gsm'
    SM = 'Sm'
    GEI_TOD = 'GeiTod'
    GEI_J_2000 = 'GeiJ2000'

    @classmethod
    def from_identifier(
        cls,
        identifier: str
        ) -> 'CoordinateSystem':
        """
        Gets the Enum corresponding to the given identifier value.

        Parameters
        ----------
        cls
            class.
        identifier
            Enum value corresponding to a CoordinateSystem.
        Returns
        -------
        CoordinateSystem
            Enum corresponding to the given identifier value.
        Raises
        ------
        ValueError
            If the given identifier does not correspond to any
            CoordinateSystem value.
        """

        for member in cls:
            #if member.name == identifier or member.value == identifier:
            if identifier in (member.name, member.value):
                return member
        raise ValueError('Invalid CoordinateSystem identifier ' +
                         identifier)


class CoordinateSystemType(Enum):
    """
    Enumerations representing the CoordinateSystemType defined
    in <https://sscweb.gsfc.nasa.gov/WebServices/REST/SSC.xsd>.
    """
    SPHERICAL = 'Spherical'
    CARTESIAN = 'Cartesian'


class CoordinateComponent(Enum):
    """
    Enumerations representing the CoordinateComponent defined
    in <https://sscweb.gsfc.nasa.gov/WebServices/REST/SSC.xsd>.
    """
    X = 'X'
    Y = 'Y'
    Z = 'Z'
    LAT = 'Lat'
    LON = 'Lon'
    LOCAL_TIME = 'Local_Time'


class ProjectionCoordinateSystem(Enum):
    """
    Enumerations representing the ProjectionCoordinateSystem defined
    in <https://sscweb.gsfc.nasa.gov/WebServices/REST/SSC.xsd>.
    """
    GEO = 'Geo'
    GM = 'Gm'
    SM = 'Sm'


class Coordinates(metaclass=ABCMeta):
    """
    Class representing a Coordinates defined
    in <https://sscweb.gsfc.nasa.gov/WebServices/REST/SSC.xsd>.

    Parameters
    ----------
    sub_type
        Sub-type name.
    """
    def __init__(self,
                 sub_type: str):

        self._sub_type = sub_type


    def xml_element(self,
                    name: str = None) -> ET:
        """
        Produces the XML Element representation of this object.

        Parameters
        ----------
        name
            Element name.  If None, use class sub-type.

        Returns
        -------
        ET
            XML Element represenation of this object.
        """

        if name is not None:
            element_name = name
        else:
            element_name = self._sub_type + 'Coordinates'

        builder = ET.TreeBuilder()
        builder.start(element_name, {})
        builder.end(element_name)
        return builder.close()


    @property
    def sub_type(self) -> str:
        """
        Gets the sub_type value.

        Returns
        -------
        str
            sub_type value.
        """
        return self._sub_type


    @sub_type.setter
    def sub_type(self, value: str):
        """
        Sets the sub_type value.

        Parameters
        ----------
        value
            new sub_type value.
        """
        self._sub_type = value


class SurfaceGeographicCoordinates(Coordinates):
    """
    Class representing an SurfaceGeographicCoordinates from
    <https://sscweb.gsfc.nasa.gov/WebServices/REST/SSC.xsd>.

    Parameters
    ----------
    latitude
        Latitude.
    longitude
        Longitude.

    Raises
    ------
    ValueError
        If the given latitude/longitude values are invalid.
    """
    def __init__(self,
                 latitude: float,
                 longitude: float,
                 sub_type: str = None):

        super().__init__('SurfaceGeographic')

        if sub_type is not None:
            self._sub_type = sub_type

        if latitude < -90.0 or latitude > 90.0:
            raise ValueError('invalid latitude')
        if longitude < -180.0 or longitude > 360.0:
            raise ValueError('invalid longitude')

        self._latitude = latitude
        self._longitude = longitude


    @property
    def latitude(self) -> float:
        """
        Gets the latitude value.

        Returns
        -------
        bool
            latitude value.
        """
        return self._latitude


    @latitude.setter
    def latitude(self, value: float):
        """
        Sets the latitude value.

        Parameters
        ----------
        value
            new latitude value.
        """
        self._latitude = value


    @property
    def longitude(self) -> float:
        """
        Gets the longitude value.

        Returns
        -------
        str
            longitude value.
        """
        return self._longitude


    @longitude.setter
    def longitude(self, value: float):
        """
        Sets the longitude value.

        Parameters
        ----------
        value
            new longitude value.
        """
        self._longitude = value


    def xml_element(self,
                    name: str = None) -> ET:
        """
        Produces the XML Element representation of this object.

        Parameters
        ----------
        name
            Element name.  If None, use class sub-type.

        Returns
        -------
        ET
            XML Element represenation of this object.
        """
        xml_element = super().xml_element(name)

        builder = ET.TreeBuilder()
        builder.start('Latitude', {})
        builder.data(str(self._latitude))
        builder.end('Latitude')
        xml_element.append(builder.close())

        builder = ET.TreeBuilder()
        builder.start('Longitude', {})
        builder.data(str(self._longitude))
        builder.end('Longitude')
        xml_element.append(builder.close())

        return xml_element


class AltitudeGeographicCoordinates(SurfaceGeographicCoordinates):
    """
    Class representing an AltitudeGeographicCoordinates from
    <https://sscweb.gsfc.nasa.gov/WebServices/REST/SSC.xsd>.

    Parameters
    ----------
    latitude
        Latitude.
    longitude
        Longitude.
    altitude
        Altitude.

    Raises
    ------
    ValueError
        If the given latitude/longitude values are invalid.
    """
    def __init__(self,
                 latitude: float,
                 longitude: float,
                 altitude: float):

        super().__init__(latitude, longitude, 'AltitudeGeographic')

        self._altitude = altitude


    @property
    def altitude(self) -> float:
        """
        Gets the altitude value.

        Returns
        -------
        bool
            altitude value.
        """
        return self._altitude


    @altitude.setter
    def altitude(self, value: float):
        """
        Sets the altitude value.

        Parameters
        ----------
        value
            new altitude value.
        """
        self._altitude = value


    def xml_element(self,
                    name: str = None) -> ET:
        """
        Produces the XML Element representation of this object.

        Parameters
        ----------
        name
            Element name.  If None, use class sub-type.

        Returns
        -------
        ET
            XML Element represenation of this object.
        """
        xml_element = super().xml_element(name)

        builder = ET.TreeBuilder()
        builder.start('Altitude', {})
        builder.data(str(self._altitude))
        builder.end('Altitude')
        xml_element.append(builder.close())

        return xml_element

:::

::: section :::

::: section :::

::: section :::

::: section

Classes

{.flex .name .class}class {.flex .name .class}[AltitudeGeographicCoordinates{.flex .name .class}]{.ident} {.flex .name .class}({.flex .name .class}latitude: float, longitude: float, altitude: float){.flex .name .class} {.flex .name .class}

: ::: desc Class representing an AltitudeGeographicCoordinates from https://sscweb.gsfc.nasa.gov/WebServices/REST/SSC.xsd.

## Parameters

**`latitude`**
:   Latitude.

**`longitude`**
:   Longitude.

**`altitude`**
:   Altitude.

## Raises

`ValueError`
:   If the given latitude/longitude values are invalid.
:::

Expand source code

``` python
class AltitudeGeographicCoordinates(SurfaceGeographicCoordinates):
    """
    Class representing an AltitudeGeographicCoordinates from
    <https://sscweb.gsfc.nasa.gov/WebServices/REST/SSC.xsd>.

    Parameters
    ----------
    latitude
        Latitude.
    longitude
        Longitude.
    altitude
        Altitude.

    Raises
    ------
    ValueError
        If the given latitude/longitude values are invalid.
    """
    def __init__(self,
                 latitude: float,
                 longitude: float,
                 altitude: float):

        super().__init__(latitude, longitude, 'AltitudeGeographic')

        self._altitude = altitude


    @property
    def altitude(self) -> float:
        """
        Gets the altitude value.

        Returns
        -------
        bool
            altitude value.
        """
        return self._altitude


    @altitude.setter
    def altitude(self, value: float):
        """
        Sets the altitude value.

        Parameters
        ----------
        value
            new altitude value.
        """
        self._altitude = value


    def xml_element(self,
                    name: str = None) -> ET:
        """
        Produces the XML Element representation of this object.

        Parameters
        ----------
        name
            Element name.  If None, use class sub-type.

        Returns
        -------
        ET
            XML Element represenation of this object.
        """
        xml_element = super().xml_element(name)

        builder = ET.TreeBuilder()
        builder.start('Altitude', {})
        builder.data(str(self._altitude))
        builder.end('Altitude')
        xml_element.append(builder.close())

        return xml_element
```

### Ancestors

-   [SurfaceGeographicCoordinates](#sscws.coordinates.SurfaceGeographicCoordinates "sscws.coordinates.SurfaceGeographicCoordinates")
-   [Coordinates](#sscws.coordinates.Coordinates "sscws.coordinates.Coordinates")

### Instance variables

`var `{.name}[`altitude`{.name}]{.ident}` : float`{.name}

:   ::: desc
    Gets the altitude value.

    ## Returns

    `bool`
    :   altitude value.
    :::

    Expand source code

    ``` python
    @property
    def altitude(self) -> float:
        """
        Gets the altitude value.

        Returns
        -------
        bool
            altitude value.
        """
        return self._altitude
    ```

### Inherited members

-   **[`SurfaceGeographicCoordinates`](#sscws.coordinates.SurfaceGeographicCoordinates "sscws.coordinates.SurfaceGeographicCoordinates")**:
    -   [`latitude`](#sscws.coordinates.SurfaceGeographicCoordinates.latitude "sscws.coordinates.SurfaceGeographicCoordinates.latitude")
    -   [`longitude`](#sscws.coordinates.SurfaceGeographicCoordinates.longitude "sscws.coordinates.SurfaceGeographicCoordinates.longitude")
    -   [`sub_type`](#sscws.coordinates.Coordinates.sub_type "sscws.coordinates.SurfaceGeographicCoordinates.sub_type")
    -   [`xml_element`](#sscws.coordinates.Coordinates.xml_element "sscws.coordinates.SurfaceGeographicCoordinates.xml_element")

{.flex .name .class}class {.flex .name .class}[CoordinateComponent{.flex .name .class}]{.ident} {.flex .name .class}({.flex .name .class}value, names=None, *, module=None, qualname=None, type=None, start=1){.flex .name .class} {.flex .name .class}

: ::: desc Enumerations representing the CoordinateComponent defined in https://sscweb.gsfc.nasa.gov/WebServices/REST/SSC.xsd. :::

Expand source code

``` python
class CoordinateComponent(Enum):
    """
    Enumerations representing the CoordinateComponent defined
    in <https://sscweb.gsfc.nasa.gov/WebServices/REST/SSC.xsd>.
    """
    X = 'X'
    Y = 'Y'
    Z = 'Z'
    LAT = 'Lat'
    LON = 'Lon'
    LOCAL_TIME = 'Local_Time'
```

### Ancestors

-   enum.Enum

### Class variables

`var `{.name}[`LAT`{.name}]{.ident}

:   ::: desc
    :::

`var `{.name}[`LOCAL_TIME`{.name}]{.ident}

:   ::: desc
    :::

`var `{.name}[`LON`{.name}]{.ident}

:   ::: desc
    :::

`var `{.name}[`X`{.name}]{.ident}

:   ::: desc
    :::

`var `{.name}[`Y`{.name}]{.ident}

:   ::: desc
    :::

`var `{.name}[`Z`{.name}]{.ident}

:   ::: desc
    :::

{.flex .name .class}class {.flex .name .class}[CoordinateSystem{.flex .name .class}]{.ident} {.flex .name .class}({.flex .name .class}value, names=None, *, module=None, qualname=None, type=None, start=1){.flex .name .class} {.flex .name .class}

: ::: desc Enumerations representing the CoordinateSystem type defined in https://sscweb.gsfc.nasa.gov/WebServices/REST/SSC.xsd. :::

Expand source code

``` python
class CoordinateSystem(Enum):
    """
    Enumerations representing the CoordinateSystem type defined
    in <https://sscweb.gsfc.nasa.gov/WebServices/REST/SSC.xsd>.
    """
    GEO = 'Geo'
    GM = 'Gm'
    GSE = 'Gse'
    GSM = 'Gsm'
    SM = 'Sm'
    GEI_TOD = 'GeiTod'
    GEI_J_2000 = 'GeiJ2000'

    @classmethod
    def from_identifier(
        cls,
        identifier: str
        ) -> 'CoordinateSystem':
        """
        Gets the Enum corresponding to the given identifier value.

        Parameters
        ----------
        cls
            class.
        identifier
            Enum value corresponding to a CoordinateSystem.
        Returns
        -------
        CoordinateSystem
            Enum corresponding to the given identifier value.
        Raises
        ------
        ValueError
            If the given identifier does not correspond to any
            CoordinateSystem value.
        """

        for member in cls:
            #if member.name == identifier or member.value == identifier:
            if identifier in (member.name, member.value):
                return member
        raise ValueError('Invalid CoordinateSystem identifier ' +
                         identifier)
```

### Ancestors

-   enum.Enum

### Class variables

`var `{.name}[`GEI_J_2000`{.name}]{.ident}

:   ::: desc
    :::

`var `{.name}[`GEI_TOD`{.name}]{.ident}

:   ::: desc
    :::

`var `{.name}[`GEO`{.name}]{.ident}

:   ::: desc
    :::

`var `{.name}[`GM`{.name}]{.ident}

:   ::: desc
    :::

`var `{.name}[`GSE`{.name}]{.ident}

:   ::: desc
    :::

`var `{.name}[`GSM`{.name}]{.ident}

:   ::: desc
    :::

`var `{.name}[`SM`{.name}]{.ident}

:   ::: desc
    :::

### Static methods

` `{.name .flex}`def `{.name .flex}[`from_identifier`{.name .flex}]{.ident}`(`{.name .flex}`identifier: str) ‑> `{.name .flex}[`CoordinateSystem`{.name .flex}](#sscws.coordinates.CoordinateSystem "sscws.coordinates.CoordinateSystem")` `{.name .flex}

:   ::: desc
    Gets the Enum corresponding to the given identifier value.

    ## Parameters {#parameters}

    **`cls`**
    :   class.

    **`identifier`**
    :   Enum value corresponding to a CoordinateSystem.

    ## Returns {#returns}

    [`CoordinateSystem`](#sscws.coordinates.CoordinateSystem "sscws.coordinates.CoordinateSystem")
    :   Enum corresponding to the given identifier value.

    ## Raises {#raises}

    `ValueError`
    :   If the given identifier does not correspond to any
        CoordinateSystem value.
    :::

    Expand source code

    ``` python
    @classmethod
    def from_identifier(
        cls,
        identifier: str
        ) -> 'CoordinateSystem':
        """
        Gets the Enum corresponding to the given identifier value.

        Parameters
        ----------
        cls
            class.
        identifier
            Enum value corresponding to a CoordinateSystem.
        Returns
        -------
        CoordinateSystem
            Enum corresponding to the given identifier value.
        Raises
        ------
        ValueError
            If the given identifier does not correspond to any
            CoordinateSystem value.
        """

        for member in cls:
            #if member.name == identifier or member.value == identifier:
            if identifier in (member.name, member.value):
                return member
        raise ValueError('Invalid CoordinateSystem identifier ' +
                         identifier)
    ```

{.flex .name .class}class {.flex .name .class}[CoordinateSystemType{.flex .name .class}]{.ident} {.flex .name .class}({.flex .name .class}value, names=None, *, module=None, qualname=None, type=None, start=1){.flex .name .class} {.flex .name .class}

: ::: desc Enumerations representing the CoordinateSystemType defined in https://sscweb.gsfc.nasa.gov/WebServices/REST/SSC.xsd. :::

Expand source code

``` python
class CoordinateSystemType(Enum):
    """
    Enumerations representing the CoordinateSystemType defined
    in <https://sscweb.gsfc.nasa.gov/WebServices/REST/SSC.xsd>.
    """
    SPHERICAL = 'Spherical'
    CARTESIAN = 'Cartesian'
```

### Ancestors

-   enum.Enum

### Class variables

`var `{.name}[`CARTESIAN`{.name}]{.ident}

:   ::: desc
    :::

`var `{.name}[`SPHERICAL`{.name}]{.ident}

:   ::: desc
    :::

{.flex .name .class}class {.flex .name .class}[Coordinates{.flex .name .class}]{.ident} {.flex .name .class}({.flex .name .class}sub_type: str){.flex .name .class} {.flex .name .class}

: ::: desc Class representing a Coordinates defined in https://sscweb.gsfc.nasa.gov/WebServices/REST/SSC.xsd.

## Parameters {#parameters}

**`sub_type`**
:   Sub-type name.
:::

Expand source code

``` python
class Coordinates(metaclass=ABCMeta):
    """
    Class representing a Coordinates defined
    in <https://sscweb.gsfc.nasa.gov/WebServices/REST/SSC.xsd>.

    Parameters
    ----------
    sub_type
        Sub-type name.
    """
    def __init__(self,
                 sub_type: str):

        self._sub_type = sub_type


    def xml_element(self,
                    name: str = None) -> ET:
        """
        Produces the XML Element representation of this object.

        Parameters
        ----------
        name
            Element name.  If None, use class sub-type.

        Returns
        -------
        ET
            XML Element represenation of this object.
        """

        if name is not None:
            element_name = name
        else:
            element_name = self._sub_type + 'Coordinates'

        builder = ET.TreeBuilder()
        builder.start(element_name, {})
        builder.end(element_name)
        return builder.close()


    @property
    def sub_type(self) -> str:
        """
        Gets the sub_type value.

        Returns
        -------
        str
            sub_type value.
        """
        return self._sub_type


    @sub_type.setter
    def sub_type(self, value: str):
        """
        Sets the sub_type value.

        Parameters
        ----------
        value
            new sub_type value.
        """
        self._sub_type = value
```

### Subclasses

-   [SurfaceGeographicCoordinates](#sscws.coordinates.SurfaceGeographicCoordinates "sscws.coordinates.SurfaceGeographicCoordinates")

### Instance variables

`var `{.name}[`sub_type`{.name}]{.ident}` : str`{.name}

:   ::: desc
    Gets the sub_type value.

    ## Returns {#returns}

    `str`
    :   sub_type value.
    :::

    Expand source code

    ``` python
    @property
    def sub_type(self) -> str:
        """
        Gets the sub_type value.

        Returns
        -------
        str
            sub_type value.
        """
        return self._sub_type
    ```

### Methods

` `{.name .flex}`def `{.name .flex}[`xml_element`{.name .flex}]{.ident}`(`{.name .flex}`self, name: str = None) ‑> `{.name .flex}` `{.name .flex}

:   ::: desc
    Produces the XML Element representation of this object.

    ## Parameters {#parameters}

    **`name`**
    :   Element name. If None, use class sub-type.

    ## Returns {#returns}

    `ET`
    :   XML Element represenation of this object.
    :::

    Expand source code

    ``` python
    def xml_element(self,
                    name: str = None) -> ET:
        """
        Produces the XML Element representation of this object.

        Parameters
        ----------
        name
            Element name.  If None, use class sub-type.

        Returns
        -------
        ET
            XML Element represenation of this object.
        """

        if name is not None:
            element_name = name
        else:
            element_name = self._sub_type + 'Coordinates'

        builder = ET.TreeBuilder()
        builder.start(element_name, {})
        builder.end(element_name)
        return builder.close()
    ```

{.flex .name .class}class {.flex .name .class}[ProjectionCoordinateSystem{.flex .name .class}]{.ident} {.flex .name .class}({.flex .name .class}value, names=None, *, module=None, qualname=None, type=None, start=1){.flex .name .class} {.flex .name .class}

: ::: desc Enumerations representing the ProjectionCoordinateSystem defined in https://sscweb.gsfc.nasa.gov/WebServices/REST/SSC.xsd. :::

Expand source code

``` python
class ProjectionCoordinateSystem(Enum):
    """
    Enumerations representing the ProjectionCoordinateSystem defined
    in <https://sscweb.gsfc.nasa.gov/WebServices/REST/SSC.xsd>.
    """
    GEO = 'Geo'
    GM = 'Gm'
    SM = 'Sm'
```

### Ancestors

-   enum.Enum

### Class variables

`var `{.name}[`GEO`{.name}]{.ident}

:   ::: desc
    :::

`var `{.name}[`GM`{.name}]{.ident}

:   ::: desc
    :::

`var `{.name}[`SM`{.name}]{.ident}

:   ::: desc
    :::

{.flex .name .class}class {.flex .name .class}[SurfaceGeographicCoordinates{.flex .name .class}]{.ident} {.flex .name .class}({.flex .name .class}latitude: float, longitude: float, sub_type: str = None){.flex .name .class} {.flex .name .class}

: ::: desc Class representing an SurfaceGeographicCoordinates from https://sscweb.gsfc.nasa.gov/WebServices/REST/SSC.xsd.

## Parameters {#parameters}

**`latitude`**
:   Latitude.

**`longitude`**
:   Longitude.

## Raises {#raises}

`ValueError`
:   If the given latitude/longitude values are invalid.
:::

Expand source code

``` python
class SurfaceGeographicCoordinates(Coordinates):
    """
    Class representing an SurfaceGeographicCoordinates from
    <https://sscweb.gsfc.nasa.gov/WebServices/REST/SSC.xsd>.

    Parameters
    ----------
    latitude
        Latitude.
    longitude
        Longitude.

    Raises
    ------
    ValueError
        If the given latitude/longitude values are invalid.
    """
    def __init__(self,
                 latitude: float,
                 longitude: float,
                 sub_type: str = None):

        super().__init__('SurfaceGeographic')

        if sub_type is not None:
            self._sub_type = sub_type

        if latitude < -90.0 or latitude > 90.0:
            raise ValueError('invalid latitude')
        if longitude < -180.0 or longitude > 360.0:
            raise ValueError('invalid longitude')

        self._latitude = latitude
        self._longitude = longitude


    @property
    def latitude(self) -> float:
        """
        Gets the latitude value.

        Returns
        -------
        bool
            latitude value.
        """
        return self._latitude


    @latitude.setter
    def latitude(self, value: float):
        """
        Sets the latitude value.

        Parameters
        ----------
        value
            new latitude value.
        """
        self._latitude = value


    @property
    def longitude(self) -> float:
        """
        Gets the longitude value.

        Returns
        -------
        str
            longitude value.
        """
        return self._longitude


    @longitude.setter
    def longitude(self, value: float):
        """
        Sets the longitude value.

        Parameters
        ----------
        value
            new longitude value.
        """
        self._longitude = value


    def xml_element(self,
                    name: str = None) -> ET:
        """
        Produces the XML Element representation of this object.

        Parameters
        ----------
        name
            Element name.  If None, use class sub-type.

        Returns
        -------
        ET
            XML Element represenation of this object.
        """
        xml_element = super().xml_element(name)

        builder = ET.TreeBuilder()
        builder.start('Latitude', {})
        builder.data(str(self._latitude))
        builder.end('Latitude')
        xml_element.append(builder.close())

        builder = ET.TreeBuilder()
        builder.start('Longitude', {})
        builder.data(str(self._longitude))
        builder.end('Longitude')
        xml_element.append(builder.close())

        return xml_element
```

### Ancestors

-   [Coordinates](#sscws.coordinates.Coordinates "sscws.coordinates.Coordinates")

### Subclasses

-   [AltitudeGeographicCoordinates](#sscws.coordinates.AltitudeGeographicCoordinates "sscws.coordinates.AltitudeGeographicCoordinates")

### Instance variables

`var `{.name}[`latitude`{.name}]{.ident}` : float`{.name}

:   ::: desc
    Gets the latitude value.

    ## Returns {#returns}

    `bool`
    :   latitude value.
    :::

    Expand source code

    ``` python
    @property
    def latitude(self) -> float:
        """
        Gets the latitude value.

        Returns
        -------
        bool
            latitude value.
        """
        return self._latitude
    ```

`var `{.name}[`longitude`{.name}]{.ident}` : float`{.name}

:   ::: desc
    Gets the longitude value.

    ## Returns {#returns}

    `str`
    :   longitude value.
    :::

    Expand source code

    ``` python
    @property
    def longitude(self) -> float:
        """
        Gets the longitude value.

        Returns
        -------
        str
            longitude value.
        """
        return self._longitude
    ```

### Inherited members

-   **[`Coordinates`](#sscws.coordinates.Coordinates "sscws.coordinates.Coordinates")**:
    -   [`sub_type`](#sscws.coordinates.Coordinates.sub_type "sscws.coordinates.Coordinates.sub_type")
    -   [`xml_element`](#sscws.coordinates.Coordinates.xml_element "sscws.coordinates.Coordinates.xml_element")

:::

Index

::: toc :::

SSC Python API Feedback.

Generated by pdoc 0.9.2 at 2024-04-05T09:03:43 EDT.