Commit cbacf844 authored by duminil's avatar duminil
Browse files

Trying to add NovaFactory product bounding boxes.

parent 89cc09dc
......@@ -90,9 +90,8 @@ public void doSomethingWithThisZIP(String zipFilename) {
}
public void downloadRegionFromCityGML(String wktPolygon, String project, String citygml, JSObject featureOverlay)
throws IOException, ParseException
{
public void downloadRegionFromCityGML(String wktPolygon, String project, String citygml) throws IOException,
ParseException {
StringBuffer sb = selectRegionDirectlyFromCityGML(citygmlPath(project, citygml), wktPolygon);
File buildingIdsFile = selectSaveFileWithDialog(project, citygml);
......
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
......@@ -22,9 +22,7 @@ var kml_source = new ol.source.KML({
extractStyles : false
})
var kml_layer = new ol.layer.Vector({
source : kml_source,
style : new ol.style.Style({
var polygon_style =new ol.style.Style({
fill : new ol.style.Fill({
color : 'rgba(255, 255, 255, 0.2)'
}),
......@@ -34,6 +32,10 @@ var kml_layer = new ol.layer.Vector({
lineDash : [ 5, 10 ]
}),
})
var kml_layer = new ol.layer.Vector({
source : kml_source,
style : polygon_style
});
var intersections = new ol.source.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 : []
});
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({
geometry : new ol.geom.Point(ol.proj.transform([ x, y ], 'EPSG:31467', 'EPSG:3857')),
geometry : new ol.geom.Polygon([[p1,p2,p3,p4,p1]]),
name : name,
}));
}
// vectorSource.addMarker(3536859.19, 5438902.94, "BRUSE");
// vectorSource.addMarker(3533399.8907172694, 5439126.050470325, "MyPoly");
var createTextStyle = function(feature, resolution) {
var align = "Normal";
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()
novafactory_vectors.addMarker(3530000,5434300,3538800,5445010,"WU");
var novafactory_layer = new ol.layer.Vector({
source : novafactory_vectors,
// style: polygon_style
});
var map = new ol.Map({
target : 'map',
layers : [ osm_layer, kml_layer, intersections_layer, labels ],
layers : [ osm_layer, kml_layer, novafactory_layer, intersections_layer],
interactions : ol.interaction.defaults({
keyboard : true
})
......@@ -250,7 +211,7 @@ function downloadRegionFromCityGML(i) {
// Waiting 100ms in order to let the cursor change
setTimeout(function() {
// 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 time = end - start;
// console.log('DL Execution time: ' + time);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment