Skip to content

Commit 312a529

Browse files
authored
Merge pull request #311 from 3dcitydb/feature-vis-pac-furniture-vegetation
added point and curve style settings for furniture and vegetation
2 parents e0f26dc + a5affac commit 312a529

File tree

7 files changed

+321
-173
lines changed

7 files changed

+321
-173
lines changed

impexp-client-gui/src/main/java/org/citydb/gui/operation/visExporter/preferences/VisExportPreferences.java

Lines changed: 21 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -54,10 +54,18 @@ public VisExportPreferences(ViewController viewController, Config config) {
5454
true, true, true, true,
5555
config)));
5656
renderingNode.addChildEntry(new DefaultPreferencesEntry(new BuildingStylingPanel(config)));
57-
renderingNode.addChildEntry(new DefaultPreferencesEntry(new SurfaceStylingPanel(
58-
"pref.tree.visExport.cityFurniture.styling",
57+
58+
DefaultPreferencesEntry cityFurnitureRenderingNode = new EmptyPanel(
59+
() -> Language.I18N.getString("pref.tree.visExport.cityFurniture.styling"));
60+
cityFurnitureRenderingNode.addChildEntry(new DefaultPreferencesEntry(new SurfaceStylingPanel(
61+
"pref.tree.visExport.surfaceAndSolid.styling",
5962
() -> config.getVisExportConfig().getCityFurnitureStyles(),
6063
config)));
64+
cityFurnitureRenderingNode.addChildEntry(new DefaultPreferencesEntry(new PointAndCurveStylingPanel(
65+
() -> config.getVisExportConfig().getCityFurniturePointAndCurve(),
66+
config)));
67+
renderingNode.addChildEntry(cityFurnitureRenderingNode);
68+
6169
renderingNode.addChildEntry(new DefaultPreferencesEntry(new SurfaceStylingPanel(
6270
"pref.tree.visExport.cityObjectGroup.styling",
6371
() -> config.getVisExportConfig().getReliefStyles(),
@@ -85,7 +93,7 @@ public VisExportPreferences(ViewController viewController, Config config) {
8593
() -> Language.I18N.getString("pref.tree.visExport.transportation.styling"));
8694
transportationComplexRenderingNode.addChildEntry(new DefaultPreferencesEntry(new SurfaceStylingPanel(
8795
"pref.tree.visExport.surfaceAndSolid.styling",
88-
() -> config.getVisExportConfig().getGenericCityObjectStyles(),
96+
() -> config.getVisExportConfig().getTransportationStyles(),
8997
config)));
9098
transportationComplexRenderingNode.addChildEntry(new DefaultPreferencesEntry(new PointAndCurveStylingPanel(
9199
() -> config.getVisExportConfig().getTransportationPointAndCurve(),
@@ -97,10 +105,18 @@ public VisExportPreferences(ViewController viewController, Config config) {
97105
() -> config.getVisExportConfig().getTunnelStyles(),
98106
true, true, true, true,
99107
config)));
100-
renderingNode.addChildEntry(new DefaultPreferencesEntry(new SurfaceStylingPanel(
101-
"pref.tree.visExport.vegetation.styling",
108+
109+
DefaultPreferencesEntry vegetationRenderingNode = new EmptyPanel(
110+
() -> Language.I18N.getString("pref.tree.visExport.vegetation.styling"));
111+
vegetationRenderingNode.addChildEntry(new DefaultPreferencesEntry(new SurfaceStylingPanel(
112+
"pref.tree.visExport.surfaceAndSolid.styling",
102113
() -> config.getVisExportConfig().getVegetationStyles(),
103114
config)));
115+
vegetationRenderingNode.addChildEntry(new DefaultPreferencesEntry(new PointAndCurveStylingPanel(
116+
() -> config.getVisExportConfig().getSolitaryVegetationObjectPointAndCurve(),
117+
config)));
118+
renderingNode.addChildEntry(vegetationRenderingNode);
119+
104120
renderingNode.addChildEntry(new DefaultPreferencesEntry(new SurfaceStylingPanel(
105121
"pref.tree.visExport.waterBody.styling",
106122
() -> config.getVisExportConfig().getWaterBodyStyles(),

impexp-config/src/main/java/org/citydb/config/project/visExporter/VisExportConfig.java

Lines changed: 24 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,13 +54,15 @@
5454
"landUseBalloon",
5555
"vegetationStyles",
5656
"vegetationBalloon",
57+
"solitaryVegetationObjectPointAndCurve",
5758
"transportationStyles",
5859
"transportationBalloon",
5960
"transportationPointAndCurve",
6061
"reliefStyles",
6162
"reliefBalloon",
6263
"cityFurnitureStyles",
6364
"cityFurnitureBalloon",
65+
"cityFurniturePointAndCurve",
6466
"genericCityObjectStyles",
6567
"genericCityObject3DBalloon",
6668
"genericCityObjectPointAndCurve",
@@ -107,6 +109,7 @@ public class VisExportConfig {
107109
@XmlJavaTypeAdapter(StylesAdapter.class)
108110
private Styles vegetationStyles;
109111
private Balloon vegetationBalloon;
112+
private PointAndCurve solitaryVegetationObjectPointAndCurve;
110113
@XmlJavaTypeAdapter(StylesAdapter.class)
111114
private Styles transportationStyles;
112115
private Balloon transportationBalloon;
@@ -117,6 +120,7 @@ public class VisExportConfig {
117120
@XmlJavaTypeAdapter(StylesAdapter.class)
118121
private Styles cityFurnitureStyles;
119122
private Balloon cityFurnitureBalloon;
123+
private PointAndCurve cityFurniturePointAndCurve;
120124
@XmlJavaTypeAdapter(StylesAdapter.class)
121125
private Styles genericCityObjectStyles;
122126
private Balloon genericCityObject3DBalloon;
@@ -166,13 +170,15 @@ public VisExportConfig() {
166170
landUseBalloon = new Balloon();
167171
vegetationStyles = new Styles();
168172
vegetationBalloon = new Balloon();
173+
solitaryVegetationObjectPointAndCurve = new PointAndCurve();
169174
transportationStyles = new Styles();
170175
transportationBalloon = new Balloon();
171176
transportationPointAndCurve = new PointAndCurve();
172177
reliefStyles = new Styles();
173178
reliefBalloon = new Balloon();
174179
cityFurnitureStyles = new Styles();
175180
cityFurnitureBalloon = new Balloon();
181+
cityFurniturePointAndCurve = new PointAndCurve();
176182
genericCityObjectStyles = new Styles();
177183
genericCityObject3DBalloon = new Balloon();
178184
genericCityObjectPointAndCurve = new PointAndCurve();
@@ -450,6 +456,14 @@ public void setGenericCityObjectStyles(Styles genericCityObjectStyles) {
450456
}
451457
}
452458

459+
public void setSolitaryVegetationObjectPointAndCurve(PointAndCurve solitaryVegetationObjectPointAndCurve) {
460+
this.solitaryVegetationObjectPointAndCurve = solitaryVegetationObjectPointAndCurve;
461+
}
462+
463+
public PointAndCurve getSolitaryVegetationObjectPointAndCurve() {
464+
return solitaryVegetationObjectPointAndCurve;
465+
}
466+
453467
public Styles getGenericCityObjectStyles() {
454468
return genericCityObjectStyles;
455469
}
@@ -488,6 +502,14 @@ public Balloon getCityFurnitureBalloon() {
488502
return cityFurnitureBalloon;
489503
}
490504

505+
public void setCityFurniturePointAndCurve(PointAndCurve cityFurniturePointAndCurve) {
506+
this.cityFurniturePointAndCurve = cityFurniturePointAndCurve;
507+
}
508+
509+
public PointAndCurve getCityFurniturePointAndCurve() {
510+
return cityFurniturePointAndCurve;
511+
}
512+
491513
public void setTransportationStyles(Styles transportationStyles) {
492514
if (transportationStyles != null) {
493515
this.transportationStyles = transportationStyles;
@@ -506,8 +528,8 @@ public Balloon getTransportationBalloon() {
506528
return transportationBalloon;
507529
}
508530

509-
public void setTransportationPointAndCurve(PointAndCurve TransportationPointAndCurve) {
510-
this.transportationPointAndCurve = TransportationPointAndCurve;
531+
public void setTransportationPointAndCurve(PointAndCurve transportationPointAndCurve) {
532+
this.transportationPointAndCurve = transportationPointAndCurve;
511533
}
512534

513535
public PointAndCurve getTransportationPointAndCurve() {

impexp-core/src/main/java/org/citydb/core/ade/visExporter/ADEVisExportQueryHelper.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,8 @@ public interface ADEVisExportQueryHelper {
4949

5050
String getSolitaryVegetationObjectQuery(int lodToExportFrom, DisplayForm displayForm, int objectClassId);
5151

52+
String getSolitaryVegetationObjectPointAndCurveQuery(int lodToExportFrom, int objectClassId);
53+
5254
String getPlantCoverQuery(int lodToExportFrom, DisplayForm displayForm, int objectClassId);
5355

5456
String getGenericCityObjectQuery(int lodToExportFrom, DisplayForm displayForm, int objectClassId);
@@ -57,6 +59,8 @@ public interface ADEVisExportQueryHelper {
5759

5860
String getCityFurnitureQuery(int lodToExportFrom, DisplayForm displayForm, int objectClassId);
5961

62+
String getCityFurniturePointAndCurveQuery(int lodToExportFrom, int objectClassId);
63+
6064
String getWaterBodyQuery(int lodToExportFrom, DisplayForm displayForm, int objectClassId);
6165

6266
String getLandUseQuery(int lodToExportFrom, DisplayForm displayForm, int objectClassId);

impexp-vis-plugin/src/main/java/org/citydb/vis/controller/VisExporter.java

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -897,6 +897,10 @@ private void addStyle(DisplayForm displayForm, int objectClassId, SAXWriter saxW
897897

898898
switch (Util.getCityGMLClass(objectClassId)) {
899899
case SOLITARY_VEGETATION_OBJECT:
900+
style = config.getVisExportConfig().getVegetationStyles().getOrDefault(type);
901+
styleBasisName = SolitaryVegetationObject.STYLE_BASIS_NAME;
902+
addPointAndCurveStyle(saxWriter, config.getVisExportConfig().getSolitaryVegetationObjectPointAndCurve(), styleBasisName);
903+
break;
900904
case PLANT_COVER:
901905
style = config.getVisExportConfig().getVegetationStyles().getOrDefault(type);
902906
styleBasisName = SolitaryVegetationObject.STYLE_BASIS_NAME;
@@ -906,9 +910,9 @@ private void addStyle(DisplayForm displayForm, int objectClassId, SAXWriter saxW
906910
case RAILWAY:
907911
case ROAD:
908912
case SQUARE:
909-
addPointAndCurveStyle(saxWriter, config.getVisExportConfig().getTransportationPointAndCurve(), Transportation.STYLE_BASIS_NAME);
910913
style = config.getVisExportConfig().getTransportationStyles().getOrDefault(type);
911914
styleBasisName = Transportation.STYLE_BASIS_NAME;
915+
addPointAndCurveStyle(saxWriter, config.getVisExportConfig().getTransportationPointAndCurve(), styleBasisName);
912916
break;
913917
case RELIEF_FEATURE:
914918
style = config.getVisExportConfig().getReliefStyles().getOrDefault(type);
@@ -921,11 +925,12 @@ private void addStyle(DisplayForm displayForm, int objectClassId, SAXWriter saxW
921925
case CITY_FURNITURE:
922926
style = config.getVisExportConfig().getCityFurnitureStyles().getOrDefault(type);
923927
styleBasisName = CityFurniture.STYLE_BASIS_NAME;
928+
addPointAndCurveStyle(saxWriter, config.getVisExportConfig().getCityFurniturePointAndCurve(), styleBasisName);
924929
break;
925930
case GENERIC_CITY_OBJECT:
926-
addPointAndCurveStyle(saxWriter, config.getVisExportConfig().getGenericCityObjectPointAndCurve(), GenericCityObject.STYLE_BASIS_NAME);
927931
style = config.getVisExportConfig().getGenericCityObjectStyles().getOrDefault(type);
928932
styleBasisName = GenericCityObject.STYLE_BASIS_NAME;
933+
addPointAndCurveStyle(saxWriter, config.getVisExportConfig().getGenericCityObjectPointAndCurve(), styleBasisName);
929934
break;
930935
case LAND_USE:
931936
style = config.getVisExportConfig().getLandUseStyles().getOrDefault(type);

0 commit comments

Comments
 (0)