geonuris webgis tutorialgeonuris.uitgis.com/nuris/.../geonuris_webgis_tutorial_3.00.001.pdf26...
TRANSCRIPT
© 2011 Cooperation & Communication International
GeoNURISWebGISTutorial
GeoNURIS WebGIS Tutorial2011-11-07
by Cooperation & Communication International
© 2011 Cooperation & Communication International
Table of ContentsForeword 0
Part I Document Introduction 5
................................................................................................................................... 51 Terms
................................................................................................................................... 52 Conventions
................................................................................................................................... 63 Prerequisite
Part II Introduction 9
................................................................................................................................... 91 System Compostion
Part III Map Service using GeoNURIS products 12
................................................................................................................................... 121 Upload data using GeoNURIS Desktop Pro
................................................................................................................................... 162 Create GDX for Service
................................................................................................................................... 183 Save Map Settings
................................................................................................................................... 194 Save GDX
................................................................................................................................... 205 Check service using GeoNURIS GeoWeb Server
................................................................................................................................... 216 Javascript Include
Part IVDynamic Cache Service to improveperformance 25
................................................................................................................................... 251 Set Cache
................................................................................................................................... 272 How to Call Service using Cache
Part V Map Service using Dynamic SLD 29
................................................................................................................................... 291 Apply Dynamic Style
GeoNURIS WebGIS Tutorial
© 2011 Cooperation & Communication International
Part
I
© 2011 Cooperation & Communication International
1 Document Introduction
1.1 Terms
The following terms are used in this document.
Ter
ms
Definitions
OGC The Open Geospatial Consortium (OGC) is a standards
organization that develops specifications for geospatial
services
WMS The Web Map Service (WMS) specification from the OGC
defines an interface for requesting rendered map images
across the web.
WFS The Web Feature Service (WFS) specification from the OGC
defines an interface for reading and writing geographic
features across the web.
JSP “JavaServer Pages”” a scripting system for Java server
applications that allows the interleaving of markup and Java
procedural code.
1.2 Conventions
The following conventions are used in this document.
Conventions Descriptions
Password Items shown in windows
<Settings> The title of windows
[OK] The title of buttons
[Start] The title of features
Start>All
Program>Accessories
The order for running programs
GeoNURIS WebGIS Tutorial6
© 2011 Cooperation & Communication International
☞ Reference 또는
Reference
The reference which is useful when you run the
product
Note The note that you need to remind when you run the
product
1.3 Prerequisite
Check the following prerequisites before using GeoNURIS WebGIS.
Database - Oracle 10g or higher
Use Oracle 10g or higher version for data storage. In this document, ‘nuris’ of Oracle
account is used.
GIS Engine - GeoNURIS GeoSpatial Server for ORACLE
WebGIS Server - GeoNURIS GeoWebServer
For WebGIS serive, use GeoWeb Server as GeoNURIS data storage which supports
open standard server such as WMS and WFS.
Client - OpenLayers
OpenLayers is open javascript library (it uses no ActiveX). See http://www.
openlayers.org to find out example, method to use it, class references, and users’
forum.
This document is written based on Openlayers library version 2.10.
Sample Document - http://geonuris.ccigis.co.kr/geonuris/data/example.zip
example.html, sample data(cities, continents, ,rivers)
Tools - GeoNURIS Desktop Pro
Install GeoNURIS Spatial Server : See GeoNURIS Spatial Server Installation
Guide
© 2011 Cooperation & Communication International
Install GeoNURIS GeoWebServer : See GeoWebServer Installation Guide
In case of which GeoNURIS Spatial Server is not installed, only shape files are possible
to be used
GeoNURIS WebGIS Tutorial
© 2011 Cooperation & Communication International
Part
II
© 2011 Cooperation & Communication International
2 Introduction
This document explain the series of steps such as
Using GeoNURIS WebGIS Server to load existing shape data into GIS engine
Starting web service using the data loaded.
In addition, in order to improve its performance, this document explains how to use ans
set dynamic cache.
2.1 System Compostion
The composition of Web GIS service using GeoNURIS GeoWeb Server is like below.
Data Area : GSS engine or shape files
GIS Engine : GeoNURIS GeoSpatial Server(GSS) for ORACLE
WebGIS Server : GeoNURIS GeoWeb Server
WebManager : GeoNURIS GeoWebServer Web Manaer
Tools : GeoNURIS Desktop Pro
Client : OpenLayers
GeoNURIS WebGIS Tutorial10
© 2011 Cooperation & Communication International
GeoNURIS WebGIS Tutorial
© 2011 Cooperation & Communication International
Part
III
GeoNURIS WebGIS Tutorial12
© 2011 Cooperation & Communication International
3 Map Service using GeoNURIS products
This chapter describes how to load downloaded shape files into oracle-based GSS
engine. See Chapter 2.2 for how to service shape file directly without using GSS engine.
3.1 Upload data using GeoNURIS Desktop Pro
1. Run GeoNURIS Desktop Pro and register shape files to Catalog
a. Right click on ‘Catalog’
b. Click on Add Data Store>Add Shape Store
© 2011 Cooperation & Communication International
c. <ADD Shape Store> window is popped up.
d. Enter the path of directory where Name and shape files exist.
e. Ex) Name : sample_shape, Directory Path : C:\data
f. Choose added sample_shape and right click.
g. Click on Refresh. The shape lists in the corresponding directory are shown.
GeoNURIS WebGIS Tutorial14
© 2011 Cooperation & Communication International
2. Register GSS Storage
a. Add GSS Storage to Catalog.
© 2011 Cooperation & Communication International
b. Enter connection information.
Host : Host Address where GSS is installed
Port : Port to connect to GSS ( default : 8844)
User : User account of DB
Password : User password of DB
c. Connecting to storage is completed and the lists are loaded. If data do not exist,
nothing is shown.
3. Load data to GSS storage
a. Select all the data lists under sample_shape of ‘Catalog’.
b. Right click to pop up a menu and click on Export. <Export Dialog> is popped up.
c. Choose ‘gss_store’ from Target pull-down menu of <Export Dialog>.
d. Click on [Export] to put shape files into GSS.
GeoNURIS WebGIS Tutorial16
© 2011 Cooperation & Communication International
e. After completed, choose ‘gss_store’ in Catalog and right click to refresh and check
the data lists uploaded to ‘gss_store’.
Refer: See GeoNURIS Desktop Pro manual for details. GSS Command can be
also used to upload data. GeoNURIS Spatial Server manual for details on this.
3.2 Create GDX for Service
1. Choose Map>New Map from GeoNURIS Desktop Pro menu to create a new project.
© 2011 Cooperation & Communication International
2. Choose ‘Catalog’ that services a map and right click to pop up a menu. Click on ‘Add
To Toc’ from the popup menu to add map area.
GeoNURIS WebGIS Tutorial18
© 2011 Cooperation & Communication International
3. The added layers are added to TOC area and shown in ‘Map Viewer’.
4. Set the style for each layer in TOC area.
Refer: See ‘GeoNURIS Desktop Pro Manual’ for details to set styles. If no specific
settings exists, current arbitrary styles are applied to the map.
3.3 Save Map Settings
1. Click on File>Save from menu to save map settings.
in this document, the file is saved as sampleMap.xml
© 2011 Cooperation & Communication International
3.4 Save GDX
1. Register sampleMap.xml created above to GeoNURIS GeoWeb Server.
Copy GDX file, sampleMap.xml, to the gdx folderwhere GeoNURIS GeoWeb Server is
installed.
GeoNURIS WebGIS Tutorial20
© 2011 Cooperation & Communication International
3.5 Check service using GeoNURIS GeoWeb Server
1. Connect to http://localhost:8880/geonuris and sign in
2. Choose ‘Data Preview’ from the menu on the left to check the lists
© 2011 Cooperation & Communication International
3. Click on to check the map
3.6 Javascript Include
GeoNURIS WebGIS Tutorial22
© 2011 Cooperation & Communication International
Add ./lib/OpenLayers.js to the root folder of OpenLayers folder downloaded to write
service.
<html>
<head>
<title>OpenLayers Example</title>
<script src="http://openlayers.org/api/OpenLayers.js"></script>
</head>
<body>
<div style="w idth:100%; height:100%" id="map"></div>
<body>
</html>
1. Create a map instance.
var map = new OpenLayers.Map('map');
2. Create a layer and call WMS service.
Var baseLayer = new OpenLayers.Layer.WMS('기본맵 ','http://localhost:8880/geonuris/w ms?GDX=sampleMap.xml&',
{ layers: 'ROOT',
transparent: 'false',
bgcolor: '0xffff f f ',
exceptions: 'BLANK',
text_anti: 'true',
anti: 'true',
label: 'HIDE_OVERLAP',
graphic_buffer: '64'}, {
isBaseLayer: true, buffer:0, singleTile: false,opacity: 0.8
}
);
Service URL : 'http://localhost:8880/geonuris/wms?GDX=sampleMap.xml
Check Map Service
Call Example.xml to explorer and check.
© 2011 Cooperation & Communication International
GeoNURIS WebGIS Tutorial
© 2011 Cooperation & Communication International
Part
IV
© 2011 Cooperation & Communication International
4 Dynamic Cache Service to improve performance
4.1 Set Cache
1. Connect to Admin Page ( URL : http://localhost:8880/geonuris)
2. Create cache key
Click on Cache Create from Cache manage in the image below.
Click on Create a New Cache in the image below to create a cache key.
GeoNURIS WebGIS Tutorial26
© 2011 Cooperation & Communication International
Enter the condition for cache at the bottom of the screen to create a cache key.
3. Enter conditions to create a cache key
The followings can be specified.
Items Values Descriptions
GDX sampleMap.xml Name of GDX using
Cache Key sampleMap_cacheke
y
Name of Cache Key to be created이
Cache Path C:\CacaheData Path to save cache data
Layers ROOT All layers set to GDX
CRS EPSG:4326 Coordinate Reference System
Unit Degrees Unit of coordinate system
Max Extent -180.0, -90.0, 180, 83 Maximum extent of map
Max Resolution 0.7 Resolution for maximum scale
Zoom Level 14 Number of Scale Level
Tile Width 512 pixel size of width of Cache Image
Tile Height 512 pixel size of height of Cache Image
Backgroud Color 0xFFFFFF Background color of Cache Image
© 2011 Cooperation & Communication International
Antialiasing false Apply Antialiasing to outer lines or
not.
TextAntialiasing true Apply Antialiasing to texts or not.
Transparent false Transparentize Cache Image
Backgroud Color or not
Graphic Buffer 64 Buffer to prevent omitting texts at the
adjacent tiles
Label Policy Hide Overlap : Allow to overlap texts
Label Repeat LABEL_NOREPEAT Repeat labels in case of Line type or
nor
Label Display
Gap
100 The gap when repetitively using text
at Line Type. For example, when
indicating the name of river
Image Format Image/png (default) Cache Image Type to create
4.2 How to Call Service using Cache
Change URL in chapter ‘2.4.3 Create layers and Call WMS service to the value below
http://localhost:8880/geonuris/wms?GDX=sampleMap.xml&Cache_Key=
sampleMap_cachekey
GeoNURIS WebGIS Tutorial
© 2011 Cooperation & Communication International
Part
V
© 2011 Cooperation & Communication International
5 Map Service using Dynamic SLD
The style information which is initially set is dynamically applied depending on the
conditions specified by applications.
5.1 Apply Dynamic Style
Initial Screen
Screen after applied
GeoNURIS WebGIS Tutorial30
© 2011 Cooperation & Communication International
1. How to apply dynamic style
By applying dynamic style, use the URL of the style setting file which you want to
apply when calling WMS.
Ex)http://localhost:8881/geonuris/wms?GDX=sampleMap.xml&SLD=http%3A%2F%
2Flocalhost%3A8881%2Fgeonuris%2Fcontinents.xml&',
© 2011 Cooperation & Communication International
2. How to call OpenLayer
userLayer = new OpenLayers.Layer.WMS(
'sld change', 'http://localhost:8881/geonuris/w ms?GDX=sampleMap.xml&SLD=http%3A%2F%2Flocalhost%3A8881%2Fgeonuris%2Fcontinents.xml&',
{
layers: 'NURIS.CITIES,NURIS.RIVERS,NURIS.CONTINENTS',
transparent: 'true',
bgcolor: '0xffff f f ',
exceptions: 'BLANK',
label: 'HIDE_OVERLAP',
graphic_buffer: '64'
}, {
isBaseLayer: false, buffer:1, singleTile: false,
opacity: 0.7
}
);
Call URL
When calling URL, add SLD parameters.
Write the targeted layer lists in the part of 'Layers' parameter.