{"id":15141016,"url":"https://github.com/flra0/world2minetest","last_synced_at":"2025-12-24T09:56:06.305Z","repository":{"id":142658860,"uuid":"393909497","full_name":"fyrk/world2minetest","owner":"fyrk","description":"Generate Minetest worlds based on real-world geodata","archived":false,"fork":false,"pushed_at":"2023-03-14T13:54:43.000Z","size":20640,"stargazers_count":13,"open_issues_count":2,"forks_count":2,"subscribers_count":4,"default_branch":"main","last_synced_at":"2024-10-29T21:27:42.628Z","etag":null,"topics":["citygml","cityjson","digital-elevation-model","dxf","heightmap","map-data","map-generation","minetest","minetest-mod","openstreetmap"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"agpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/fyrk.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2021-08-08T08:56:49.000Z","updated_at":"2024-09-09T08:16:34.000Z","dependencies_parsed_at":null,"dependency_job_id":"49f4f2b8-e6e3-4087-b293-8e811f5d6e40","html_url":"https://github.com/fyrk/world2minetest","commit_stats":{"total_commits":32,"total_committers":3,"mean_commits":"10.666666666666666","dds":0.0625,"last_synced_commit":"83b3260973563565032ab7ac63ffa339587e8555"},"previous_names":["fyrk/world2minetest"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fyrk%2Fworld2minetest","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fyrk%2Fworld2minetest/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fyrk%2Fworld2minetest/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fyrk%2Fworld2minetest/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fyrk","download_url":"https://codeload.github.com/fyrk/world2minetest/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":237869169,"owners_count":19379281,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["citygml","cityjson","digital-elevation-model","dxf","heightmap","map-data","map-generation","minetest","minetest-mod","openstreetmap"],"created_at":"2024-09-26T08:43:24.455Z","updated_at":"2025-10-23T18:30:29.763Z","avatar_url":"https://github.com/fyrk.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"**See below for [screenshots](#screenshots)**\n\n***\n\nworld2minetest is a tool to generate [Minetest](https://www.minetest.net/) worlds based on publicly available real-world geodata. It was inspired by tools such as [geo-mapgen](https://github.com/Gael-de-Sailly/geo-mapgen).\n\nCurrently, the following geodata sources are supported. Heightmaps and .dxf CAD files must use the [EPSG:25832](https://epsg.io/25832) coordinate system.\n * Heightmaps in \"XYZ ASCII\" format\n * [OpenStreetMap](https://openstreetmap.org), using the [Overpass API](https://overpass-turbo.eu/)\n * .dxf CAD files (trees \u0026 bushes only)\n\n\n\nInstallation\n============\n\n 1. Copy this repo's content to your computer, e.g. by cloning:\n    ```\n    git clone https://github.com/FlorianRaediker/world2minetest.git\n    ```\n 2. Install the required Python modules:\n    ```\n    pip3 install -r requirements.txt\n    ```\n\n\n\nHow to use\n==========\nGenerating a Minetest world consists of the following 4 steps. At least one of steps 1-3 is required.\n\n 1. Generate a heightmap.\n 2. Use OpenStreetMap data to add details.\n 3. Add decoration (trees, bushes) using .dxf data.\n 4. Create a `map.dat` file that can be read by world2minetest Mod for Minetest.\n\n\n## Generating a heightmap\nA heightmap can be generated using the `parse_heightmap_xyz.py` script (see `python3 parse_heightmap_xyz.py -h` for details).\nFirst, download ASCII XYZ files and save them to the `data_sources/` directory.\n\nFor Hanover (Germany), you can use [this link](https://www.hannover.de/Leben-in-der-Region-Hannover/Verwaltungen-Kommunen/Die-Verwaltung-der-Landeshauptstadt-Hannover/Dezernate-und-Fachbereiche-der-LHH/Stadtentwicklung-und-Bauen/Fachbereich-Planen-und-Stadtentwicklung/Geoinformation/Open-GeoData/3D-Stadtmodell-und-Gel%C3%A4ndemodell/Digitales-Gel%C3%A4ndemodell-DGM1).\n\nThen, run `parse_heightmap_xyz.py` with any files you want to convert into a heightmap:\n```\n$ python3 parse_heightmap_xyz.py data_sources/path/to/file1.xyz data_sources/path/to/file2.xyz ...\n```\nThis will create a new file `parsed_data/heightmap.dat`.\n\n\n## Use OpenStreetMap data\nSelect data using the [Overpass API](https://overpass-turbo.eu/). \nHere is an example query:\n```\n[out:json][timeout:25][bbox:{{bbox}}];\n(\n   way;\n   node;\n);\nout body;\n\u003e;\nout skel qt;\n```\n\nCopy the JSON data from the \"Data\" tab into a new file `data_sources/osm.json`.\nThen, parse this data using `parse_features_osm.py` (see `python3 parse_features_osm.py -h` for details).\n```\n$ python3 parse_features_osm.py data_sources/osm.json\n```\nThis will create a new file `parsed_data/features_osm.json`.\n\n\n## Add decoration from .dxf files\nFor geodata saved in .dxf files, `parse_features_dxf.py` can be used (see `python3 parse_features_dxf.py -h` for details).\nCurrently, only trees and bushes are supported.\n\nFirst, download .dxf files and save them to the `data_sources/` directory.\n\nFor Hanover (Germany), you can use [this link](https://www.hannover.de/Leben-in-der-Region-Hannover/Verwaltungen-Kommunen/Die-Verwaltung-der-Landeshauptstadt-Hannover/Dezernate-und-Fachbereiche-der-LHH/Stadtentwicklung-und-Bauen/Fachbereich-Planen-und-Stadtentwicklung/Geoinformation/Open-GeoData/Digitale-Stadtkarten/Stadtkarte-1-1000-SKH1000).\n\nThen, run `parse_features_dxf.py` with any files you want to use.\nFor each decoration, you will want to specify a query for [ezdxf](https://ezdxf.readthedocs.io/en/stable/tutorials/getting_data.html#retrieve-entities-by-query-language) to get all entities representing that decoration. Currently, decorations `tree`, `leaf_tree`, `conifer`, and `bush` are available.\nExample command (for Hanover's data):\n```\n$ python3 parse_features_dxf.py data_sources/path/to/file1.dxf data_sources/path/to/file2.dxf ... \\\n    --query \"*[layer=='Eingemessene Bäume' \u0026 name=='S220.40']\" \"tree\" \\\n    --query \"*[layer=='Nutzung_ Bewuchs_ Boden' \u0026 name=='S220.41']\" \"leaf_tree\" \\\n    --query \"*[layer=='Nutzung_ Bewuchs_ Boden' \u0026 name=='S220.43']\" \"conifer\" \\\n    --query \"*[layer=='Nutzung_ Bewuchs_ Boden' \u0026 name=='S220.46']\" \"bush\"\n```\nThis will create a new file `parsed_data/features_dxf.json`.\n\n\n## Detailed buildings with CityGML/CityJSON\nCityJSON containing buildings can be used instead of buildings data from OpenStreetMap, for a higher level of detail.\n\nIf you have CityGML files, these need to be converted to CityJSON first. This can be done with [citygml-tools](https://github.com/citygml4j/citygml-tools):\n```\n$ ./citygml-tools to-cityjson --pretty-print data_sources/path/to/directory/with/citygml/files/\n```\n\nTo obtain CityGML files for Hanover (Germany), you can use [this link](https://www.hannover.de/Leben-in-der-Region-Hannover/Verwaltungen-Kommunen/Die-Verwaltung-der-Landeshauptstadt-Hannover/Dezernate-und-Fachbereiche-der-LHH/Stadtentwicklung-und-Bauen/Fachbereich-Planen-und-Stadtentwicklung/Geoinformation/Open-GeoData/3D-Stadtmodell-und-Gel%C3%A4ndemodell/Digitales-3D-Stadtmodell).\n\nRun `parse_cityjson.py` with any files you want to use:\n```\n$ python3 parse_cityjson.py data_sources/path/to/file1.json data_sources/path/to/file2.json ...\n```\nThis will create a new file `parsed_data/buildings_cityjson.dat`.\n\n\n## Putting it all together – creating `map.dat`\nSee `python3 generate_map.py -h` for details.\nExample usage:\n```\n$ python3 generate_map.py \\\n    --heightmap=parsed_data/heightmap.dat \\\n    --features=parsed_data/features_osm.json \\\n    --features=parsed_data/features_dxf.json \\\n    --buildings=parsed_data/buildings_cityjson.dat\n```\nThis will save a file `map.dat` to the world2minetest folder, which contains the Mod for Minetest.\nCopy this folder to your Minetest installation's `mods/` directory (or create a symlink for convenience).\u003cbr\u003e\nTo generate the map into a world, create a new world in Minetest and, *before playing it for the first time*, activate the `world2minetest` Mod.\n\n\n\nScreenshots\n===========\n![](docs/screenshot_water.png)\n![](docs/screenshot_trees_with_postboxes_and_buildings.png)\n![](docs/screenshot_bench.png)\n![](docs/screenshot_fence.png)\n![](docs/screenshot_primary_road.png)\n![](docs/screenshot_hochhaus_fog.png)\n\n\nLicense\n=======\nworld2minetest - Generate Minetest worlds based on real-world geodata\u003cbr\u003e\nCopyright (C) 2021-2022  Florian Rädiker\n\nThis program is free software: you can redistribute it and/or modify\u003cbr\u003e\nit under the terms of the GNU Affero General Public License as published\u003cbr\u003e\nby the Free Software Foundation, either version 3 of the License, or\u003cbr\u003e\n(at your option) any later version.\n\nThis program is distributed in the hope that it will be useful,\u003cbr\u003e\nbut WITHOUT ANY WARRANTY; without even the implied warranty of\u003cbr\u003e\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\u003cbr\u003e\nGNU Affero General Public License for more details.\u003cbr\u003e\n\nYou should have received a copy of the GNU Affero General Public License\u003cbr\u003e\nalong with this program.  If not, see \u003chttps://www.gnu.org/licenses/\u003e.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fflra0%2Fworld2minetest","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fflra0%2Fworld2minetest","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fflra0%2Fworld2minetest/lists"}