I'm using geojson-tiler to convert a geojson to a 3D tileset. However, when I try to use the --is_roof option, the following error occurs:
geojson-tiler --is_roof True --paths example.json --output_dir temp/
1 file(s) with supported extensions found
Reading almere/test_triangle/geojsons/test_flip.geojson
Traceback (most recent call last):
File "/home/margriet/.pyenv/versions/3dtiles/bin/geojson-tiler", line 33, in <module>
sys.exit(load_entry_point('py3dtilers', 'console_scripts', 'geojson-tiler')())
File "/home/margriet/src/py3dtilers/py3dtilers/GeojsonTiler/GeojsonTiler.py", line 192, in main
tileset = geojson_tiler.from_geojson_directory(properties, geojson_tiler.args.is_roof, geojson_tiler.args.add_color, geojson_tiler.args.keep_properties)
File "/home/margriet/src/py3dtilers/py3dtilers/GeojsonTiler/GeojsonTiler.py", line 168, in from_geojson_directory
objects = Geojsons.parse_geojsons(features, properties, is_roof, color_attribute)
File "/home/margriet/src/py3dtilers/py3dtilers/GeojsonTiler/geojson.py", line 187, in parse_geojsons
if not feature.parse_geojson(properties, is_roof, color_attribute):
File "/home/margriet/src/py3dtilers/py3dtilers/GeojsonTiler/geojson_polygon.py", line 25, in parse_geojson
coord[2] -= self.height
IndexError: list index out of range
I'm using
geojson-tiler
to convert a geojson to a 3D tileset. However, when I try to use the--is_roof
option, the following error occurs:Some manual testing indicates that indeed
coords
only contains x and y coordinates, socoord[2]
doesn't exist (https://github.com/VCityTeam/py3dtilers/blob/f85ba8661f323e8b17562e663e8ddf0e8dab74a7/py3dtilers/GeojsonTiler/geojson_polygon.py#L25).Example json file: example.json