Skip to content

Conversation

@tcld
Copy link
Contributor

@tcld tcld commented Oct 18, 2015

This makes more use of numpy, even though only for the exports (and those don't take too much time anyway). I also put some work into the GDAL export() method; there might have been a bug or two and I wanted to give worldengine the opportunity to make use of more of the formats GDAL supports. (Even though I don't like GDAL since it was a pain to install. I created an instruction, though. Maybe it can be added somewhere.)

In draw.py I added an import for the PyPNG-library which is used to export 16 Bit grayscale images.

All of this is based on this #138 and there may be some things in here that need a bit of discussion. Due to some of the changes and the connection to #138 this will not pass the tests for now.

EDIT: Oh, Travis doesn't know the PyPNG-module I imported. Well, this still needs a tiny bit of polish. :)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The _equal code doesn't seem to be used by the WE library. Can this be moved __init__.py in tests?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is also used as World.operator== - I am not sure if there are any world-comparisons in the code outside of the tests. But I guess it is worth a try and the code can be moved, yes.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

On second thought the removal would leave the world-class without a functioning equality-operator. At the same time it is not only usable for that class... I wouldn't feel good about moving this to the tests, I prefer it here. (I found quite a lot of functions spread over various files that are never called or even referenced... maybe it is time for a bit of cleanup, though.)

@tcld
Copy link
Contributor Author

tcld commented Oct 18, 2015

@psi29a If you want to look at the code, you should probably start with the branch this is based on (#138) unless you want to verify it all at once.

@psi29a
Copy link
Member

psi29a commented Oct 20, 2015

You'll need to add PyPNG to tox.ini

@tcld
Copy link
Contributor Author

tcld commented Oct 20, 2015

Ok, thanks. Since this #144 (comment) is now merged, I should probably rename the worldengine-data files to fit the new format (py3_seed...). I was away all day and didn't manage to do it before I left. I will finish everything up as soon as possible and hopefully the tests will run fine again. :)

tcld added 18 commits October 20, 2015 23:20
…arrays.

Some smaller functions make use of numpy now.
…esponsible for half of all function calls during world-generation (i.e. tens of millions).
Added support for 16 Bit grayscale images that will be used for heightmaps and during black_and_white export.
@tcld
Copy link
Contributor Author

tcld commented Oct 29, 2015

This is going to be broken down into pure numpy-rewrites of parts of the image-code #161, a rework of the GDAL export #159 and the 16 Bit grayscale heightmaps I promised somewhere (that branch is not yet fully separated; no PR for now).

@tcld tcld closed this Oct 29, 2015
@tcld tcld deleted the numpy+images branch October 29, 2015 17:48
@tcld tcld mentioned this pull request Oct 31, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants