Update vworldr.py#1
Open
isaachenoweth wants to merge 138 commits into
Hidden character warning
The head ref may contain hidden characters: "dekr\u00fcft"
Open
Conversation
First steps at being able to use a greyscale image as a terrain map -Can read in image -Convert greyscale to elevation -Place initial seeds on terrain -Grow trees. Known bugs/to be done: -Trees increase in elevation every iteration -Can't pass image file name from Vida.py to modules -Image file is read from file every time an object's elevation is needed. This is slow. -Seed dispersal is _probably_ broken -Calculation of shading needs to be updated to account for elevation -Way to define elevation scale if image lacks elevation metadata
First versions of terrain import
Reads the image in once at beginning. Had to include conversion to bytes to allow for pickling
not fixed yet. in progress
First working version of terrain importing. •Seems to correctly place trees and canopies on terrain. •Makes a terrain dxf mesh (as a seperate file) Bugs: •Pretty sure propagules in canopies are placed in the incorrect locations (z) •Propagules in canopies are oversize •trees clip into terrain when terrain is too choppy (probably not a bug) •terrain is 1 pixel too small in 2 directions
pixel values in tiff might be a tuple. This catches that possability
Input terrain info could be as a file or as a folder holding files. If the input if a folder, find a tiff in there Parse a asc file in the folder if it exists to get min/max elevation
Terrain 9/14/2020 Update
Terrain updates from 9/14/2020 Meeting
instead of iterating over all files in a directory, use glob.glob. That's what I get for coding with a headache.
copy/paste error in that the destination variable name wasn't changed
Updated yaml.load calls to bring code in line with recommendations and stop the warning messages
Added the global variable set, and then edited out hardcoded absMax/absMin code. Reads those values in from the ini filr or are provided at the command line.
Needed to set the "tiff found" flag to true when it is actually true
-Doesn't use waterLevel defined in ini or on commandline -I'm unsure whether it can be transparent
bump to copyright and added the ability to use scaled elevation to get seed placement
•bump copyright •instead of passing multiple parameters, pass the garden object and get the parameters from it •use the world size instead of image size to make mesh dimensions °Why +1? The mesh was consistently off by 1m in x and y dimensions. It's an off-by-one bug, but I'm not sure why yet •added ability to send scaled elevation to get elevation from pixels
•bump copyright •bump version •misc clean up of unneeded comments and old unused code •big addition is adding ability to read in xlsx files from GIS that have cell size, elevation etc. This is used to calculate the scaling factor to override what is read in from the ini or what is entered at the command line •included a fix for letting it call "py -3" vs "python3" on windows •new command line -iscale for manual entering of scaling factor to adjust elevation
introduced a student requested feature where a list of species can be used in killzones and safe zones
Max value for elevation was laughably large
moved the code blocks around to make the import of terrain image and xlsx files easier to understand. changed some feedback messages, too
Trying to debug the problem where trees end up below the terrain. This placement file puts seeds all along the outside edges
An event file for testing the increase in water levels. 5m increase every 5 years
Code clean up. Deleted a long unused, commented out code block. Commented out old, unused code. Left in place for now in case something comes up and it's actually needed
•Changed the "experimental distance from mother" cause of death to "Janzen mortality" •reworked the submersion mortality. If a tree is completely submerged, it dies. If a tree is factionally submerged (defined in the world prefs yml as 'maxSubmerged'), it dies.
Some converters don't see solid elements in dxf of actual 3d objects, so I replaced all of them with 3dface elements. New 3dface primitive: cube. Also put in place code to replace dxfwrite with ezdxf, but I want to hold off on that until the current project based on terrain is complete
bug when starting seed is not provided as a file
Unexpected float where should be an int
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Unexpected float where should be an int