Coder Social home page Coder Social logo

wfs2kml's Introduction

This WFS-KML Gateway project was my first contact with GIS, GeoTools, OGC standards, etc. It is just a proof of concept now totally remplaced by FeaturePub project.

WFS-KML Gateway

The WFS-KML Gateway project aims to develop a gateway to transform WFS requests in KML responses.

A request, done to any OWS (OGC Web Service) using WFS (Web Feature Service, a standar OGC protocol) will recive a response in KML format. KML is a XML format used by Google to represent geographic information in Google Earth and Google Maps.

To visualize this geographic information represented in a KML file, it is necesary a KML viewer. Google Maps is a web based 2D viewer and Google Earth is a Desktop application 3D viewer.

The WFS-KML gateway is specially oriented to work with 3D representation of geographic features. We can represent buildings or any other geographic feature with a height parameter.

It is also possible to use any other parameter as a height parameter. For example, Earth countries can be represented with a height proportional to their population.

As we can see, WFS-KML Gateway makes possible to translate between the OGC standart protocols and KML Google protocol, adding value to this translation allowing to configurate the way we visualize geographic features and their parameters.

Features

  • Transform WFS requests in KML responses.

  • Allow to select the Bounding Box.

  • Automatic conversion between diferent Coordinate Reference Systems (CRS). KML format use the WSG84 CRS, the standart longitude-latitude system. The bounding box must be given in this format. But if data are stored in a diferent format, automatic conversion will be performed.

  • 3D representation of geographic features.

  • Allow to configurate how geographic features are visualized:

    • Any feature parameter can be used as a height parameter.

    • Height parameter can be scaled.

Usage

The WFS-KML Gateway Servlet can be deployed into any Servlet container (ex. Apache Tomcat) to offer the WFS-KML Gateway service.

It can be used from a web browser generating a .kml file which can be opened with Google Earth.

It can be used directly from Google Earth too.

In the Add menu: Add -> Network Link. In the link box, use the address:

http://MyServer/wfs2kml?
SERVER=GeographicServer&
LAYER=namespace:layer&
BBOX=xMin,yMin,xMax,yMax&
ZATTRIBUTE=attribute&
SCALE=scale

MyServer - Servlet container where the .war file is deployed.

GeographicServer - Public WFS Geographic server from where we want to get the data.

namespace:layer - Namespace and name of one of the layers offered by the WFS server.

xMin,yMin,xMax,yMax - Bounding Box. 2D rectangle which defines the visible area. Expresed in standar latitude-longitude system.

zAttribute - (Optional) - Layer's attribute used as height attribute. If it is not set, 3D feature's height attribute is used or, in 2D features, it will be shown as 2D picture.

scale - (Optional) - The height will be divided by this number. Default scale is 1.

Glossary

OWS - OGC Web Service.

OGC - Open Geospatial Consortium. International voluntary consensus standards organization. Develop and implements standards for geospatial content and services, GIS data processing and exchange.

WFS - Web Feature Service. Allow requests for geographical features across the web. It is a OGC specification.

KML - Keyhole Markup Language. XML format used by Google to represent 3D geographic information.

Feature - Entity with a geographic location, typically describable by (for example) points, arcs, or polygons.

CRS - Coordinate Reference System

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.