class documentation

class GeoLocation(_HasID, Label): (source)

View In Hierarchy

Location data in GeoJSON format.

Parameters
pointa [longitude, latitude] point
line

a line defined by coordinates as shown below:

[[lon1, lat1], [lon2, lat2], ...]
polygon

a polygon defined by coorindates as shown below:

[
    [[lon1, lat1], [lon2, lat2], ...],
    [[lon1, lat1], [lon2, lat2], ...],
    ...
]

where the first outer list describes the boundary of the polygon and any remaining entries describe holes

Class Method from_geo_json Creates a GeoLocation from a GeoJSON dictionary.
Method to_geo_json Returns a GeoJSON geometry dict for this instance.
Class Variable line Undocumented
Class Variable point Undocumented
Class Variable polygon Undocumented

Inherited from _HasID:

Class Variable tags Undocumented
Instance Variable id Undocumented
Method _id.setter Undocumented
Property _id Undocumented

Inherited from Label (via _HasID):

Method delete_attribute Deletes the attribute with the given name.
Method get_attribute_value Gets the value of the attribute with the given name.
Method has_attribute Determines whether the label has an attribute with the given name.
Method iter_attributes Returns an iterator over the custom attributes of the label.
Method set_attribute_value Sets the value of the attribute with the given name.
@classmethod
def from_geo_json(cls, d): (source)

Creates a GeoLocation from a GeoJSON dictionary.

Parameters
da GeoJSON dict
Returns
a GeoLocation
def to_geo_json(self): (source)

Returns a GeoJSON geometry dict for this instance.

Returns
a GeoJSON dict

Undocumented

Undocumented

Undocumented