Creating services in ArcIMS€¦ · Web viewA Geoportal Server is an open source software from Esri...

29
Exercise: Technology and Standards Context: In the Web Service Oriented Architectureb (SOA) there are three main roles: service provider, broker and user. Service provider creates and publishes the service to the service registry which can be managed by the Service Broker. Service user is a client who needs to find, connect and use the web service. Service user connects with Service Broker to find the web service. Once he has found the web service he needs, he connects (binds) with the service provider to use it. Aim: The aim of this exercise is to practice with the basic SDI technology for publishing and connecting spatial data services within SOA Web service architecture “publish, find and bind”. After this exercise you should get more understanding about the three main roles in Web service (SOA) architecture. You will also have more understanding about the capabilities of a Web Mapping Service and Web Feature Service standards. Activities In this exercise you will play three roles: Service provider, Service requester and Service broker. Service provider As service provider, you will provide spatial data services online for other users. You will do it using SDI technology 1

Transcript of Creating services in ArcIMS€¦ · Web viewA Geoportal Server is an open source software from Esri...

Page 1: Creating services in ArcIMS€¦ · Web viewA Geoportal Server is an open source software from Esri for publishing metadata on the web in a form of a catalog. A Geoportal Server uses

Exercise: Technology and Standards Context: In the Web Service Oriented Architectureb (SOA) there are three main roles: service provider, broker and user. Service provider creates and publishes the service to the service registry which can be managed by the Service Broker. Service user is a client who needs to find, connect and use the web service. Service user connects with Service Broker to find the web service. Once he has found the web service he needs, he connects (binds) with the service provider to use it.

Aim: The aim of this exercise is to practice with the basic SDI technology for publishing and connecting spatial data services within SOA Web service architecture “publish, find and bind”. After this exercise you should get more understanding about the three main roles in Web service (SOA) architecture. You will also have more understanding about the capabilities of a Web Mapping Service and Web Feature Service standards.

Activities

In this exercise you will play three roles: Service provider, Service requester and Service broker.

Service providerAs service provider, you will provide spatial data services online for other users. You will do it using SDI technology namely: GeoServer and ArcGIS. As a result you should provide map services that are running online and are accessible via internet using ArcGIS or an Internet Browser (e.g. Internet Explorer). You will be providing map services in two kinds of standards: Open Geospatial Consortium (OGC) compliant Web Map Service and Web Feature Service (WFS).

Service UserAs Service User you will try to connect to the spatial data services provided by you but also other students. To connect to them you can use ArcGIS or an Internet Browser.As service user, you will create a web service that will consist of several other web services provided by various providers. You can use services provided by other students but also other institutions like Alterra or Centrum for Geo-information.

Service Broker

1

Page 2: Creating services in ArcIMS€¦ · Web viewA Geoportal Server is an open source software from Esri for publishing metadata on the web in a form of a catalog. A Geoportal Server uses

As a service broker you make the data and services available to the users. You do it via a website called Geoportal. Geoportal is a web catalog with metadata of datasets and services. In this exercise you will administer the Geoportal, make metadata for data and of service and publish it in the web via a Geoportal Website.

During this assignment you will make use of Open Source software, this makes it possible to setup webservices in a similar way as it will be demonstrated during this assignment. Links to the software used can be found at the end of this document.

Programs that you will use are located in StartProgramsGeoServerTo be able to use GeoServer, a webserver should be running, in this assignment we use the Apache web server which is included in the Xampp package

Geoserver username: adminpassword: geoserver

Detailed exercise guidelinesBefore you begin, please download the data you will need in this exercise. To do so, go to the SDI course website, go to the “Schedule and content”, then click on Week 2 and in the box with Tuesday afternoon click on the link to “Data”. Extract the zip file to the D:\SDITechnologyData (On some computers the folder may already exist. In such a case overwrite it with the new files).

1. Service Provider1.1 Concept of creating a map service

A map service can be created in different ways and with different purposes. It can be broadcasted just to serve maps over the web, but can also be used to serve maps in a format where users can retrieve the presented data to be used in their own application. In the first form we are speaking about a map server, where the maps are delivered to the client as images. In the second form it is called a feature service, as the served features of the map can be retrieved and used by the client. The Open Geospatial Consortium (OGC) has developed standards for building the two aforementioned services: Web Mapping Service (WMS) and Web Feature Service (WFS). Both services can be easily created using Geoserver.

