Giter VIP home page Giter VIP logo

py3dtiles's Introduction

Forked from https://gitlab.com/Oslandia/py3dtiles

Changes have been made in this fork to better support the Cesium B3DM Batched 3D Models geometry and Feature Tables.

The gitlab-oslandia branch is used to pull in changes from the original creators on GitLab. This branch should be kept up to-to-date with the master GitLab branch. To pull in changes locally, first add the GitLab repo as a remote, then pull in changes from GitLab, and finally, push them to GitHub. From the directory that contains this repo:

git checkout gitlab-oslandia
git remote add gitlab https://gitlab.com/Oslandia/py3dtiles.git # First time only
git pull gitlab
git push origin

When ready to update our version:

git checkout develop
git merge gitlab-oslandia
git push

README content from the original repository is below.


image

image

py3dtiles

py3dtiles is a Python tool and library for manipulating 3D Tiles.

CLI Features

  • Convert pointcloud LAS and XYZ files to a 3D Tiles tileset (tileset.json + pnts files)
  • Merge pointcloud 3D Tiles tilesets into one tileset
  • Read pnts and b3dm files and print a summary of their contents

API features

  • Read/write pointcloud (pnts) and batched 3d model format

py3dtiles is distributed under the Apache 2 Licence.

Gitlab repository: https://gitlab.com/Oslandia/py3dtiles

Documentation :

py3dtiles's People

Contributors

autra avatar delhomer avatar elemoine avatar jailln avatar jeremy-gaillard avatar jmkerloch avatar julietcohen avatar kastanday avatar koyaani avatar laurenwalker avatar ldgeo avatar lorenzomarnat avatar mholthausen avatar nikosaul avatar pblottiere avatar peppsac avatar robyngit avatar smellman avatar troopa81 avatar vpicavet avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Forkers

wangxiya

py3dtiles's Issues

Filepath must exist before tiles can be created

In class Tile(ABC).save_as(filename) to save a tile with a provided filename, the full folder structure must already exist. However, I'd like that file structure to be created automatically.

+ from pathlib import Path

...

    def save_as(self, filename):
        tile_arr = self.to_array()
+        # kastan -- create file if doesn't exist.
+        filepath = Path(filename)
+        filepath.parent.mkdir(parents=True, exist_ok=True)
+        filepath.touch(exist_ok=True)

        with open(filename, 'bw') as f:
            f.write(bytes(tile_arr))

If that sounds reasonable I'll submit a PR.

Pull in new commits from py3dtiles oslandia

