Coords

class pylayers.gis.osmparser.Coords(idx=[], latlon=[])[source]

Bases: object

Coords describes a set of points in OSM

xy : latlon : cpt : minlon : maxlon : minlat : maxlat : boundary : np.array

(minlon,minlat,maxlon,maxlat)

Attributes Summary

cpt

latlon

maxlat

maxlon

minlat

minlon

xy

Methods Summary

cartesian([cart, delta, projection])

convert Latitude/Longitude in cartesian

clean()

reset coordinates

coords(coords)

calculates extrema of coords

filter(lexcluded)

from_nodes(nodes)

read coordinates from nodes

Attributes Documentation

cpt = 0
latlon = {}
maxlat = -1000
maxlon = -1000
minlat = 1000
minlon = 1000
xy = {}

Methods Documentation

cartesian(cart=False, delta=0, projection='cass')[source]

convert Latitude/Longitude in cartesian

cartBoolean

conversion to cartesian

deltaoffset

default 0 : in this case the origin corresponds to the lower left point

projection = [‘aeqd’,’gnom’,’ortho’,’geos’,’nsper’,’moll’,’lcc’,’laea’,’cass’]

This method converts latlon coordinates into cartesian x,y coordinates in a given projection (Default Cassini) relatively to specified latlon boundary The basemap objet for back and forth coordinates conversion is returned.

The transformation is centered on the mean of latitude and longitude. The cartesian origin (0,0) correspond to the lower left corner (lonmin,latmin)

m : Basemap converter

If boundary is modified cartesian coordinates change.

clean()[source]

reset coordinates

coords(coords)[source]

calculates extrema of coords

coords

filter(lexcluded)[source]
from_nodes(nodes)[source]

read coordinates from nodes

nodes : Nodes