Skip to content

Commit

Permalink
Merge branch 'fix_build' into 'master'
Browse files Browse the repository at this point in the history
Fix build

See merge request Oslandia/py3dtiles!79
  • Loading branch information
autra committed Jul 2, 2020
2 parents bec9e16 + 156448e commit ffde5f1
Show file tree
Hide file tree
Showing 7 changed files with 11 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
stage: test
before_script:
- apt update
- apt install -y pdal
- apt install -y pdal llvm
script:
- pip install .
- pip install .[dev]
Expand Down
1 change: 1 addition & 0 deletions docs/install.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ Install

Dependencies:
- PDAL > 1.7
- llvm for numba

From pypi
~~~~~~~~~~~~
Expand Down
2 changes: 1 addition & 1 deletion py3dtiles/command_line.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ def main():
export.main(args)
else:
parser.print_help()
except Exception as e:
except Exception:
traceback.print_exc()
print('')
parser.print_help()
Expand Down
2 changes: 1 addition & 1 deletion py3dtiles/export.py
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ def arrays2tileset(positions, normals, bboxes, transform, ids=None):

# Export b3dm & tileset
tileset = tree.to_tileset(transform)
f = open("tileset.json".format(node.id), 'w')
f = open("tileset.json", 'w')
f.write(json.dumps(tileset))
print("Creating tiles...")
nodes = tree.all_nodes()
Expand Down
6 changes: 4 additions & 2 deletions py3dtiles/points/task/las_reader.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,10 @@ def init(files, color_scale=None, srs_in=None, srs_out=None, fraction=100):
pointcloud_file_portions += [(filename, p)]

if (srs_out is not None and srs_in is None):
summary = json.loads(subprocess.check_output(['pdal', 'info', '--summary', filename]))['summary']
if 'srs' not in summary:
# NOTE: decode is necessary because in python3.5, json cannot decode bytes. Remove this once 3.5 is EOL
output = subprocess.check_output(['pdal', 'info', '--summary', filename]).decode('utf-8')
summary = json.loads(output)['summary']
if 'srs' not in summary or 'proj4' not in summary['srs'] or not summary['srs']['proj4']:
raise SrsInMissingException('\'{}\' file doesn\'t contain srs information. Please use the --srs_in option to declare it.'.format(filename))
srs_in = summary['srs']['proj4']

Expand Down
5 changes: 3 additions & 2 deletions py3dtiles/points/task/node_process.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,9 @@ def _process(nodes, octree_metadata, name, raw_datas, queue, begin, log_file):
log_enabled = log_file is not None

if log_enabled:
print('[>] process_node: "{}", {}'.format(
name, len(raw_datas), file=log_file, flush=True))
print('[>] process_node: "{}", {}'.format(name, len(raw_datas)),
file=log_file,
flush=True)

node = node_catalog.get_node(name)

Expand Down
Binary file added tests/fixtures/with_srs.las
Binary file not shown.

0 comments on commit ffde5f1

Please sign in to comment.