Mercurial > gemma
changeset 4693:c4adbebaf1a6
merge
author | Thomas Junk <thomas.junk@intevation.de> |
---|---|
date | Wed, 16 Oct 2019 15:40:36 +0200 |
parents | cad2b264542e (current diff) 65a67b3492fd (diff) |
children | e326874dd2c4 |
files | |
diffstat | 10 files changed, 100 insertions(+), 91 deletions(-) [+] |
line wrap: on
line diff
--- a/client/src/components/identify/formatter.js Wed Oct 16 15:40:27 2019 +0200 +++ b/client/src/components/identify/formatter.js Wed Oct 16 15:40:36 2019 +0200 @@ -1,5 +1,6 @@ import Feature from "ol/Feature"; import app from "@/main"; +import filters from "@/lib/filters"; const formatter = { all(p) { @@ -13,7 +14,7 @@ p.key === "gm_measuredate") && p.val !== null ) { - p.val = new Date(p.val).toLocaleString(); + p.val = filters.dateTime(p.val); } // remove certain props @@ -113,6 +114,16 @@ return p; } + }, + sounding_results_areas_geoserver: { + label: app.$gettext("Sounding results"), + props: p => { + let propsToRemove = ["height"]; + if (propsToRemove.indexOf(p.key) !== -1) return null; + if (p.key === "surtyp") p.key = app.$gettext("Survey type"); + if (p.key === "bottleneck_id") p.key = app.$gettext("Bottleneck"); + return p; + } } };
--- a/client/src/store/map.js Wed Oct 16 15:40:27 2019 +0200 +++ b/client/src/store/map.js Wed Oct 16 15:40:36 2019 +0200 @@ -523,6 +523,32 @@ commit("addIdentifiedFeatures", features); }); } + var srSource = map.getLayer("BOTTLENECKISOLINE").getSource(); + var srUrl = srSource.getGetFeatureInfoUrl( + event.coordinate, + currentResolution /* resolution */, + "EPSG:3857", + // { INFO_FORMAT: "application/vnd.ogc.gml" } // not allowed by d4d + { INFO_FORMAT: "application/json" } + ); + + if (srUrl) { + HTTP.get(srUrl + "&BUFFER=5", { + headers: { + "X-Gemma-Auth": localStorage.getItem("token") + } + }).then(response => { + let features = response.data.features.map(f => { + let feat = new Feature({ + geometry: new Point(f.geometry.coordinates) + }); + feat.setId(f.id); + feat.setProperties(f.properties); + return feat; + }); + commit("addIdentifiedFeatures", features); + }); + } }); }, refreshLayers({ state }) {
--- a/pkg/controllers/diff.go Wed Oct 16 15:40:27 2019 +0200 +++ b/pkg/controllers/diff.go Wed Oct 16 15:40:36 2019 +0200 @@ -85,10 +85,13 @@ ST_Transform( ST_Multi( ST_CollectionExtract( - ST_SimplifyPreserveTopology( - ST_Multi(ST_Collectionextract( - ST_MakeValid(ST_GeomFromWKB($4, $3::integer)), 3)), - $5 + ST_MakeValid( + ST_Multi( + ST_Collectionextract( + ST_SimplifyPreserveTopology(ST_GeomFromWKB($4, $3::integer), $5), + 3 + ) + ) ), 3 )
--- a/pkg/imports/sr.go Wed Oct 16 15:40:27 2019 +0200 +++ b/pkg/imports/sr.go Wed Oct 16 15:40:36 2019 +0200 @@ -175,10 +175,13 @@ ST_Transform( ST_Multi( ST_CollectionExtract( - ST_SimplifyPreserveTopology( - ST_Multi(ST_Collectionextract( - ST_MakeValid(ST_GeomFromWKB($4, $3::integer)), 3)), - $5 + ST_MakeValid( + ST_Multi( + ST_Collectionextract( + ST_SimplifyPreserveTopology(ST_GeomFromWKB($4, $3::integer), $5), + 3 + ) + ) ), 3 )
--- a/pkg/octree/classbreaks.go Wed Oct 16 15:40:27 2019 +0200 +++ b/pkg/octree/classbreaks.go Wed Oct 16 15:40:36 2019 +0200 @@ -103,14 +103,6 @@ min, max = max, min } - if len(cbs) < 2 { - return cbs - } - - if min >= cbs[0] && max <= cbs[len(cbs)-1] { - return cbs - } - n := make([]float64, len(cbs)) copy(n, cbs) sort.Float64s(n)
--- a/schema/default_sysconfig.sql Wed Oct 16 15:40:27 2019 +0200 +++ b/schema/default_sysconfig.sql Wed Oct 16 15:40:36 2019 +0200 @@ -190,7 +190,8 @@ SELECT bottleneck_id, date_info, height, - areas + areas, + surtyp FROM waterway.sounding_results_iso_areas ia JOIN waterway.sounding_results sr ON sr.id = ia.sounding_result_id $$),
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/schema/updates/1305/01.update_sr_geoserv.sql Wed Oct 16 15:40:36 2019 +0200 @@ -0,0 +1,9 @@ +UPDATE sys_admin.published_services SET view_def = $$ + SELECT bottleneck_id, + date_info, + height, + areas, + surtyp + FROM waterway.sounding_results_iso_areas ia + JOIN waterway.sounding_results sr ON sr.id = ia.sounding_result_id + $$ WHERE name = 'sounding_results_areas_geoserver'; \ No newline at end of file
--- a/schema/version.sql Wed Oct 16 15:40:27 2019 +0200 +++ b/schema/version.sql Wed Oct 16 15:40:36 2019 +0200 @@ -1,1 +1,1 @@ -INSERT INTO gemma_schema_version(version) VALUES (1304); +INSERT INTO gemma_schema_version(version) VALUES (1305);
--- a/style-templates/sounding_differences.sld-template Wed Oct 16 15:40:27 2019 +0200 +++ b/style-templates/sounding_differences.sld-template Wed Oct 16 15:40:36 2019 +0200 @@ -121,24 +121,15 @@ <ogc:Literal>0.000000</ogc:Literal> <ogc:PropertyName>height</ogc:PropertyName> </ogc:Function> - <ogc:Literal>1.000000</ogc:Literal><ogc:Literal>1</ogc:Literal> - <ogc:Literal>1.500000</ogc:Literal><ogc:Literal>1.5</ogc:Literal> - <ogc:Literal>1.700000</ogc:Literal><ogc:Literal>1.7</ogc:Literal> - <ogc:Literal>1.900000</ogc:Literal><ogc:Literal>1.9</ogc:Literal> - <ogc:Literal>2.100000</ogc:Literal><ogc:Literal>2.1</ogc:Literal> - <ogc:Literal>2.300000</ogc:Literal><ogc:Literal>2.3</ogc:Literal> - <ogc:Literal>2.500000</ogc:Literal><ogc:Literal>2.5</ogc:Literal> - <ogc:Literal>2.700000</ogc:Literal><ogc:Literal>2.7</ogc:Literal> - <ogc:Literal>2.900000</ogc:Literal><ogc:Literal>2.9</ogc:Literal> - <ogc:Literal>3.100000</ogc:Literal><ogc:Literal>3.1</ogc:Literal> - <ogc:Literal>3.300000</ogc:Literal><ogc:Literal>3.3</ogc:Literal> - <ogc:Literal>3.500000</ogc:Literal><ogc:Literal>3.5</ogc:Literal> - <ogc:Literal>4.000000</ogc:Literal><ogc:Literal>4</ogc:Literal> - <ogc:Literal>4.500000</ogc:Literal><ogc:Literal>4.5</ogc:Literal> - <ogc:Literal>5.000000</ogc:Literal><ogc:Literal>5</ogc:Literal> - <ogc:Literal>5.500000</ogc:Literal><ogc:Literal>5.5</ogc:Literal> - <ogc:Literal>6.000000</ogc:Literal><ogc:Literal>6</ogc:Literal> - <ogc:Literal>7.000000</ogc:Literal><ogc:Literal>7</ogc:Literal> + {{ range . -}} + {{ if .HasHigh -}} + <ogc:Literal> + {{- printf "%f" .High -}} + </ogc:Literal><ogc:Literal> + {{- printf "%g" .High -}} + </ogc:Literal> + {{ end -}} + {{ end }} </ogc:Function> </se:Label> <se:Font> @@ -168,24 +159,15 @@ <ogc:Literal>0.000000</ogc:Literal> <ogc:PropertyName>height</ogc:PropertyName> </ogc:Function> - <ogc:Literal>1.000000</ogc:Literal><ogc:Literal>1</ogc:Literal> - <ogc:Literal>1.500000</ogc:Literal><ogc:Literal>1.5</ogc:Literal> - <ogc:Literal>1.700000</ogc:Literal><ogc:Literal>1.7</ogc:Literal> - <ogc:Literal>1.900000</ogc:Literal><ogc:Literal>1.9</ogc:Literal> - <ogc:Literal>2.100000</ogc:Literal><ogc:Literal>2.1</ogc:Literal> - <ogc:Literal>2.300000</ogc:Literal><ogc:Literal>2.3</ogc:Literal> - <ogc:Literal>2.500000</ogc:Literal><ogc:Literal>2.5</ogc:Literal> - <ogc:Literal>2.700000</ogc:Literal><ogc:Literal>2.7</ogc:Literal> - <ogc:Literal>2.900000</ogc:Literal><ogc:Literal>2.9</ogc:Literal> - <ogc:Literal>3.100000</ogc:Literal><ogc:Literal>3.1</ogc:Literal> - <ogc:Literal>3.300000</ogc:Literal><ogc:Literal>3.3</ogc:Literal> - <ogc:Literal>3.500000</ogc:Literal><ogc:Literal>3.5</ogc:Literal> - <ogc:Literal>4.000000</ogc:Literal><ogc:Literal>4</ogc:Literal> - <ogc:Literal>4.500000</ogc:Literal><ogc:Literal>4.5</ogc:Literal> - <ogc:Literal>5.000000</ogc:Literal><ogc:Literal>5</ogc:Literal> - <ogc:Literal>5.500000</ogc:Literal><ogc:Literal>5.5</ogc:Literal> - <ogc:Literal>6.000000</ogc:Literal><ogc:Literal>6</ogc:Literal> - <ogc:Literal>7.000000</ogc:Literal><ogc:Literal>7</ogc:Literal> + {{ range . -}} + {{ if .HasHigh -}} + <ogc:Literal> + {{- printf "%f" .High -}} + </ogc:Literal><ogc:Literal> + {{- printf "%g" .High -}} + </ogc:Literal> + {{ end -}} + {{ end }} </ogc:Function> </se:Label> <se:Font>
--- a/style-templates/sounding_results_areas_geoserver.sld-template Wed Oct 16 15:40:27 2019 +0200 +++ b/style-templates/sounding_results_areas_geoserver.sld-template Wed Oct 16 15:40:36 2019 +0200 @@ -121,24 +121,15 @@ <ogc:Literal>0.000000</ogc:Literal> <ogc:PropertyName>height</ogc:PropertyName> </ogc:Function> - <ogc:Literal>1.000000</ogc:Literal><ogc:Literal>1</ogc:Literal> - <ogc:Literal>1.500000</ogc:Literal><ogc:Literal>1.5</ogc:Literal> - <ogc:Literal>1.700000</ogc:Literal><ogc:Literal>1.7</ogc:Literal> - <ogc:Literal>1.900000</ogc:Literal><ogc:Literal>1.9</ogc:Literal> - <ogc:Literal>2.100000</ogc:Literal><ogc:Literal>2.1</ogc:Literal> - <ogc:Literal>2.300000</ogc:Literal><ogc:Literal>2.3</ogc:Literal> - <ogc:Literal>2.500000</ogc:Literal><ogc:Literal>2.5</ogc:Literal> - <ogc:Literal>2.700000</ogc:Literal><ogc:Literal>2.7</ogc:Literal> - <ogc:Literal>2.900000</ogc:Literal><ogc:Literal>2.9</ogc:Literal> - <ogc:Literal>3.100000</ogc:Literal><ogc:Literal>3.1</ogc:Literal> - <ogc:Literal>3.300000</ogc:Literal><ogc:Literal>3.3</ogc:Literal> - <ogc:Literal>3.500000</ogc:Literal><ogc:Literal>3.5</ogc:Literal> - <ogc:Literal>4.000000</ogc:Literal><ogc:Literal>4</ogc:Literal> - <ogc:Literal>4.500000</ogc:Literal><ogc:Literal>4.5</ogc:Literal> - <ogc:Literal>5.000000</ogc:Literal><ogc:Literal>5</ogc:Literal> - <ogc:Literal>5.500000</ogc:Literal><ogc:Literal>5.5</ogc:Literal> - <ogc:Literal>6.000000</ogc:Literal><ogc:Literal>6</ogc:Literal> - <ogc:Literal>7.000000</ogc:Literal><ogc:Literal>7</ogc:Literal> + {{ range . -}} + {{ if .HasHigh -}} + <ogc:Literal> + {{- printf "%f" .High -}} + </ogc:Literal><ogc:Literal> + {{- printf "%g" .High -}} + </ogc:Literal> + {{ end -}} + {{ end }} </ogc:Function> </se:Label> <se:Font> @@ -168,24 +159,15 @@ <ogc:Literal>0.000000</ogc:Literal> <ogc:PropertyName>height</ogc:PropertyName> </ogc:Function> - <ogc:Literal>1.000000</ogc:Literal><ogc:Literal>1</ogc:Literal> - <ogc:Literal>1.500000</ogc:Literal><ogc:Literal>1.5</ogc:Literal> - <ogc:Literal>1.700000</ogc:Literal><ogc:Literal>1.7</ogc:Literal> - <ogc:Literal>1.900000</ogc:Literal><ogc:Literal>1.9</ogc:Literal> - <ogc:Literal>2.100000</ogc:Literal><ogc:Literal>2.1</ogc:Literal> - <ogc:Literal>2.300000</ogc:Literal><ogc:Literal>2.3</ogc:Literal> - <ogc:Literal>2.500000</ogc:Literal><ogc:Literal>2.5</ogc:Literal> - <ogc:Literal>2.700000</ogc:Literal><ogc:Literal>2.7</ogc:Literal> - <ogc:Literal>2.900000</ogc:Literal><ogc:Literal>2.9</ogc:Literal> - <ogc:Literal>3.100000</ogc:Literal><ogc:Literal>3.1</ogc:Literal> - <ogc:Literal>3.300000</ogc:Literal><ogc:Literal>3.3</ogc:Literal> - <ogc:Literal>3.500000</ogc:Literal><ogc:Literal>3.5</ogc:Literal> - <ogc:Literal>4.000000</ogc:Literal><ogc:Literal>4</ogc:Literal> - <ogc:Literal>4.500000</ogc:Literal><ogc:Literal>4.5</ogc:Literal> - <ogc:Literal>5.000000</ogc:Literal><ogc:Literal>5</ogc:Literal> - <ogc:Literal>5.500000</ogc:Literal><ogc:Literal>5.5</ogc:Literal> - <ogc:Literal>6.000000</ogc:Literal><ogc:Literal>6</ogc:Literal> - <ogc:Literal>7.000000</ogc:Literal><ogc:Literal>7</ogc:Literal> + {{ range . -}} + {{ if .HasHigh -}} + <ogc:Literal> + {{- printf "%f" .High -}} + </ogc:Literal><ogc:Literal> + {{- printf "%g" .High -}} + </ogc:Literal> + {{ end -}} + {{ end }} </ogc:Function> </se:Label> <se:Font>