# HG changeset patch # User Sascha Wilde # Date 1549639226 -3600 # Node ID 3bfe48e32f20bc3540ebd57989ecff93a6c72072 # Parent f6380bbdb853b577df1528d7c52b1ddd97a059e2 Fixed de-duplication (primary geoserver id) for virt dist marks. The last attempt to fix this was bogus, as there is no "id" at the virt distance marks table... diff -r f6380bbdb853 -r 3bfe48e32f20 client/src/components/ImportStretches.vue --- a/client/src/components/ImportStretches.vue Fri Feb 08 15:43:33 2019 +0100 +++ b/client/src/components/ImportStretches.vue Fri Feb 08 16:20:26 2019 +0100 @@ -492,7 +492,7 @@ }; const distanceMark = this.identifiedFeatures.filter(filterDistanceMarks); if (distanceMark.length > 0) { - const value = distanceMark[0].getProperties()["isrs_astext"]; + const value = distanceMark[0].getProperties()["location"]; this.startrhm = this.pipetteStart ? value : this.startrhm; this.endrhm = this.pipetteEnd ? value : this.endrhm; this.pipetteStart = false; diff -r f6380bbdb853 -r 3bfe48e32f20 schema/gemma.sql --- a/schema/gemma.sql Fri Feb 08 15:43:33 2019 +0100 +++ b/schema/gemma.sql Fri Feb 08 16:20:26 2019 +0100 @@ -329,7 +329,8 @@ -- At least geoserver-2.13.2 does not serve type geography correctly -- and does not serve the location_code as isrs type CREATE VIEW distance_marks_geoserver AS - SELECT isrs_asText(location_code), + SELECT location_code, + isrs_asText(location_code) AS location, geom::Geometry(POINT, 4326), related_enc, (location_code).hectometre @@ -621,7 +622,7 @@ -- Configure primary keys for geoserver views INSERT INTO waterway.gt_pk_metadata VALUES - ('waterway', 'distance_marks_geoserver', 'id'), + ('waterway', 'distance_marks_geoserver', 'location_code'), ('waterway', 'bottlenecks_geoserver', 'id'); --