diff --git a/README.md b/README.md index 8787735088bd5cb41bde5c726642297bf24f782f..5e1b22fcc7226d147ba9e7aa08c55dd78115c0b7 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # RegionChooser -[RegionChooser](https://transfer.hft-stuttgart.de/gitlab/hft_gitlab/regionchooser) is a Java project. Its graphical interface allows to extract a specific region from [CityGML](https://www.ogc.org/standards/citygml) and save it as a smaller CityGML file. +[RegionChooser](https://transfer.hft-stuttgart.de/gitlab/hft_gitlab/regionchooser) is a Java project. Its graphical interface allows to extract a specific region from multiple [CityGML](https://www.ogc.org/standards/citygml) files and save it as a smaller CityGML file.  @@ -30,6 +30,52 @@ You first need to run SimStadt in order to select a [repository](https://simstad * `./RegionChooser.sh` in Linux * `./RegionChooser.command` in macOS +### Select a region + +* Once a repository has been imported, 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](https://en.wikipedia.org/wiki/Well-known_text_representation_of_geometry) 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: + +```bash +Launching RegionChooser CLI --help +Usage: region_chooser [-hlV] [-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. + -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 + -h, --help Show this help message and exit. + -V, --version Print version information and exit. +``` + +As an example: + +```bash +java -classpath "Desktop\SimStadt_0.10.0-SNAPSHOT_master_20221019_7d2546f\lib\*" + eu.simstadt.regionchooser.RegionChooserCLI + --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))" +``` + ## Development In order to compile, test and install RegionChooser into your local Maven repository: diff --git a/region_chooser_screenshot.png b/region_chooser_screenshot.png index 1f6abbf19fa7ce7526fbc22eb50bdd4ff233e5ab..eba5dc94656f3c619cb3f983b059d74460117e5b 100755 Binary files a/region_chooser_screenshot.png and b/region_chooser_screenshot.png differ