pyosp.cirsp package
Submodules
pyosp.cirsp.base_cir module
- class pyosp.cirsp.base_cir.Base_cir(center, raster, radius, ng_start=None, ng_end=None, ng_stepsize=1, radial_stepsize=None)
Bases:
object
Abstract class for circular swath profile.
- Parameters
center (str) – path to center shapefile
raster (str) – path to GeoRaster
radius (float) – radius of swath area
ng_start (int, optional) – starting angle
ng_end (int, optional) – ending angle
ng_stepsize (int, optional) – angular step-size, defaults to 1
radial_stepsize (int, optional) – radial step-size, defaults to None
- hist(bins=50, ax=None)
Return a histogram plot
- out_polygon()
Return a shapely polygon object
- out_polylines()
Return a shapely polyline object
- out_polyring(start=None, end=None)
Return a polygon showing a range of distances
- profile_plot(ax=None, color='navy', p_coords=None, **kwargs)
- profile_stat()
Return a list of summary statistics along each profileline
- slice_hist(angle, bins=10, ax=None)
Plot the histogram of slice
- Parameters
angle (int) – angle of cross-section wrt horizontal line
bins (int, optional) – number of bins, defaults to 10
- slice_plot(angle, ax=None)
Plot cross-section of swath data.
- Parameters
angle (int) – the angle of cross-section wrt horizontal line
- slice_polyline(angle)
Return the polyline of cross-section
- Parameters
angle (int) – angle of cross-section wrt horizontal line
- Returns
a shapely polyline object
- swath_data()
Return a list of elevation data along each profileline
pyosp.cirsp.elev_cir module
- class pyosp.cirsp.elev_cir.Elev_cir(center, raster, radius, min_elev=- inf, ng_start=0, ng_end=360, ng_stepsize=1, radial_stepsize=None)
Bases:
pyosp.cirsp.base_cir.Base_cir
Elevation-based circular swath profile characterization.
- Parameters
center (str) – path to center shapefile
raster (str) – path to GeoRaster
radius (float) – radius of swath area
min_elev (float) – minimal elevation threshold of swath apron
ng_start (int, optional) – starting angle
ng_end (int, optional) – ending angle
ng_stepsize (int, optional) – angular step-size, defaults to 1
radial_stepsize (int, optional) – radial step-size, defaults to None
pyosp.cirsp.orig_cir module
- class pyosp.cirsp.orig_cir.Orig_cir(center, raster, radius, ng_start=0, ng_end=360, ng_stepsize=1, radial_stepsize=None)
Bases:
pyosp.cirsp.base_cir.Base_cir
Original circular swath profile characterization.
- Parameters
center (str) – path to center shapefile
raster (str) – path to GeoRaster
radius (float) – radius of swath area
ng_start (int, optional) – starting angle
ng_end (int, optional) – ending angle
ng_stepsize (int, optional) – angular step-size, defaults to 1
radial_stepsize (int, optional) – radial step-size, defaults to None
pyosp.cirsp.slope_cir module
- class pyosp.cirsp.slope_cir.Slope_cir(center, raster, radius, min_slope=- inf, ng_start=0, ng_end=360, ng_stepsize=1, radial_stepsize=None)
Bases:
pyosp.cirsp.base_cir.Base_cir
Slope_based circular swath profile characterization.
- Parameters
center (str) – path to center shapefile
raster (str) – path to GeoRaster
radius (float) – radius of swath area
min_slope (float) – minimal slope threshold of swath apron
ng_start (int, optional) – starting angle
ng_end (int, optional) – ending angle
ng_stepsize (int, optional) – angular step-size, defaults to 1
radial_stepsize (int, optional) – radial step-size, defaults to None
pyosp.cirsp.tpi_cir module
- class pyosp.cirsp.tpi_cir.Tpi_cir(center, raster, radius, tpi_radius, min_tpi=- inf, ng_start=0, ng_end=360, ng_stepsize=1, radial_stepsize=None)
Bases:
pyosp.cirsp.base_cir.Base_cir
Elevation-based circular swath profile characterization.
- Parameters
center (str) – path to center shapefile
raster (str) – path to GeoRaster
radius (float) – radius of swath area
tpi_radius (float) – radius of TPI window
min_tpi (float, defaults to -inf) – minimal TPI threshold of swath apron
ng_start (int, optional) – starting angle
ng_end (int, optional) – ending angle
ng_stepsize (int, optional) – angular step-size, defaults to 1
radial_stepsize (int, optional) – radial step-size, defaults to None
Module contents
- class pyosp.cirsp.Base_cir(center, raster, radius, ng_start=None, ng_end=None, ng_stepsize=1, radial_stepsize=None)
Bases:
object
Abstract class for circular swath profile.
- Parameters
center (str) – path to center shapefile
raster (str) – path to GeoRaster
radius (float) – radius of swath area
ng_start (int, optional) – starting angle
ng_end (int, optional) – ending angle
ng_stepsize (int, optional) – angular step-size, defaults to 1
radial_stepsize (int, optional) – radial step-size, defaults to None
- hist(bins=50, ax=None)
Return a histogram plot
- out_polygon()
Return a shapely polygon object
- out_polylines()
Return a shapely polyline object
- out_polyring(start=None, end=None)
Return a polygon showing a range of distances
- profile_plot(ax=None, color='navy', p_coords=None, **kwargs)
- profile_stat()
Return a list of summary statistics along each profileline
- slice_hist(angle, bins=10, ax=None)
Plot the histogram of slice
- Parameters
angle (int) – angle of cross-section wrt horizontal line
bins (int, optional) – number of bins, defaults to 10
- slice_plot(angle, ax=None)
Plot cross-section of swath data.
- Parameters
angle (int) – the angle of cross-section wrt horizontal line
- slice_polyline(angle)
Return the polyline of cross-section
- Parameters
angle (int) – angle of cross-section wrt horizontal line
- Returns
a shapely polyline object
- swath_data()
Return a list of elevation data along each profileline
- class pyosp.cirsp.Elev_cir(center, raster, radius, min_elev=- inf, ng_start=0, ng_end=360, ng_stepsize=1, radial_stepsize=None)
Bases:
pyosp.cirsp.base_cir.Base_cir
Elevation-based circular swath profile characterization.
- Parameters
center (str) – path to center shapefile
raster (str) – path to GeoRaster
radius (float) – radius of swath area
min_elev (float) – minimal elevation threshold of swath apron
ng_start (int, optional) – starting angle
ng_end (int, optional) – ending angle
ng_stepsize (int, optional) – angular step-size, defaults to 1
radial_stepsize (int, optional) – radial step-size, defaults to None
- class pyosp.cirsp.Orig_cir(center, raster, radius, ng_start=0, ng_end=360, ng_stepsize=1, radial_stepsize=None)
Bases:
pyosp.cirsp.base_cir.Base_cir
Original circular swath profile characterization.
- Parameters
center (str) – path to center shapefile
raster (str) – path to GeoRaster
radius (float) – radius of swath area
ng_start (int, optional) – starting angle
ng_end (int, optional) – ending angle
ng_stepsize (int, optional) – angular step-size, defaults to 1
radial_stepsize (int, optional) – radial step-size, defaults to None
- class pyosp.cirsp.Slope_cir(center, raster, radius, min_slope=- inf, ng_start=0, ng_end=360, ng_stepsize=1, radial_stepsize=None)
Bases:
pyosp.cirsp.base_cir.Base_cir
Slope_based circular swath profile characterization.
- Parameters
center (str) – path to center shapefile
raster (str) – path to GeoRaster
radius (float) – radius of swath area
min_slope (float) – minimal slope threshold of swath apron
ng_start (int, optional) – starting angle
ng_end (int, optional) – ending angle
ng_stepsize (int, optional) – angular step-size, defaults to 1
radial_stepsize (int, optional) – radial step-size, defaults to None
- class pyosp.cirsp.Tpi_cir(center, raster, radius, tpi_radius, min_tpi=- inf, ng_start=0, ng_end=360, ng_stepsize=1, radial_stepsize=None)
Bases:
pyosp.cirsp.base_cir.Base_cir
Elevation-based circular swath profile characterization.
- Parameters
center (str) – path to center shapefile
raster (str) – path to GeoRaster
radius (float) – radius of swath area
tpi_radius (float) – radius of TPI window
min_tpi (float, defaults to -inf) – minimal TPI threshold of swath apron
ng_start (int, optional) – starting angle
ng_end (int, optional) – ending angle
ng_stepsize (int, optional) – angular step-size, defaults to 1
radial_stepsize (int, optional) – radial step-size, defaults to None