In the next part it is explained how to build both map- and feature services in GeoServer.

2

Page 3: Creating services in ArcIMS€¦ · Web viewA Geoportal Server is an open source software from Esri for publishing metadata on the web in a form of a catalog. A Geoportal Server uses

1.2 Starting with GeoServer

Perform the following settings first:

Go to d:\SDI_GeoService\xampp

and run setup_xampp.bat file

You get two options: 1) Refresh now ! or x) Exit.

Click “1” and “Enter”,

Then, press any key to continue

Before you can use GeoServer a webserver should be running at your computer. To start the apache webserver, launch xampp_start (do not close the command window that will be opened at start-up of Xampp). Ignore (cancel) possible notifications from the administrator. To test if the webserver is running correct, open a web-browser and type http://localhost in the address bar. The opening-screen XAMPP should be shown.

Ones the webserver is started, GeoServer can be launched, use the shortcut GeoServer-startup to start GeoServer (again do not close the command window that is opened on

3

Page 4: Creating services in ArcIMS€¦ · Web viewA Geoportal Server is an open source software from Esri for publishing metadata on the web in a form of a catalog. A Geoportal Server uses

start-up). GeoServer can fully be controlled by a web interface, open the address http://localhost:8080/geoserver, and the control panel of Geoserver will open.

To check if GeoServer is working correct, open the link Layer Preview, located in the left-hand menu under Data. Several predefined Layers are listed.

Open the preview of the Tasmania grouped layer-set in OpenLayers.

4

Page 5: Creating services in ArcIMS€¦ · Web viewA Geoportal Server is an open source software from Esri for publishing metadata on the web in a form of a catalog. A Geoportal Server uses

Ones the example data shows up correct, continue creating your own services using the data you downloaded to D:\SDITechnologyData.

1.2 Creating services with GeoServer

To be able to publish services, you need first to login in GeoServer. The username password are set to admin and geoserver.

The menu at the left-hand side has now several more options available.

Select the item Workspaces. The available workspaces are listed. Create a new workspace called SDI, using the Add new workspace link.

5

Page 6: Creating services in ArcIMS€¦ · Web viewA Geoportal Server is an open source software from Esri for publishing metadata on the web in a form of a catalog. A Geoportal Server uses

Give it the name SDI, and also call the Namespace URI SDI. Make this new workspace the default workspace.

Once the workspace is created, we can add a new store that contains the data you will use during the assignment.

The assignment data is given as shapefiles:

Use the following settings:

Workspace: SDI Data Source Name: SDI-Data Description: SDI-Data Enabled: True Connection Parameters

6

Page 7: Creating services in ArcIMS€¦ · Web viewA Geoportal Server is an open source software from Esri for publishing metadata on the web in a form of a catalog. A Geoportal Server uses

Shapefile location: Browse to ... (Use the pulldownmenu to select the data from D:\SDITechologyData\CBSneighborhoods)Next change the selected Shapefilelocation to file://D:\SDIDataExTech2011 (so without the name of the shapefile itself)

Keep the other options untouched Save

After saving these settings the shapefiles available in the Store are listed, now you can pubish the Layers available in the data Store to the web.

7

Page 8: Creating services in ArcIMS€¦ · Web viewA Geoportal Server is an open source software from Esri for publishing metadata on the web in a form of a catalog. A Geoportal Server uses

For more detailed information on the settings see:http://docs.geoserver.org/latest/en/user/webadmin/data/layers.html

Let’s start to enable a WMS and WFS service for the CBSneighborhoods dataset. Select Publish behind the CBSneighborhoods Layer.

In the Data tab:You can change/supply some metadata as title, abstract and keywords

8

Page 9: Creating services in ArcIMS€¦ · Web viewA Geoportal Server is an open source software from Esri for publishing metadata on the web in a form of a catalog. A Geoportal Server uses

Define the Coordinate Reference System as follows: Declared SRS: fill EPSG:28992 When filled it should note this is EPSG:Amerfoort / RD New... SRS handling: Force declared

