Skip to content

Commit

Permalink
handle files in addition to pipelines
Browse files Browse the repository at this point in the history
  • Loading branch information
hobu committed Mar 13, 2024
1 parent 92ae081 commit eec0b33
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/trenchrun/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__='0.2.3'
__version__='0.2.4'
7 changes: 3 additions & 4 deletions src/trenchrun/data.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ def getStage(self):

class Daylight(object):
def __init__(self, dsm: DSM):
self.name = 'Daylight'
self.name = 'Daylight'
self.path = pathlib.Path(tempfile.NamedTemporaryFile(suffix='.tif', delete=False).name)
self.dsm = dsm

Expand Down Expand Up @@ -124,7 +124,7 @@ def __init__(self, args ):
self.args = args
self.name = 'Reader'

self.reader_args = None
self.reader_args = []
if 'reader_args' in self.args:
with open(self.args.reader_args,'r') as f:
self.reader_args = json.loads(f.read())
Expand All @@ -138,13 +138,12 @@ def get(self):
if self.inputType == 'pipeline':
reader = self.readPipeline()
else:
reader = readFile()
reader = self.readFile()

return reader
def readFile(self):
reader = pdal.Reader(str(self.args.input), *self.reader_args)
pipeline = reader.pipeline()
breakpoint()
return pipeline

def readPipeline(self):
Expand Down

0 comments on commit eec0b33

Please sign in to comment.