Skip to content
This repository has been archived by the owner on Oct 25, 2023. It is now read-only.

Commit

Permalink
#351 Tilret views til geoserver, så der bruges danske navne konsekvent
Browse files Browse the repository at this point in the history
  • Loading branch information
jrftrifork committed Dec 12, 2014
1 parent 5bab469 commit fc70ac1
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 3 deletions.
1 change: 1 addition & 0 deletions psql/initialization.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ exports.tableSpecs = normaliseTableSpec([
{name: 'adgangsadresser_temaer_matview' },
{name: 'adgangsadresserview', scriptFile: 'adgangsadresser-view.sql', type: 'view'},
{name: 'adresser', scriptFile: 'adresse-view.sql', type: 'view'},
{name: 'wms_housenumber_inspire', type: 'view'},
{name: 'wms_adgangsadresser', type: 'view'},
{name: 'wfs_adgangsadresser', type: 'view'},
{name: 'wfs_adresser', type: 'view'}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ALTER VIEW wms_adgangsadresser RENAME TO wms_housenumber_inspire;
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
-- tekstretning konverteres fra GON til grader, og det sikres at vinklen er indenfor +/- 90.
CREATE OR REPLACE VIEW wms_adgangsadresser AS
SELECT
id,
husnr,
round((COALESCE(tekstretning, 200) * 0.9 + 360 + 90))::INTEGER % 180 - 90 AS "tekstretninggrader",
geom
FROM adgangsadresser;
6 changes: 3 additions & 3 deletions psql/schema/wms_adgangsadresser.sql
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ DROP VIEW IF EXISTS wms_adgangsadresser CASCADE;
-- tekstretning konverteres fra GON til grader, og det sikres at vinklen er indenfor +/- 90.
CREATE OR REPLACE VIEW wms_adgangsadresser AS
SELECT
id AS "AddressAccessIdentifier",
husnr AS "StreetBuildingIdentifier",
round((COALESCE(tekstretning, 200) * 0.9 + 360 + 90))::INTEGER % 180 - 90 AS "Angle360",
id,
husnr,
round((COALESCE(tekstretning, 200) * 0.9 + 360 + 90))::INTEGER % 180 - 90 AS "tekstretninggrader",
geom
FROM adgangsadresser;
10 changes: 10 additions & 0 deletions psql/schema/wms_housenumber_inspire.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
DROP VIEW IF EXISTS wms_housenumber_inspire CASCADE;

-- tekstretning konverteres fra GON til grader, og det sikres at vinklen er indenfor +/- 90.
CREATE OR REPLACE VIEW wms_housenumber_inspire AS
SELECT
id AS "AddressAccessIdentifier",
husnr AS "StreetBuildingIdentifier",
round((COALESCE(tekstretning, 200) * 0.9 + 360 + 90))::INTEGER % 180 - 90 AS "Angle360",
geom
FROM adgangsadresser;

0 comments on commit fc70ac1

Please sign in to comment.