The Bounding Box can be compute using data and the defined coordinate system. Native bounding Box: Compute from data Lat/lon Bounding Box: Compute from native bounds

9

Page 10: Creating services in ArcIMS€¦ · Web viewA Geoportal Server is an open source software from Esri for publishing metadata on the web in a form of a catalog. A Geoportal Server uses

Under Feature Type Details, the attributes of the dataset are listed

Some look & feel settings of the layer can be made selecting the Publishing tab.

The layer can be made editable and advertised.If necessary, the layer can be loaded in the cache of the server, to speed up the response.

10

Page 11: Creating services in ArcIMS€¦ · Web viewA Geoportal Server is an open source software from Esri for publishing metadata on the web in a form of a catalog. A Geoportal Server uses

Under WMS Settings, one can define the styles in which the layer should be presented to the service requester.

11

Page 12: Creating services in ArcIMS€¦ · Web viewA Geoportal Server is an open source software from Esri for publishing metadata on the web in a form of a catalog. A Geoportal Server uses

More on styles can be found at the GeoServer website:

http://docs.geoserver.org/stable/en/user/styling/sld-cookbook/index.html#sld-cookbookhttp://docs.geoserver.org/stable/en/user/styling/sld-reference/index.html#sld-reference

The WMS Attribution describes information on the data provider.

The KML Format Settings can be used to define the attribute that will be used to generate KML files that can be displayed in Google Earth.

Use Save to store the entered settings.

The new published layer should be listed as available layer.

Check its working using the left-hand menu of the GeoServer control site: under Data select Layer Preview. Choose to open the preview of the CBSNeighborhoods Layer in OpenLayers.

Also explore the other previews:

12

Page 13: Creating services in ArcIMS€¦ · Web viewA Geoportal Server is an open source software from Esri for publishing metadata on the web in a form of a catalog. A Geoportal Server uses

Use the dropdown to select OGC standard WMS of WFSTry viewing the WMS service as PNG, JPEGExplore the WFS as GML2 service formats.

Note the URL of the service preview should look something like: http://localhost:8080/geoserver/SDI/wms?service=WMS&version=1.1.0&request=GetMap&layers=SDI:CBSneighborhoods&styles=&bbox=166000.0,439000.0,176000.0,445000.0&width=550&height=330&srs=EPSG:28992&format=image%2Fpng

Next also add the other available datasets in the same way, goto Layers, and select Add a new resource. Use different Styles to publish the WMS.Make sure you add a layer from the SDI:SDI-Data workspace/datastore.

Note that CBSneighborhoods is already published

2 Service User2.1 Viewing and using WMS GeoServer services

Ones the WMS and WFS services are created they will be available for the clients. This means when the server (in our case your computer is a server and the services run on it) is connected to the internet and the computer is on, other users (clients) can send a request to the Map- or Feature service, which will reply with an image (or features) of the requested service displayed on the screen of the client’s computer.

13

Page 14: Creating services in ArcIMS€¦ · Web viewA Geoportal Server is an open source software from Esri for publishing metadata on the web in a form of a catalog. A Geoportal Server uses

Different clients can send a request to the GeoServer server. Some were already explored using the Layer preview included in the Geoserver control panel. The most common is viewing a service using a common web-browser. But the request can also be send from different client GIS software like ArcGIS, Quantum GIS and others. Using ArcGIS as a client, the request can be send directly to the server running GeoServer, using the web-address of the server that you want to send request to (this corresponds to your computer name e.g. d0114185 [you can find this number on the grey sticker on your computer]) To request your own GeoServer services, the request can also be send to the localhost, as the server and client are in that case the same.

During this excersice we will not demonstrate this working. If you are interested you can ask for guidelines to one of the teachers (you will need arcmap to do so)

2.3 Creating a sFervice layout

As a first step you have to create a layout of your combined service. You can use GeoServer to do so. In the next example we will combine an aerial photo from a WMS service at the National Aerospace Laboratory (NLR) with the WMS service of the CBS neighborhoods you have created before. First we need to add the available WMS service with the aerial photo to GeoServer.

Make sure you are logged in at GeoServer. Goto Stores in the left-hand panel and create a new store for the aerial photo.

