Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Eric Duminil
RegionChooser
Commits
bd4ca534
Commit
bd4ca534
authored
May 18, 2015
by
duminil
Browse files
Citygml project and name from kml.
parent
f99a7d28
Changes
3
Expand all
Hide whitespace changes
Inline
Side-by-side
src/eu/simstadt/regionchooser/RegionChooserFX.java
View file @
bd4ca534
...
...
@@ -50,19 +50,12 @@ public void downloadRegion(String wktPolygon) {
System
.
out
.
println
(
"FROM JAVA : DO SOMETHING with "
+
wktPolygon
);
}
public
void
downloadRegionFromCityGML
(
String
wktPolygon
,
String
citygmlDescription
)
{
System
.
out
.
println
(
"FROM JAVA : DO SOMETHING with "
+
wktPolygon
+
" from \n"
+
citygmlDescription
);
public
void
downloadRegionFromCityGML
(
String
wktPolygon
,
String
project
,
String
citygml
)
{
System
.
out
.
println
(
"FROM JAVA : DO SOMETHING with "
+
wktPolygon
+
" from \n"
+
project
+
">"
+
citygml
);
}
public
boolean
checkIfCityGMLSAreAvailable
(
String
citygmlDescription
)
{
boolean
available
=
false
;
String
[]
projectAndCityGML
=
citygmlDescription
.
split
(
">"
);
if
(
projectAndCityGML
.
length
==
2
)
{
String
project
=
projectAndCityGML
[
0
];
String
citygml
=
projectAndCityGML
[
1
];
available
=
Files
.
isReadable
(
repo
.
resolve
(
project
+
".simstadt"
).
resolve
(
citygml
));
}
return
available
;
public
boolean
checkIfCityGMLSAreAvailable
(
String
project
,
String
citygml
)
{
return
Files
.
isReadable
(
repo
.
resolve
(
project
+
".simstadt"
).
resolve
(
citygml
));
}
}
...
...
website/data/citygml_hulls.kml
View file @
bd4ca534
This diff is collapsed.
Click to expand it.
website/script/simstadt_openlayers.js
View file @
bd4ca534
...
...
@@ -62,9 +62,12 @@ kml_layer.addEventListener("change", function(event) {
kml_source
.
forEachFeature
(
function
(
feature
)
{
feature
[
"
geoJSON
"
]
=
geoJSONformat
.
writeFeatureObject
(
feature
);
feature
[
"
area
"
]
=
feature
.
getGeometry
().
getArea
();
var
project
=
feature
.
get
(
"
project
"
);
var
name
=
feature
.
get
(
"
name
"
);
feature
[
"
description
"
]
=
project
+
"
>
"
+
name
;
var
citygmlHere
;
if
(
fromJavaFX
)
{
citygmlHere
=
fxapp
.
checkIfCityGMLSAreAvailable
(
feature
.
get
(
"
description
"
)
);
citygmlHere
=
fxapp
.
checkIfCityGMLSAreAvailable
(
project
,
name
);
}
feature
[
"
available
"
]
=
citygmlHere
;
});
...
...
@@ -147,10 +150,10 @@ function findIntersections() {
var
description
;
if
(
feature
[
"
available
"
])
{
description
=
"
<a href=
\"
#
\"
onclick=
\"
downloadRegionFromCityGML(
"
+
i
+
"
);return false;
\"
>
"
+
feature
.
get
(
'
description
'
)
+
"
</a>
"
;
description
=
"
<a href=
\"
#
\"
onclick=
\"
downloadRegionFromCityGML(
"
+
i
+
"
);return false;
\"
>
"
+
feature
[
"
description
"
]
+
"
</a>
"
;
}
else
{
description
=
feature
.
get
(
'
description
'
)
;
description
=
feature
[
'
description
'
]
;
}
$
(
'
#dataPanel
'
).
append
(
description
+
"
(
"
+
citygml_percentage
+
"
%
"
);
...
...
@@ -171,7 +174,8 @@ function findIntersections() {
}
function
downloadRegionFromCityGML
(
i
)
{
fxapp
.
downloadRegionFromCityGML
(
sketchAsWKT
(),
kml_source
.
getFeatures
()[
i
].
get
(
"
description
"
));
var
feature
=
kml_source
.
getFeatures
()[
i
];
fxapp
.
downloadRegionFromCityGML
(
sketchAsWKT
(),
feature
.
get
(
"
project
"
),
feature
.
get
(
"
name
"
));
}
function
displayInfo
()
{
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment