3dgeo-heidelberg / pytreedb

Python package providing a file and object-based database to store tree objects.
Other
28 stars 4 forks source link

Fix convert_to_csv method #49

Closed han16nah closed 2 years ago

han16nah commented 2 years ago

The "result_metrics.csv" output of the method convert_to_csv in pytreedb/db.py is not working as expected. Tree entries may have different tree metrics, i.e., not all trees have an entry for DBH. Right now, metrics for each tree are simply appended to a list in a loop and then written to the file and might therefore not correspond to the right column in the header. Maybe we first have to create the header and then find out at which position in the list metrics_line the value must be inserted..