RegionChooser
RegionChooser is a subproject inside SimStadt. Its graphical interface allows to extract a specific region from multiple CityGML files and save it as a smaller CityGML file.

It uses:
- Java 17
- JavaFX
- Openlayers
RegionChooser was developed during SimStadt & SimStadt II projects.
Installation
RegionChooser executables are packaged inside SimStadt.zip file.
Usage
Start RegionChooser
RegionChooser.batin Windows./RegionChooser.shin Linux and macOS
Select a region
- Once a repository has been selected (either in SimStadt or RegionChooser), a map should be shown with the convex hulls of the available CityGML files.
- It is possible to define a polygon by clicking repeatedly on the map.
- If an intersection is found with at least one CityGML file, a list of files will be shown on the right.
- The selection might intersect multiple files. The user can select the desired files.
- By clicking on
Download Region, a new CityGML file will be created, by merging the intersections of the polygon with each selected CityGML file.
Get coordinates of polygon
The coordinates of the currently drawn polygon can be exported to WKT by clicking on Copy coordinates. It can be useful for further processing, e.g. in a Python script.
As an example:
POLYGON((9.176194 48.779168, 9.171473 48.775265, 9.176923 48.772890, 9.179842 48.774474, 9.181043 48.774134, 9.183103 48.775661, 9.182073 48.776962, 9.176194 48.779168))
Command-line
RegionChooser can also be called from the command-line:
Launching RegionChooserCLI --help
Usage: region_chooser [-hlV] [--get-hull] [-e=31467] [-o=output.gml]
[-w=polygon.wkt] -i=input.gml[,input.gml...] [-i=input.gml
[,input.gml...]]...
Extracts a region from one or more citygmls, or calculates the convex hull.
-i, --input=input.gml[,input.gml...]
Citygml files to extract from
-o, --output=output.gml Output file
-e, --epsg=31467 EPSG id for coordinate reference system.
Will use the one from input.gml if unspecified.
-l, --local Are WKT coordinates in local CRS?
Coordinates are in WGS84 if unspecified.
-w, --wkt=polygon.wkt File containing WKT polygon, or - for stdin
--get-hull Calculate the convex hull of the input CityGML files
-h, --help Show this help message and exit.
-V, --version Print version information and exit.
As an example:
SimStadt.bat
--input Grombühl.proj\LoD2_32_566_5516_2_BY.gml,Grombühl.proj\LoD2_32_568_5516_2_BY.gml,Grombühl.proj\LoD2_32_570_5516_2_BY.gml
--output Grombühl.proj\Grombühl.gml --wkt "POLYGON((9.920858224863567 49.807325539080495, 9.918540796274696 49.79447295986074, 9.992612680429975 49.79358644932381, 9.991926034922162 49.807325539080495, 9.920858224863567 49.807325539080495))"
./SimStadt.sh --get-hull --input example.gml
Development
In order to compile, test and package SimStadt+RegionChooser with Maven:
git clone https://transfer.hft-stuttgart.de/gitlab/simstadt/simstadt.git
cd simstadt/simstadt-reactor
mvn clean package
Author
Eric Duminil, HfT Stuttgart
Contributors
Matthias Betz, HfT Stuttgart