README.md 1.91 KB
Newer Older
Matthias Betz's avatar
Matthias Betz committed
1
2
# CityGMLViewer

Matthias Betz's avatar
Matthias Betz committed
3
A CityGMLViewer based on OpenGL. Can display CityGML 2 and 3. Uses LWJGL for displaying and JOGL for tesselation.
Matthias Betz's avatar
Matthias Betz committed
4
5
6
7
8
9
10
11

## Installation

Use [Maven](https://maven.apache.org/) to build the viewer.

```bash
mvn package
```
Matthias Betz's avatar
Matthias Betz committed
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63

## Usage


```bash
java -jar citygml-viewer-lwjgl-{version}.jar [-debug] [-colors <path-to-color-properties>] [-mapping <path-to-mapping-file>] [<path-to-citygml-file]
```

if you don't want the command prompt visible use javaw instead of java.

#### Return codes:

| Code | Meaning |
| ---- | ------- |
| 0    | OK      |
| 1    | the color properties file is either not a file or does not exist |
| 2    | the polygon color mapping file is either not a file or does not exist |
| 3    | the citygml file that is supposed to be displayed is either not a file or does not exist |

#### Color Mapping (-colors)

You can change the default color of the polygons depending on their type in a color.properties file. The color notation in this file is a floating point value from 0 to 1 for each color channel rgb.

Example:
```properties
groundColor=0.9411765 0.9019608 0.54901963
roofColor=1 0 0
doorColor=1 0.784313 0
windowColor=0.0 0.5019608 0.5019608
wallColor=1 1 1
bridgeColor=1 0.49803922 0.3137255
landColor=0.64705884 0.16470589 0.16470589
transportationColor=1 1 0
vegetationColor=0.5647059 0.93333334 0.5647059
waterColor=0.5294118 0.80784315 0.98039216
```

#### Polygon Color Mapping (-mapping)

You can specify the color of a specific polygon via its gml:id and a color. The color here is for each rgb channel a value between 0 and 255

Example that would color a polygon in blue:
```
# polygonName, red (0 - 255), green (0 - 255), blue (0 - 255)
PolyIDGeo22796924,0,0,255
```

## Known Problems

* The color is not set correctly when the geometry of a surface is in the solid and the boundary surface is only referencing it.
* The two configuration file use different color formats
* Missing launch scripts