procedural_city_generation.roadmap.config_functions package

Submodules

procedural_city_generation.roadmap.config_functions.Watertools module

class procedural_city_generation.roadmap.config_functions.Watertools.Watertools(heightmap)
find_land_bodies(heightmap, h)

This function finds out if the land that is not covered by water is connected, and if not, then finds all bodies

  • heightmap : np.ndarray(h, w) heightmap image
  • h : Height of water
  • list<list<np.ndarray>> : list of land-bodies, which are a list containing numpy.ndarray(2, )’s. If list is empty, there is no water or all is water.
flood(h, pos)

pos is a pair of indices on heightmap (position where it gets flooded) h is the corresponding height

procedural_city_generation.roadmap.config_functions.find_radial_centers module

procedural_city_generation.roadmap.config_functions.find_radial_centers.find_radial_centers(singleton)

Intended to find areas where the rule-image is blue and return the center of such areas

procedural_city_generation.roadmap.config_functions.flood module

procedural_city_generation.roadmap.config_functions.flood.flood(heightmap, pos, h)

pos is a pair of indices on heightmap (position where it gets flooded) h is the corresponding height

procedural_city_generation.roadmap.config_functions.input_image_setup module

procedural_city_generation.roadmap.config_functions.input_image_setup.input_image_setup(rule_image_name, density_image_name)

Loads the rule-image and population-density-image from the filesystem. Saves the density image in /temp/ folder so that it could be ensured.

rule_image_name: String
Name of the rule_image specified in Parameters
density_image_name: String
Name of the density_image specified in Parameters
rule_img: np.ndarray
Rule-image as numpy array
density_img: np.ndarray
Density-image as numpy array

procedural_city_generation.roadmap.config_functions.setup_heightmap module

procedural_city_generation.roadmap.config_functions.setup_heightmap.setup_heightmap(singleton, path)

Sets up the heightmap image from roadmap.conf entry heightmap_name, writes ./Heightmaps/inuse.txt so other functions know which heightmap to load possible inputs: random: generates a new random map with randommap.py insert_name insert_name.png insert_name.txt

Module contents