Select WMS at the bottom of the page, to add an existing service to GeoServer.Use the SDI workspace.For the Data Source Name you can use something like: NLR_aerial_photo_2006

14

Page 15: Creating services in ArcIMS€¦ · Web viewA Geoportal Server is an open source software from Esri for publishing metadata on the web in a form of a catalog. A Geoportal Server uses

Give a description, and enter the URL that will respond the WMS capabilities, and save the settings:

http://gdsc.nlr.nl/wms/dkln2006?request=GetCapabilities&service=WMS&version=1.1.1

Next new Layer should be create from the Data Source. Select Layers in the left-hand panel. Add a new resource, and from the puldown menu, select the data source that contains the aerial photograph, and publish it.

Fill the setting the same way as you did for the other layers you have published.Ones the layer is published, test it by opening it in OpenLayers under the Layer Preview.

A combination of different WMS services works the same as using different layers in GIS (e.g. ArcGIS). The layers will start drawing from layer most down in the list, puts the next on top till it reaches the most up layer in the list.

15

Page 16: Creating services in ArcIMS€¦ · Web viewA Geoportal Server is an open source software from Esri for publishing metadata on the web in a form of a catalog. A Geoportal Server uses

In our case we use two layers. The aerial photo should be drawn first, and the CBS neighborhoods should be drawn on top of it.

So, the style of the CBS neighborhoods should be changed to transparent, and the outline could be set to red.

In the left-hand panel got Styles, and add a new style, that will contain the style for the transparent polygons. Use the original polygon style as the bases to construct your own transparent polygons style.

Scroll to the part where the Fill settings are defined.

16

Page 17: Creating services in ArcIMS€¦ · Web viewA Geoportal Server is an open source software from Esri for publishing metadata on the web in a form of a catalog. A Geoportal Server uses

Now add an extra line that set the transparency:<CssParameter name="fill-opacity">0.1</CssParameter>

Locate the tag that defines the outline of the polygons.Change the stroke color to red: #FF0000

Validate and submit the new style.

Next attach the new style to the CBS neighborhoods layer. From the left-hand panel select Layers, and locate the CBS neighborhoods. In the Publishing tab under WMS Settings change the default style from polygon to polygon_transparency, and save the changes. Preview the layer.

To be able to create a grouped layer, first a bounding box needs to be defined, write down the Lat/Lon Bounding Box of the CBSneighborhoods layer.

Ones the settings of the style is changed, you can combine the different layers in a Layer Group (select it from the left-hand panel).

17

Page 18: Creating services in ArcIMS€¦ · Web viewA Geoportal Server is an open source software from Esri for publishing metadata on the web in a form of a catalog. A Geoportal Server uses

Add a new layer group called NLR_CBS, and fille the properties.

Next add the two layers you want to combine in the layer group.

Save and preview the result in OpenLayers,

18

Page 19: Creating services in ArcIMS€¦ · Web viewA Geoportal Server is an open source software from Esri for publishing metadata on the web in a form of a catalog. A Geoportal Server uses

Some other WMS services you could use are listed below:

http://gdsc.nlr.nl/wms/lufo2005?request=GetCapabilities&service=WMS&version=1.1.1

http://gdsc.nlr.nl/wms/dkln2006?request=GetCapabilities&service=WMS&version=1.1.1

http://gdsc.nlr.nl/wms/aster_all?request=GetCapabilities&service=WMS&version=1.1.1

http://webservice.nieuwekaart.nl/cgi-bin/nkn?request=GetCapabilities&service=WMS&version=1.1.1

The last link refers to the WMS of “De nieuwe kaart van Nederland” service that combines most Spatial Plans of the Netherlands. Try also to find link to Web Feature Service of “De nieuwe kaart van Nederland” (just google it). From WFS you should also be able to download datasets in a form of shape file to your computer.

Search the web for WMS services for spatial data from various organizations.

The services you create should also be available for other. Use the computer number to explore the services of the other groups in the PC room.

It should be available under web address e.g.:http://d0116830:8080/geoserver/web/

19

Page 20: Creating services in ArcIMS€¦ · Web viewA Geoportal Server is an open source software from Esri for publishing metadata on the web in a form of a catalog. A Geoportal Server uses

