Ezone

class pylayers.gis.ezone.Ezone(prefix)[source]

Bases: pylayers.util.project.PyLayers

Earth zone

An Ezone is a class related to a region of Earth delimited by (lonmin,lonmax,latmin,latmax)

An Ezone gathers raster and vector data
  • raster data comes either from srtm or aster data

  • vector data comes from openstreetmap

An Ezone is stored in hdf5 format

extenttuple (lonmin,lonmax,latmin,latmax)

dictionnary of cities

pll : point lower left pur : point upper right m : Basemap coordinates converter

Methods Summary

build(_fileosm, _filehgt, _filelcv)

build an Ezone from heterogeneous files

building(ltile)

get building in arrays from a list of subtiles

cover(**kwargs)

coverage around a point

getdem()

get a digital elevation model

loadh5()

load Ezone from an hdf5 file

loadh5old(_fileh5)

load an Ezone from hdf5 file

loadtmp([_fileh5])

load an Ezone from hdf5 file

ls()

profile(pa, pb, **kwargs)

profile extraction between 2 points

rebase([source])

reevaluate base

rennes()

Building are stored in quadTree.

route(pa, pb, **kwargs)

coverage on a route

saveh5()

save Ezone in hdf5 format

show(**kwargs)

show Ezone

showcov(triang, val[, vmin, vmax, cmap, …])

Show a coverage

to_kmz(**kwargs)

export to kmz file

tocart([Nx, Ny, source])

convert to cartesian coordinates

Methods Documentation

build(_fileosm, _filehgt, _filelcv)[source]

build an Ezone from heterogeneous files

building(ltile)[source]

get building in arrays from a list of subtiles

ltile : list of strings

cover(**kwargs)[source]

coverage around a point

pcnp.array

center point in lonlat coordinates

Nphiint

Number of angular direction

Nrint

Number of points along radius

Rmaxfloat

Radius maximum (meters)

Hrfloat

Receiver height

Htfloat

Transmitter height

Kfloat

K factor

triang, L

getdem()[source]

get a digital elevation model

lon : float lat : float

loadh5()[source]

load Ezone from an hdf5 file

prefix : string

Structure of the hdf5. The file has the following groups

extent dem

srtm aster

bldg
u’ia-b’

info poly

loadh5old(_fileh5)[source]

load an Ezone from hdf5 file

_fileh5 : string

loadtmp(_fileh5='RennesFull.h5')[source]

load an Ezone from hdf5 file

_fileh5 :

ls()[source]
profile(pa, pb, **kwargs)[source]

profile extraction between 2 points

patuple

termination point a

pbtuple

termination point b

Nptint

number of points

hafloat

antenna height a

hb :

antenna height b

Kfloat

K factor

fGHzfloat

frequency in GHz

sourcestring

‘aster’ | ‘srtm’

heightnp.array (,Npt)

total heigh including eath curvature

dnp.array(,Npt)

horizontal distance along the link

dhnp.array(,Npy)

earth curvature depending on K factor

nunp.array(,Npt)

Fresnel parameter

numnp.array(1,Npt)

Fresnel parameter above threshold (default : -sqrt(2))

hlos(,Npt)

height of the line of sight

ellFresnel(2,N)

Fresnel ellipsoid set of points

rebase(source='srtm')[source]

reevaluate base

sourcestring

source of data ‘srtm’ or ‘aster’

This methods recalculate the longitude and latitude base based on the DEM source choice aster or srtm

rennes()[source]

Building are stored in quadTree. The centroid of the building is converted into an integer which denotes the corresponding quadtree. lbdg is the list of the quadtrees

route(pa, pb, **kwargs)[source]

coverage on a route

panp.array (1x2)

lon,lat

pbnp.array (Nx2)

lon,lat

Nr : Ha : float

antenna a height

Hbfloat

antenna b height

fGHzfloat

frequency

Kfloat

K facteur (default 4/3)

method : source : binterb : boolean

interpolation (default True)

L : Loss lon lat

saveh5()[source]

save Ezone in hdf5 format

_fileh5

show(**kwargs)[source]

show Ezone

title : string xlabel : string ylabel : string height : boolean

display dem if True

bldgboolean

display building if True

btileboolean

display tile overlay with smopy

coordstring

‘lonlat’| ‘cartesian’

source: string

‘srtm’ | ‘aster’

extent : [lonmin,lomax,latmin,latmax]

fig,ax

If height is False the DEM is not displayed. If extent is a void list all the tile is displayed

showcov(triang, val, vmin=-130, vmax=-50, cmap=<matplotlib.colors.LinearSegmentedColormap object>, bbuild=False, btile=True)[source]

Show a coverage

triang : triangulation val : values

to_kmz(**kwargs)[source]

export to kmz file

tocart(Nx=1201, Ny=1201, source='srtm')[source]

convert to cartesian coordinates

Nxint

Number of points along x

Nxint

Number of points along y