popkinj / dbc-kml-apps

DataBC KML Applications and Templates

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

dbc-kml-apps

DataBC KML Applications and Templates

The purpose of this repo is to convert existing mapserver kml applications and templates to use geoserver and house the results.

dbc-kml-apps/apps is for converted kml apps

dbc-kml-apps/apps/icons is for custom icons organized by kml app

dbc-kml-apps/geoserver is for geoserver ftl templates, named sld's, and xslts grouped by data source

dbc-kml-mapserver/kml holds the original kml apps that need to be converted

Here is a handy table for understanding the layers in existing mapserver templates.

Creating a custom output type for the DataBC GeoServer using XSLT

The need for creating custom output type is stil unclear. If they are needed, this is how its done. To create a custom output type in GeoServer using XSLT, you need to define two files:

 a. A custom output type declaration file

 b. A custom output transformation file

Each pair of custom output files should specify the transformation of one and only one feature class.

A custom output type declaration file should be named .xml (e.g., kayml_geodetic_control.xml) where is "kayml_" and is a meaningful contraction of the featureClass name in the BC Geographical WhereHouse

A custom output transformation file should be named .xslt (e.g., kayml_geodetic_control.xslt)

Here is an example request for a custom output type called kayml_geodetic_control.xml:

http://delivery.openmaps.gov.bc.ca/geo/pub/ows?service=WFS&version=1.0.0&request=GetFeature&typeName=pub:WHSE_REFERENCE.MASCOT_GEODETIC_CONTROL&maxFeatures=50&outputFormat=kayml_geodetic_control&srsname=EPSG:4326

Given a feature class called WHSE_REFERENCE.MASCOT_GEODETIC_CONTROL, the custom output type declaration file is named kayml_geodetic_control.xml

The custom output type transformation file for this feature class is called kayml_geodetic_control.xslt

Process

Usefull links

WMS GetCapabilities WFS GetCapabilities WMS GetMap KML BCGOV Web Map Libary KML FrontCounter BC KML Airphoto Viewer

Geodetic control Jenkins Build

You can also specify it by data store:layer format like this Geodetic Control

KML Templating

Node must be installed on the system. Make sure the following modules are installed globally.

npm i -g pug-cli html2pug jstransformer-cdata livescript

Convert the existing kml files into pug files like this

html2pug kmlfile.kml

There is an npm step for building pug files back into kml:

npm run build

About

DataBC KML Applications and Templates

License:Apache License 2.0


Languages

Language:HTML 90.0%Language:XSLT 7.7%Language:FreeMarker 2.3%