refraction_render.renderers.land_model¶
-
class
refraction_render.renderers.
land_model
(ellps='sphere')[source]¶ Bases:
object
This class is used to grab slices of the tarrain alon great circle slices of the earth.
-
__init__
(ellps='sphere')[source]¶ Simple wrapper which does the bilinear interpolation of terrain data.
- Parameters
- ellps: str, optional
String representing which pyproj datum to use for the data being interpolated.
Methods
__init__
([ellps])Simple wrapper which does the bilinear interpolation of terrain data.
add_elevation_data
(*args[, smooth])Add terrain data to the interpolated model.
get_terrain
(lat, lon, heading, dist)Sample terrain along geodesic defined by an intial latitude and longitude point along a heading at different distances.
Attributes
flag if True the terrain object has land else it has no land.
-
add_elevation_data
(*args, smooth=False)[source]¶ Add terrain data to the interpolated model.
- Parameters
- args: tuple
tuple which contains elevation data: if len(args) == 3: args = (lats,lons,elevation) which contains the regular grid values and elevation values on that grid. if len(args) == 2: args = (points,elevation) which contains unstructured collection of points for the elevation data.
- smooth: bool, optional
If True, then use 3rd order bivariate spline to interpolate data, otherwise use faster linear interpolation. default is False.
-
get_terrain
(lat, lon, heading, dist)[source]¶ Sample terrain along geodesic defined by an intial latitude and longitude point along a heading at different distances.
- Parameters
- lat: array_like
latitude(s) which starting point(s) begin at
- lon: array_like
longitude(s) which starting point(s) begin at
- heading: array_like
heading(s) which determine which direction to go on the spheriod
- dist: array_like
distance(s) in meters of how far to go along the heading
Notes
This function follows NumPy’s broadcasting rules for handing arguments of different shapes.
-
property
has_data
¶ flag if True the terrain object has land else it has no land.
-