Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Eric Duminil
RegionChooser
Commits
cbacf844
Commit
cbacf844
authored
May 27, 2015
by
duminil
Browse files
Trying to add NovaFactory product bounding boxes.
parent
89cc09dc
Changes
3
Hide whitespace changes
Inline
Side-by-side
src/eu/simstadt/regionchooser/RegionChooserFX.java
View file @
cbacf844
...
@@ -90,9 +90,8 @@ public void doSomethingWithThisZIP(String zipFilename) {
...
@@ -90,9 +90,8 @@ public void doSomethingWithThisZIP(String zipFilename) {
}
}
public
void
downloadRegionFromCityGML
(
String
wktPolygon
,
String
project
,
String
citygml
,
JSObject
featureOverlay
)
public
void
downloadRegionFromCityGML
(
String
wktPolygon
,
String
project
,
String
citygml
)
throws
IOException
,
throws
IOException
,
ParseException
ParseException
{
{
StringBuffer
sb
=
selectRegionDirectlyFromCityGML
(
citygmlPath
(
project
,
citygml
),
wktPolygon
);
StringBuffer
sb
=
selectRegionDirectlyFromCityGML
(
citygmlPath
(
project
,
citygml
),
wktPolygon
);
File
buildingIdsFile
=
selectSaveFileWithDialog
(
project
,
citygml
);
File
buildingIdsFile
=
selectSaveFileWithDialog
(
project
,
citygml
);
...
...
website/data/novafactory_products.csv
0 → 100644
View file @
cbacf844
Id,Short name,Name,SRS,Scale,Plot-Header,Subdivision,Metadata layer,Abscissa SW,Ordinate SW,Abscissa NO,Ordinate NO
4,WU,Gemeinde Wuestenrot LOD2 Test,DHDN_3_Degree_Gauss_Zone_3 31467,1,,Gemeinde Wuestenrot,GML,3530000,5434300,3538800,5445010
5,LB,Ludwigsburg Gesamt,DHDN_3_Degree_Gauss_Zone_3 31467,1,,Ludwigsburg Gesamt,GML,3510000,5415000,3523100,5422000
7,LBDEV,Ludwigsburg Gesamt (Entwicklung),DHDN_3_Degree_Gauss_Zone_3 31467,1,,Ludwigsburg Gesamt Test,,3530000,5434300,3538800,5445010
3,LBTEST,Ludwigsburg Gesamt Test,DHDN_3_Degree_Gauss_Zone_3 31467,1,,Ludwigsburg Gesamt Test,GML,3509700,5414200,3523500,5422800
2,TESTGR,Testgebiet Grünbühl,DHDN_3_Degree_Gauss_Zone_3 31467,1,,Testgebiet2,rgb,3514800,5415450,3516300,5416540
1,TEST,Testgebiet 821,DHDN_3_Degree_Gauss_Zone_3 31467,1,,Testgebiet,GML,3534000,5436000,3538000,5442000
8,WUDEV,Wuestenrot (Entwicklung),DHDN_3_Degree_Gauss_Zone_3 31467,1,,Gemeinde Wuestenrot,GML,3530000,5434300,3538800,5445010
6,WU3,Wuestenrot LOD2 Stufe 3,DHDN_3_Degree_Gauss_Zone_3 31467,1,,Wuestenrot LOD2 Blattschnitt,GML,3530000,5434300,3538800,5445010
website/script/simstadt_openlayers.js
View file @
cbacf844
...
@@ -22,9 +22,7 @@ var kml_source = new ol.source.KML({
...
@@ -22,9 +22,7 @@ var kml_source = new ol.source.KML({
extractStyles
:
false
extractStyles
:
false
})
})
var
kml_layer
=
new
ol
.
layer
.
Vector
({
var
polygon_style
=
new
ol
.
style
.
Style
({
source
:
kml_source
,
style
:
new
ol
.
style
.
Style
({
fill
:
new
ol
.
style
.
Fill
({
fill
:
new
ol
.
style
.
Fill
({
color
:
'
rgba(255, 255, 255, 0.2)
'
color
:
'
rgba(255, 255, 255, 0.2)
'
}),
}),
...
@@ -34,6 +32,10 @@ var kml_layer = new ol.layer.Vector({
...
@@ -34,6 +32,10 @@ var kml_layer = new ol.layer.Vector({
lineDash
:
[
5
,
10
]
lineDash
:
[
5
,
10
]
}),
}),
})
})
var
kml_layer
=
new
ol
.
layer
.
Vector
({
source
:
kml_source
,
style
:
polygon_style
});
});
var
intersections
=
new
ol
.
source
.
Vector
();
var
intersections
=
new
ol
.
source
.
Vector
();
...
@@ -47,72 +49,31 @@ var intersections_layer = new ol.layer.Vector({
...
@@ -47,72 +49,31 @@ var intersections_layer = new ol.layer.Vector({
})
})
});
});
var
vectorSource
=
new
ol
.
source
.
Vector
({
var
novafactory_vectors
=
new
ol
.
source
.
Vector
({
features
:
[]
features
:
[]
});
});
vectorSource
.
addMarker
=
function
(
x
,
y
,
name
)
{
novafactory_vectors
.
addMarker
=
function
(
xmin
,
ymin
,
xmax
,
ymax
,
name
)
{
var
p1
=
new
ol
.
geom
.
Point
(
ol
.
proj
.
transform
([
xmin
,
ymin
],
'
EPSG:31467
'
,
'
EPSG:3857
'
))
var
p2
=
new
ol
.
geom
.
Point
(
ol
.
proj
.
transform
([
xmin
,
ymax
],
'
EPSG:31467
'
,
'
EPSG:3857
'
))
var
p3
=
new
ol
.
geom
.
Point
(
ol
.
proj
.
transform
([
xmax
,
ymax
],
'
EPSG:31467
'
,
'
EPSG:3857
'
))
var
p4
=
new
ol
.
geom
.
Point
(
ol
.
proj
.
transform
([
xmax
,
ymin
],
'
EPSG:31467
'
,
'
EPSG:3857
'
))
this
.
addFeature
(
new
ol
.
Feature
({
this
.
addFeature
(
new
ol
.
Feature
({
geometry
:
new
ol
.
geom
.
Po
int
(
ol
.
proj
.
transform
([
x
,
y
],
'
EPSG:31467
'
,
'
EPSG:3857
'
)
),
geometry
:
new
ol
.
geom
.
Po
lygon
([[
p1
,
p2
,
p3
,
p4
,
p1
]]
),
name
:
name
,
name
:
name
,
}));
}));
}
}
// vectorSource.addMarker(3536859.19, 5438902.94, "BRUSE");
novafactory_vectors
.
addMarker
(
3530000
,
5434300
,
3538800
,
5445010
,
"
WU
"
);
// vectorSource.addMarker(3533399.8907172694, 5439126.050470325, "MyPoly");
var
novafactory_layer
=
new
ol
.
layer
.
Vector
({
var
createTextStyle
=
function
(
feature
,
resolution
)
{
source
:
novafactory_vectors
,
var
align
=
"
Normal
"
;
// style: polygon_style
var
baseline
=
"
Middle
"
;
var
size
=
"
12px
"
;
var
weight
=
"
Normal
"
;
var
font
=
weight
+
'
'
+
size
+
'
'
+
"
Arial
"
;
var
fillColor
=
'
#aa3300
'
;
var
outlineColor
=
"
#ffffff
"
;
var
outlineWidth
=
3
;
return
new
ol
.
style
.
Text
({
textAlign
:
align
,
textBaseline
:
baseline
,
font
:
font
,
text
:
feature
.
get
(
'
name
'
),
fill
:
new
ol
.
style
.
Fill
({
color
:
fillColor
}),
stroke
:
new
ol
.
style
.
Stroke
({
color
:
outlineColor
,
width
:
outlineWidth
}),
});
};
var
createPointStyleFunction
=
function
()
{
return
function
(
feature
,
resolution
)
{
var
style
=
new
ol
.
style
.
Style
({
image
:
new
ol
.
style
.
Circle
({
radius
:
10
,
fill
:
new
ol
.
style
.
Fill
({
color
:
'
rgba(255, 0, 0, 0.1)
'
}),
stroke
:
new
ol
.
style
.
Stroke
({
color
:
'
red
'
,
width
:
1
})
}),
text
:
createTextStyle
(
feature
,
resolution
)
});
return
[
style
];
};
};
var
labels
=
new
ol
.
layer
.
Vector
({
source
:
vectorSource
,
style
:
createPointStyleFunction
()
});
});
var
map
=
new
ol
.
Map
({
var
map
=
new
ol
.
Map
({
target
:
'
map
'
,
target
:
'
map
'
,
layers
:
[
osm_layer
,
kml_layer
,
intersections_layer
,
labels
],
layers
:
[
osm_layer
,
kml_layer
,
novafactory_layer
,
intersections_layer
],
interactions
:
ol
.
interaction
.
defaults
({
interactions
:
ol
.
interaction
.
defaults
({
keyboard
:
true
keyboard
:
true
})
})
...
@@ -250,7 +211,7 @@ function downloadRegionFromCityGML(i) {
...
@@ -250,7 +211,7 @@ function downloadRegionFromCityGML(i) {
// Waiting 100ms in order to let the cursor change
// Waiting 100ms in order to let the cursor change
setTimeout
(
function
()
{
setTimeout
(
function
()
{
// var start = new Date().getTime();
// var start = new Date().getTime();
fxapp
.
downloadRegionFromCityGML
(
sketchAsWKT
(),
feature
.
get
(
"
project
"
),
feature
.
get
(
"
name
"
)
,
vectorSource
);
fxapp
.
downloadRegionFromCityGML
(
sketchAsWKT
(),
feature
.
get
(
"
project
"
),
feature
.
get
(
"
name
"
));
// var end = new Date().getTime();
// var end = new Date().getTime();
// var time = end - start;
// var time = end - start;
// console.log('DL Execution time: ' + time);
// console.log('DL Execution time: ' + time);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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