Commit Graph

77 Commits (master)

Author SHA1 Message Date
Gaël de Sailly 4bacbe902e Added wetland biome, with papyrus
Also made the distinction between the different types of wetlands recognized by Corine Land Cover.
2019-05-31 01:10:46 +01:00
Gael-de-Sailly c5591b3b06 Change data length/sign according to min-max values.
It enables support for float images, by the way.
2018-03-09 17:57:43 +01:00
Gael-de-Sailly 8f1f754596 Removed prints 2018-03-09 17:57:26 +01:00
Gael-de-Sailly f53bf3f57c Added options to disable trees, plants, and landcover in Lua side 2018-03-04 13:23:49 +01:00
Gael-de-Sailly 7bd9a4b513 Added scale and offset options 2018-03-04 12:38:37 +01:00
Gael-de-Sailly 923ffde573 Top layer: small fixes 2018-02-28 19:38:42 +01:00
Gael-de-Sailly c47e29a01c README.md: Add advise to use 0.5.0 2018-02-24 00:17:51 +01:00
Gael-de-Sailly 2f8d2c75f4 Set scale at 1 by default 2018-02-24 00:13:12 +01:00
Gael-de-Sailly 7014e2b16b Add descriptions for land cover table files 2018-02-24 00:12:39 +01:00
Gael-de-Sailly c4e5af7072 Divide elevations by scale
(so scale is hardcoded in the database)
This can reduce hugely the size of the database
(compression more efficient)
2018-02-22 19:17:17 +01:00
Gael-de-Sailly 469995a84e Updated documentation 2018-02-22 19:03:50 +01:00
Gael-de-Sailly daab17372d Added desert and rainforest biomes 2018-02-22 18:52:45 +01:00
Gael-de-Sailly 60b2818309 Re-organized land cover tables
Added modis.lct, land cover table for MODIS
2018-02-22 18:44:24 +01:00
Gael-de-Sailly f697ce5f51 Fix metadata being interpreted as bytes on some computers
Read them as bytes so that we are sure it's bytes,
and then convert them into string.
2018-02-22 18:17:46 +01:00
Gael-de-Sailly c64b50df2b Fixed mapgen loop
It was wrong for negative elevations.
2018-02-22 18:16:48 +01:00
Gael-de-Sailly 9430ea9baf Rewritten documentation
Removed everything about former command line instructions, documented land cover and rivers, listed all options from GUI.
2018-02-22 01:58:28 +01:00
Gael-de-Sailly 79c4a2d602 "Drainage basin" is a more appropriate name than "Catchment area". 2018-02-22 01:46:53 +01:00
Gael-de-Sailly d8aabdeb63 Do not generate decoration above rivers 2018-02-21 23:03:06 +01:00
Gael-de-Sailly 0ec8729160 Added button to set region coords to full-size 2018-02-21 22:12:08 +01:00
Gael-de-Sailly 5c3246f62c Added logs for image converter 2018-02-21 21:14:57 +01:00
Gael-de-Sailly 6e0ac101d6 Removed debug prints 2018-02-21 20:50:49 +01:00
Gael-de-Sailly fb7dc79dbf Add decorations
They are defined in decorations.csv, and biomes.csv defines which biome use which decoration.
There is still a problem about the size of the schematics: the code can't detect it, but it would be needed to place the center of the schematic at the desired place, and not the corner.
Waiting until schematics flags are usable in minetest.place_schematic_on_vmanip...
2018-02-21 16:26:24 +01:00
Gael-de-Sailly 146527c050 Captions for land cover file entries 2018-02-21 01:43:56 +01:00
Gael-de-Sailly 92bea0c6ec Created biome "sea" with default:water
and associated it with values 42-44 for Corine Land Cover
2018-02-21 01:42:57 +01:00
Gael-de-Sailly 90114cf5fd Fixed top node not appearing when there is no filler node 2018-02-21 01:19:52 +01:00
Gael-de-Sailly 0a2ecc1634 Fix small chunk boundaries artifacts 2018-02-20 20:56:34 +01:00
Gael-de-Sailly 650ca48fee Fixed name of river water
(default:river_water_source)
2018-02-20 20:55:56 +01:00
Gael-de-Sailly 15bdedeb5c Implemented biome on Lua-side
Decorations are not implemented yet, only the different materials of the ground.
2018-02-20 20:39:14 +01:00
Gael-de-Sailly 4d6adc295f Added CSV reader for Lua
to deal with biomes.csv and decorations.csv
(not implemented yet)
2018-02-20 18:14:38 +01:00
Gael-de-Sailly bb86f054e0 Added ability to define map projection
if it can't be detected automatically.
2018-02-20 17:36:31 +01:00
Gael-de-Sailly 7f187fc565 Added support for landcover file on Python side.
It's now able to generate the database with landcover data.
Not implemented on Lua side for now.
2018-02-20 11:59:50 +01:00
Gael-de-Sailly dff33b5ac1 Added landcover.py
Converts the raw landcover image into an array of biome numbers as defined by an index file
2018-02-20 11:29:32 +01:00
Gael-de-Sailly e086c899fd Added some biomes, and a biome table file
matching Corine Land Cover
2018-02-19 12:38:54 +01:00
Gael-de-Sailly 9646287098 Add biomes CSV files 2018-02-19 12:38:54 +01:00
Gael-de-Sailly 5ee88896cf Change read map function:
It's now based on a reference image (usually the heightmap),
whose projection is used for other images,
unless it's specified to reproject the image.
2018-02-19 12:32:01 +01:00
Gael-de-Sailly c204e1fa71 Fix type check in database.py 2018-02-19 12:31:36 +01:00
Gael-de-Sailly 91db2f5bda Fixed start points for river algorithm
They were shift by 1 node.
2018-02-19 02:02:23 +01:00
Gael-de-Sailly 570ac21cd4 Reorganize the code
Split up in 5 Python files:
- image_convert.py: main file, containing the GUI
- map_transform.py: projections, map reading, etc.
- geometry.py: small helper for map_transform.py
- database.py: generate the database
- rivers.py: the river algorithm
And various modifications.
It's now working even if it's still buggy and not documented.
2018-02-19 01:19:03 +01:00
Gael-de-Sailly b347226bc9 Add radio buttons to make resampling optional
Not implemented for now, only on GUI-side
2018-02-15 16:30:24 +01:00
Gael-de-Sailly a9dc79c175 Disable completely non-GUI mode
It becomes too complicated with the bunch of options.
2018-02-15 16:30:24 +01:00
Gael-de-Sailly 2765e6e548 Use gdal library, allow resampling images
Working but still unstable
Code to be cleaned...
2018-02-15 16:30:24 +01:00
Gael-de-Sailly 514c6c6970 Added GUI for region definition.
Not implemented for now.
2018-02-15 16:30:24 +01:00
Gael-de-Sailly 1829a2e747 Renamed variables "frameN" to more understandable names 2018-02-15 16:30:24 +01:00
Gael-de-Sailly 31877789b6 Added .gitignore to ignore __pycache__ 2018-02-15 16:28:49 +01:00
Gael-de-Sailly 85fc0bad53 Added classes for tkinter widgets
Code for widgets is very redundant, especially when you have several related widgets (for example a label near an entry field near a button). This class system hugely reduces the number of code lines needed to add a field.
2018-02-05 23:08:25 +01:00
Gael-de-Sailly 43dc4926b0 Rename variable "coefficient" to "river_power"
since it's not multiplicative.
2018-02-05 23:08:25 +01:00
Gael-de-Sailly 05bd2ac706 Allow metadata for layers,
up to 65,535 bytes.
Not used for now, but will be important for biomes.
2018-02-04 15:26:29 +01:00
Gael-de-Sailly 5d34444b08 Updated README 2018-02-04 12:34:10 +01:00
Gael-de-Sailly a82e1e2c91 Added titles to windows 2018-02-04 00:35:06 +01:00
Gael-de-Sailly 462e976f93 Added graphical interface with Tkinter for image_convert.py
Graphical mode is optional, use option "-g" to enable it. You can still launch the script in command line without "-g".
2018-02-04 00:35:06 +01:00