OGC services and OGS tools

Usage of OGS (OpenGeo Suite ) as a web based GIS tool

We shall start playing around with Boundless OpenGeo Suite – a web based GIS tool to discover preloaded data and take a look how it is delivered to the end user in presentation form as a map and in digital format as a data.

Short introduction to OGS

The best way to get introduced is to open OpenGeoSuite in your browser (I recommend Chrome, due it’s  embedded DevTools  capabilities) pointing to the address:  http://localhost:8080/dashboard/

Review basic operations on map viewer

Let’s start GeoExplorer first.  Try to play around on map with Zoom in, Zoom out and Pan map  tool. Zoom to your homeland country. Add countries overlay.

Styling map using OGC SLD

In general map styling is done using a Styled Layer Descriptor (SLD). SLD is an XML schema specified by the Open Geospatial Consortium (OGC) for describing the appearance of map layers.

Basic styling principles

Great resource for styling is SLD Cookbook. Directly editing SLD XML files enables you to get out all SLD capabilities, but it also requires some technical knowledge.

Styling with GeoExplorer

Due the complexity connected with direct SDL XML editing use GeoExplorer built in Layer Styles tool to add some transparency to countries layer.

Use OGC WMS service for map generation
Short introduction to OGC WMS

A Web Map Service (WMS) is a standard protocol for serving georeferenced map images over the Internet . It convert vector or raster data to image sent to client. As we have seen earlier,  how map will look like depends on SLD used for map generation. There are a bunch of parameters needed to describe proper WMS request.  Check out WMS reference for more info.

Introduction to Geoserver Demo requests for WMS

Before we begin login to GeoServer http://localhost:8080/geoserver/web and under Services select WFS  and select option  Return bounding box with every feature.  Since it seems quite complicated to create WMS request manually, we’ll take the shortcut and use Geoserver Demos page to select some predefined WMS requests.  from the left side click Demos link, afterwords on right side click  Demos requests. Select WMS_getMap.url and press Submit button. Wow, USA states map just came back. Review request parameters.

WMS Reflector

As we have seen it is quite inconvenient to create  WMS requests manually. Luckily, there is a additional WMS  request called  WMS Reflector. It enables map creation by entering only one parameter: layers. So let’s try out. Enter http://localhost:8080/geoserver/wms/reflect?layers=opengeo:countries Now we have a map of the world in out pocket.

Use OGC WFS service for feature info

Short introduction to OGS WFS

In a nutshell, WFS (Web Feature Service) delivers vector data, usually called geographic features. WMS return only an image, which end-users cannot edit or spatially analyze, in contrary WFS delivers pure data without graphical representation. WFS request has a numerous options and parameters that can be found in WFS reference.

Introduction to Geoserver Demo requests for WFS

Again we will use GeoServer Demos to produce sample WFS request and analyze basic parameters. Select WFS_getFeatireFid.url request and click on Submit button. We revived data about Delaware state.

WFS request

In this tutorial we shall primary use opengeo:countries layer, that can be obtained using following WFS request: http://localhost:8080/geoserver/wfs?request=GetFeature&version=2.0.0&typeName=opengeo:countries It returns 4,35 MB of data regarding some basic facts about Countries of the World with their geometry.

CQL and ECQL filters

If I would like to find out some more facts about my homeland country, Croatia,  I would need to search trough round two hundred records. To simplify the search I can use additional filter to list only data about Croatia. This can be done using Common Query Language CQL and ECQL  (Extended CQL)  filters, that support wide range of options. Both GeoServer WMS and WFS supports CQL filtering (in case of WFS it is vendor specific parameter).  In this case we can use CQL filter name_long=’Croatia’ http://localhost:8080/geoserver/wfs?service=wfs&version=2.0.0&request=GetFeature&typeNames=opengeo:countries&cql_filter=name_long=’Croatia’ From received response one can get Croatia bbox and reuse it in WFS request.

<wfs:boundedBy>
   <gml:Envelope>
     <gml:lowerCorner>42.43291015624999 13.517187500000063</gml:lowerCorner>
     <gml:upperCorner>46.53461914062504 19.400976562500063</gml:upperCorner>
   </gml:Envelope>
</wfs:boundedBy>

WFS request now would look like:

http://localhost:8080/geoserver/wms/reflect?layers=opengeo:countries&bbox=13,42,20,47

and we can point it out a little bit by filtering only a Croatia without surrounding countries using CQL filter:

http://localhost:8080/geoserver/wms/reflect?layers=opengeo:countries&bbox=13,42,20,47&cql_filter=name_long=’Croatia’

It looks nice!

Image of Republic of Croatia

Image of Republic of Croatia

Great, now we have some geo data, in their graphical representation and also in digital format, so we are ready to produce some georeports.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s