The capabilities of the given WMS service can be requested as follows:

http://localhost:8080/geoserver/wms?service=wms&version=1.1.1&request=GetCapabilities

A dialog is opened to save the file, give it the extension .xml (e.g. WMS.xml) Open the file to read the services capabilities.

A map can be requested using the View Map link that includes the following standard WMS request:

http://d0116830:8080/geoserver/wms?service=WMS&version=1.1.0&request=GetMap&layers=NLR_CBS&styles=&bbox=5.548,51.939,5.694,51.993&width=892&height=330&srs=EPSG:4326&format=image%2Fjpeg

Note the map is projected and displayed in a WGS1984 projection using decimal degrees.The map can easily be display Rijksdriehoek coordinates just by changing the requested projection from EPSG:4326 to EPSG:28992. Doing so, also the bounding box should be set to coordinates in Rijksdriehoek units e.g. the lower left corner: 166000,439000 and the top right corner: 176000,445000.

http://d0116830:8080/geoserver/wms?service=WMS&version=1.1.0&request=GetMap&layers=NLR_CBS&styles=&bbox=166000,439000,176000,445000&width=400&height=300&srs=EPSG:28992&format=image%2Fjpeg

To change the layer to “on” set the Layers to 1,1

http://D0106385/wmsconnector/com.esri.wms.Esrimap?BBOX=166000,439000,176000,445000&WIDTH=400&HEIGHT=300&SRS=EPSG:28992&Layers=1,1,&version=1.1.1&service=WMS&FORMAT=JPEG&TRANSPARENT=TRUE&request=getmap&ServiceName=wageningen_mxd

For details on the WMS request, refer to the OGC WMS specifications (note in the examples WMS version 1.1.1 is used):

http://portal.opengeospatial.org/files/?artifact_id=1081&version=1&format=pdf (WMS version 1.1.1)

http://www.mapbender.org/OGC_WMS

20

Page 21: Creating services in ArcIMS€¦ · Web viewA Geoportal Server is an open source software from Esri for publishing metadata on the web in a form of a catalog. A Geoportal Server uses

3. Service Broker

As a service broker you make the data and services available to the users. You do it via a website called Geoportal. Geoportal is a web catalog with metadata for datasets and services. Geoportal does not contain any data, only a description (metadata) of the datasets and services. The actual datasets and service can be located at other location e.g. institutions that create and manage one specific dataset or service. Only the information in a form of metadata are published to the Geoportal so that everyone in one place can discover resources from many institutions.

The role of service broker is to manage a Geoportal where datasets and services from many different resources cab be discovered. A service broker can create metadata by himself using a metadata editor. Another option can be that the service broker uploads a metadata file delivered by the data or service owner.

In this exercise you will use a Geoportal Server. A Geoportal Server is an open source software from Esri for publishing metadata on the web in a form of a catalog. A Geoportal Server uses a web interface to search and manage the content of the catalog.

In this exercise you will use a Geoportal Server to describe with metadata a dataset or service that you created earlier in this exercise. To do so you will use a Geoportal Server inbuilt metadata editor.

1. Go to http://scomp0952.wurnet.nl:8080/geoportal/catalog/main/home.page

This is a start page of the Geoportal. As a service broker you need to log in to manage the content of the portal.

2. Click “login” and use:Username: gptadminPassword: gptadmin

3. Click “Administration” tab.4. Click “Add” 5. Choose “Use dedicated editor to create metadata manually” and click “Proceed” 6. Choose one of the metadata editors. If you want to describe a dataset, choose ISO

19115 (Data). If you want to describe a service, choose one of these two with (Service).

7. Fill in the fields to describe the dataset and/or a service. If you want, you can use metadata standards as a reference.

8. Click “Save”

21

Page 22: Creating services in ArcIMS€¦ · Web viewA Geoportal Server is an open source software from Esri for publishing metadata on the web in a form of a catalog. A Geoportal Server uses

9. Go to “Administration” tab. Find your metadata item, mark it and and change its status to “Set as approved” and click “Execute action.

You metadata is now available online. Check it by searching the Geoportal (click “Home” tab) using one of the keywords that are present in title or abstract of your metadata. Ask your colleague to search your metadata.

22