The gitlab-oslandia branch is used to pull in changes from the original creators on GitLab and then merge with our version. All of the history prior to ~ July 2018 has been incorporated into our version of py3dtiles, however, we have yet to merge in newer updates. To accomplish this, we need to merge in commits one at a time and test along the way, since it's likely there will be conflicts between our updates and the oslandia updates. To track these updates, here is a list of the commits to merge:

  • cac2193 2018-06-28 --- py3dtiles refactoring (Pierre-Eric Pelloux-Prayer)
  • a53fb71 2018-09-27 --- fix: remove nose dependancy and fix travis.yml (Pierre-Eric Pelloux-Prayer)
  • 0f0e77d 2018-09-27 --- fix: replace np.fromstring by np.frombuffer (Pierre-Eric Pelloux-Prayer)
  • 4e4d367 2018-09-27 --- Merge pull request #26 from Oslandia/fix_readme_warnings (Pierre-Eric Pelloux-Prayer)
  • e0bf87d 2018-10-05 --- fix(packaging): use zip_safe=False (Pierre-Eric Pelloux-Prayer)
  • b6f6848 2018-10-08 --- Merge pull request #29 from Oslandia/fix_issue_25 (Pierre-Eric Pelloux-Prayer)
  • 4efa0a1 2018-10-11 --- Change license from LGPL2 to Apache 2 in setup.py (Éric Lemoine)
  • cffd2ed 2018-10-11 --- docs: change py3dtiles description (Éric Lemoine)
  • d15956b 2018-10-11 --- docs: split docs into separate files (Éric Lemoine)
  • d61e55c 2018-10-11 --- Merge pull request #31 from Oslandia/license (Pierre-Eric Pelloux-Prayer)
  • 6aa6498 2018-10-11 --- docs: move 3rd party assets to LICENSE (Éric Lemoine)
  • fd7dd4d 2018-10-11 --- Merge pull request #32 from Oslandia/readme (Éric Lemoine)
  • 30af2e4 2018-10-11 --- docs: fix docs links in README (Éric Lemoine)
  • 0282ddb 2018-10-11 --- Merge pull request #33 from Oslandia/readme (Éric Lemoine)
  • 41ddfed 2018-10-18 --- fix: remove call to memory_usage (pierre-eric)
  • 85b1370 2018-10-18 --- fix: better error handling when missing input srs (pierre-eric)
  • 7010e30 2018-10-18 --- fix: dont write asset.gltfUpAxis attribute in tilesets (pierre-eric)
  • a8bd062 2018-10-18 --- fix: rename content.url -> content.uri (pierre-eric)
  • 53580ba 2018-10-23 --- fix: use y-up orientation for glTF objects in export script (Jeremy Gaillard)
  • 65d6f67 2018-10-23 --- fix: proper bounding box size in export script (Jeremy Gaillard)
  • 6abad9c 2018-10-25 --- Merge pull request #40 from Oslandia/fix_issue_30 (Pierre-Eric Pelloux-Prayer)
  • 763e46e 2018-10-26 --- feat: merge small pnts in their parent (Pierre-Eric Pelloux-Prayer)
  • f55669b 2018-10-29 --- Merge pull request #41 from Oslandia/merge_small_pnts (Pierre-Eric Pelloux-Prayer)
  • 1347272 2019-02-22 --- feat: add reading of .xyz file format (Pierre-Eric Pelloux-Prayer)
  • 2cc6895 2019-07-04 --- docs: fix a 404 url (Raphaël Delhome)
  • a70e060 2019-07-09 --- convert: fix process for .xyz file that contain RGB values fix #53 (Raphaël Delhome)
  • 446155a 2019-05-24 --- Chore: remove useless requirements (Augustin Trancart)
  • e9bbd17 2019-05-24 --- chore: add an .editorconfig (Augustin Trancart)
  • 5af1b71 2019-08-01 --- CI: update to latest ubuntu LTS (Augustin Trancart)
  • 919c098 2019-08-01 --- CI: fix build badge status url (Augustin Trancart)
  • ec12cdf 2019-08-01 --- CI: add linter (Augustin Trancart)
  • 4648202 2019-08-01 --- Semantic change: rename Tile to TileContent (Augustin Trancart)
  • 62a740a 2019-12-02 --- Bump version because breaking change: 2.0.0 (Augustin Trancart)
  • be4f852 2019-12-02 --- doc: use sphinx (Augustin Trancart)
  • 9f7198f 2019-12-02 --- Switch to rtd theme (Augustin Trancart)
  • 87b1bc2 2019-12-02 --- Doc: a bit of wording (Augustin Trancart)
  • 5d1661a 2019-12-02 --- doc: copy theme layout to add a github link (Augustin Trancart)
  • 2fb7e9a 2019-12-02 --- doc: typo (Augustin Trancart)
  • a2dbac7 2019-12-02 --- Make convert importable from python code (Augustin Trancart)
  • 34bce56 2019-12-03 --- Document convert method (Augustin Trancart)
  • c0be224 2019-12-06 --- Give a more explicit name to fn (Augustin Trancart)
  • b29130e 2019-12-06 --- Convert: allow str in addition to list of str (Augustin Trancart)
  • 288d8f9 2019-12-10 --- Test: add a basic test for convert (Augustin Trancart)
  • ae1357d 2019-12-03 --- doc: remove READTHEDOCS condition to display version (Augustin Trancart)
  • bf28341 2019-12-03 --- doc: display version and generate api doc (Augustin Trancart)
  • f0419e2 2020-01-20 --- Give better error messages when we need srs_in (Augustin Trancart)
  • 775ade1 2020-01-20 --- Create a faq for some issues (Augustin Trancart)
  • 7b55f39 2020-01-20 --- Use setup.py in .travis.yml instead of duplicating deps (Augustin Trancart)
  • 4b70246 2020-01-20 --- Add tests (Augustin Trancart)
  • c91ab92 2020-01-20 --- Delay the conversion directory when we're sure we will convert (Augustin Trancart)
  • 5d66708 2020-01-20 --- I think we should allow [] here (Augustin Trancart)
  • 9a7ab71 2020-01-24 --- Adds optional support for database host and port (Michael Holthausen)
  • ffc17ac 2020-01-24 --- Enhancement of the documentation (Michael Holthausen)
  • 537fd19 2020-01-30 --- Update documentation for exporting from database (Julien Cabieces)
  • 9ec2034 2020-01-31 --- Merge branch 'master' into database-config (Michael Holthausen)
  • 5c60fe8 2020-01-31 --- Merge pull request #70 from mholthausen/database-config (Raphael Delhome)
  • 27c1ec9 2020-02-13 --- Don't crash if the output folder does not exists and overwrite is True (Augustin Trancart)
  • 2d94ace 2020-07-01 --- tests: switch to gitlab-ci (Augustin Trancart)
  • 150a371 2020-07-01 --- Fix flake8 (Augustin Trancart)
  • 2d3904f 2020-07-01 --- Merge branch 'add_ci_gitlab' into 'master' (Augustin Trancart)
  • ba59f1e 2020-07-01 --- Get rid of liblas, not installable on new distros (Augustin Trancart)
  • 0c58527 2020-07-01 --- Merge branch 'get_rid_of_liblas' into 'master' (Augustin Trancart)
  • 41401b6 2020-01-30 --- Fix the help message of '-i' argument, for export command (Frédéric Bonifas)
  • 2690b4a 2020-01-30 --- doc: virtualenv creation (Frédéric Bonifas)
  • 710a359 2020-01-30 --- doc: file formats of the info command (Frédéric Bonifas)
  • fb30caa 2020-07-02 --- Merge branch 'update_doc' into 'master' (Augustin Trancart)
  • bec9e16 2020-07-02 --- Merge branch 'cli_export' into 'master' (Augustin Trancart)
  • da02f89 2020-07-01 --- Add missing fixtures (Augustin Trancart)
  • 1825bd4 2020-07-01 --- Make flake8 happy (Augustin Trancart)
  • 14b4f50 2020-07-02 --- CI: add missing package to build llvmlite, needed by some deps (Augustin Trancart)
  • 68e6e26 2020-07-02 --- Fix for python3.5 (Augustin Trancart)
  • 156448e 2020-07-02 --- Fix reading of srs for stretch (Augustin Trancart)
  • ffde5f1 2020-07-02 --- Merge branch 'fix_build' into 'master' (Augustin Trancart)
  • c34bdd7 2020-07-02 --- Synchronize with upstream changes (Augustin Trancart)
  • dcb6525 2020-07-02 --- Doc: replace github with gitlab (Augustin Trancart)
  • 9f20a26 2020-07-02 --- Doc: use sphinx-multiversion to generate one doc by version (Augustin Trancart)
  • e80a146 2020-07-02 --- Doc: setup CI to build the doc (Augustin Trancart)
  • f35146c 2020-07-02 --- Document the documentation process (Augustin Trancart)
  • 968adf5 2020-07-02 --- Doc: fix title (Augustin Trancart)
  • 144e17a 2020-07-02 --- Doc: fix linter error (Augustin Trancart)
  • deacf63 2020-07-02 --- Doc: make sphinx-multiversion play nicely with gitlab-ci (Augustin Trancart)
  • 39fdfba 2020-07-03 --- Merge branch 'doc' into 'master' (Augustin Trancart)
  • e97ef63 2020-07-03 --- Fix numba deprecation warning (Augustin Trancart)
  • 57e5365 2020-07-03 --- Fix numpy warning (Augustin Trancart)
  • 55f27c4 2020-07-03 --- Merge branch 'numba_fixes' into 'master' (Augustin Trancart)
  • fd2105a 2020-07-10 --- Fix gltf min and max values (jailln)
  • 13ad546 2020-09-18 --- Merge branch 'gltf-min-max' into 'master' (Augustin Trancart)
  • 465b409 2020-01-30 --- Consider a postgres service file in order to define the connexion to database (related to #74) (Frédéric Bonifas)
  • ea9b008 2020-07-02 --- docs: update the export command documentation (Raphaël Delhome)
  • bab6e38 2020-09-22 --- export: f-string valid since Python3.6 (hence CI for py35 pipeline fails) (Raphaël Delhome)
  • 9752fb9 2020-09-22 --- Merge branch 'use-pg-service-conf' into 'master' (Raphael Delhome)
  • f3501da 2020-10-03 --- fix: avoid to pass non-serializable object to zmq process (Taro Matsuzawa aka. btm)
  • 58d852e 2020-10-03 --- Merge branch 'serialize_srs_in' into 'master' (Augustin Trancart)
  • 015ea9c 2021-09-03 --- Pin dependencies before we can upgrade (Augustin Trancart)
  • 5fee211 2021-09-03 --- Python 3.5 is EOL (Augustin Trancart)
  • a425922 2021-09-06 --- Merge branch 'pin_deps' into 'master' (gitlab/feature/add_sonarcloud_analysis) (Julien Cabieces)
  • 4acc806 2022-03-23 --- Upgrade laspy dependency to <=2.0,>3 (Antoine Facchini)
  • 6cd6bc8 2022-03-23 --- support from 3.7 python version (Antoine Facchini)
  • 9f74f63 2022-03-23 --- use numpy version from 3.20 to 3.22 (Antoine Facchini)
  • fe819b3 2022-03-24 --- change Python version in CI (Antoine Facchini)
  • 06d003d 2022-03-24 --- remove useless comment (Antoine Facchini)
  • 2d753c0 2022-03-24 --- Merge branch 'laspy-2.0' into 'master' (Augustin Trancart)
  • 46b7c1c 2022-03-24 --- Fix laspy usage: use chunk iterator (Augustin Trancart)
  • 72351bf 2022-03-25 --- Merge branch 'fix_laspy_read' into 'master' (Augustin Trancart)
  • fc24e92 2022-03-24 --- support .laz (Antoine Facchini)
  • 2a7b11f 2022-03-25 --- add help about lastools tools (Antoine Facchini)
  • b28203b 2022-03-24 --- convert list to np.array (Antoine Facchini)
  • 93d4d7c 2022-03-25 --- Merge branch 'support-laz' into 'master' (Antoine Facchini)
  • 6381ce9 2022-03-25 --- Merge branch 'warning-numba' into 'master' (Antoine Facchini)
  • fa012d7 2021-03-05 --- Add test for winding order when triangulating (Augustin Trancart)
  • 3603b00 2021-03-15 --- fix: reliably select triangulation projection plane and orientation (Augustin Trancart)
  • 4c46614 2022-03-25 --- Merge branch 'new_triangulation_fix' into 'master' (Augustin Trancart)
  • 1fc37bb 2022-03-24 --- Calculate color scale by file instead of assuming it's the same (Augustin Trancart)
  • b1d11f6 2022-03-29 --- Merge branch 'fix_color_scale' into 'master' (Augustin Trancart)
  • fa70f5a 2022-03-31 --- sonarcloud analysis and review CI for python version definition and coverage result (Jean-Marie KERLOCH)
  • ce842bc 2022-03-31 --- Merge branch 'feature/fix_test_ci' into 'master' (Jean-Marie KERLOCH)
  • 6a63eee 2022-03-31 --- force sonarcloud analysis (jmkerloch)
  • 45cb0ad 2022-03-31 --- fix .gitlab-ci.yml for sonarcloud analysis (jmkerloch)
  • 37fb09b 2022-03-31 --- restore sonar and test only on *.py files (jmkerloch)
  • 3111741 2022-05-09 --- Fix coverage ci (Augustin Trancart)
  • a7635e9 2022-05-10 --- Merge branch 'fix_coverage_report' into 'master' (Augustin Trancart)
  • cbb9530 2022-05-09 --- Fix xyz conversion when offset_scale is None (Augustin Trancart)
  • 8dce5a5 2022-05-10 --- Fix: don't allow aabb size to be 0 on an axis (Augustin Trancart)
  • 1907a1c 2022-05-12 --- Merge branch 'fix_xyz' into 'master' (Augustin Trancart)
  • 8cea602 2022-05-12 --- Test: use only one thread when testing convert() (Augustin Trancart)
  • 79000b6 2022-05-12 --- Chore: also lint tests folder (Augustin Trancart)
  • 6576aea 2022-05-12 --- Chore: lint test folder (Augustin Trancart)
  • b93b588 2022-05-12 --- Ci: fix pages build (Augustin Trancart)
  • 9d61acd 2022-05-13 --- Chore: also generate pages on tags creation (Augustin Trancart)
  • 793e8dc 2022-05-16 --- Merge branch 'fix_gitlab_pages_again' into 'master' (Augustin Trancart)
  • 3878381 2022-05-16 --- Merge branch 'test_convert_one_job' into 'master' (Augustin Trancart)
  • 0f9f07f 2022-05-16 --- Merge branch 'lint_test_folder' into 'master' (Augustin Trancart)
  • 18124a7 2022-05-12 --- Chore: changelog and how to release for v2.0 (Augustin Trancart)
  • 7975887 2022-05-12 --- Doc: good links for doc in readme (Augustin Trancart)
  • 39369f4 2022-05-16 --- Merge branch 'v2.0_prepare_release' into 'master' (tag: v2.0.0) (Augustin Trancart)
  • 9aef189 2022-05-16 --- Doc: update the release doc (Augustin Trancart)
  • 00dcdf3 2022-05-17 --- Chore: rename tile.py file and its classes to better match 3dtiles spec (Lorenzo Marnat)
  • 7e53d92 2022-05-19 --- add enum classes for messages (Antoine)
  • 1c70602 2022-05-19 --- refactoring messaging (Antoine)
  • 63ccbd1 2022-05-24 --- move instruction in condition (Antoine)
  • f4d1523 2022-05-25 --- Fix typo (Vincent Picavet)
  • 38aaae1 2022-05-31 --- fix var name and imports (Antoine)
  • 6f67a79 2022-05-27 --- optimize import and remove aliases (Antoine)
  • c94e59e 2022-05-27 --- simplify write_tileset (Antoine)
  • d68a266 2022-05-27 --- reorganize convert (Antoine)
  • 80dd66f 2022-05-27 --- simplify utility process function (Antoine)
  • 13d7e72 2022-05-27 --- fix diff extension in input files (Antoine)
  • cb98d8a 2022-05-27 --- modify style of convert() (Antoine)
  • 47a90ad 2022-05-27 --- clean up and simplify conditions (Antoine)
  • 12026f3 2022-05-27 --- comment name_to_filename (Antoine)
  • 4de17e6 2022-05-27 --- remove unused var (Antoine)
  • 1a97915 2022-05-30 --- support for python 3.7... (Antoine)
  • 9e92880 2022-05-30 --- add test on name_to_filename (Antoine)
  • 53d6687 2022-05-31 --- create dir recursively (Antoine)
  • dbb32f0 2022-05-27 --- create the class Worker (Antoine)
  • a6795f1 2022-05-27 --- create the class ZmqManager (Antoine)
  • 85aa84b 2022-05-27 --- refactor the class State (Antoine)
  • 122d633 2022-05-30 --- simplify the function convert (Antoine)
  • 1268c0f 2022-05-31 --- better var names and comments (Antoine)
  • 7db655a 2022-06-13 --- fix minor sonarcloud issues (Antoine)
  • dcada11 2022-06-13 --- create Convert class (Antoine)
  • 48bd770 2022-06-13 --- move debug code in methods (Antoine)
  • d67d3f5 2022-06-13 --- transform write_tileset to method (Antoine)
  • 52f96be 2022-06-13 --- split init method (Antoine)
  • f43620a 2022-06-13 --- split convert method in smaller ones (Antoine)
  • a8d2c86 2022-06-13 --- rename class (Antoine)
  • c10e6f5 2022-06-13 --- fix indentation issues (Antoine)
  • 1042d09 2022-06-13 --- simplify process_message (Antoine)
  • 2638c31 2022-06-21 --- move conditions outside methods (Antoine)
  • 2904575 2022-06-29 --- Fix a wrong var name renaming (HEAD -> gitlab-oslandia, origin/gitlab-oslandia, gitlab/master) (Antoine)

(Note, to re-create this list, use git log --reverse --since "JUL 11 2018" --until "AUG 4 2022" --pretty=format:"- [ ] %h **%ad** --- %s %d *(%an)*" --date=short > COMMITS-TO-MERGE.md)

Make use of the new BoundingVolume, Extension, Tile, Tileset and ThreeDTilesNotion classes

In merge request #111, Oslandia added many of the classes and functionality that we created in the viz-3dtiles repo. We should consider making use of the classes and features that are now native to py3dtiles, and consider deprecating the use of viz-3dtiles in our workflow. This will require investigating whether or not the py3dtiles update includes all of the features we created in viz-3dtiles. If not, we have the option of either continuing to use those features via viz-3dtiles, OR moving those extra features into our version of py3dtiles.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.