PyOSP-devs / PyOSP

An Python Library for Object-Oriented Swath Profile Analysis
https://github.com/PyOSP-devs/PyOSP
Apache License 2.0
18 stars 8 forks source link

Help Needed for new datasets #1

Open SR-Roweb opened 3 years ago

SR-Roweb commented 3 years ago

What is the best way to read a new/custom baseline and raster? I can use the pyosp.datasets.get_path for the datasets available, but struggle to read new datasets outside of the pyosp.dataset folder that will allow pyosp.Orig_curv to work

yzh211 commented 3 years ago

What is the best way to read a new/custom baseline and raster? I can use the pyosp.datasets.get_path for the datasets available, but struggle to read new datasets outside of the pyosp.dataset folder that will allow pyosp.Orig_curv to work

Please try:

import pyosp
line = "path to your line shapefile"
raster = "path to your raster file"
orig = pyosp.Orig_curv(line, raster, width=1, line_stepsize=None, cross_stepsize=None)

Make sure to change 'width', 'line_stepsize', and 'cross_stepsize' based on your needs.

See also: https://pyosp.readthedocs.io/en/latest/pyosp.curvsp.html#pyosp.curvsp.Orig_curv

SR-Roweb commented 3 years ago

Thank you very much, forgot to read through the modules link, all working well