GEOSS Banner

4.3.1 Offering a GeoTiff dataset with Geoserver

<<Prev T.O.C Next>>


Here we are going to illustrate two particular cases in detail, the first one on how to publish a single GeoTIFF image and a second on how to publish a GeoTIFF mosaic scene with GeoServer.

 

4.3.1.1 Case 1:How to publish a single GeoTIFF image with GeoServer

4.3.1.2 Case 2:How to publish a GeoTIFF mosaic scene with GeoServer

 

Before starting up: Go to the Start>Programs> GeoServer2.1.1>Start GeoServer. A DOS window will open (and should be kept open) indicating that GeoServer has started.

Go to the GeoServer Administration link in the Start Menu (GeoServer Web Admin Page) or by pointing your web browser to http://localhost:8080/geoserver. This page is the Web administration interface, which has a Web Administration Tool used to configure all aspects of the GeoServer, and adding data to tweaking services settings.

 

image17.png

Long in on the GeoServer welcome page by navigating to the upper right hand corner to log into GeoServer. The default username and password is admin and geoserver.

 

image18.png

4.3.1.1 Case 1:How to publish a single GeoTIFF image with GeoServer

Step 1: Create a new WorkSpace

Firstly, we need to create a new WorkSpace for the GeoTiFF. The Workspace is a container used to group similar layers together. To do that, we are going to navigate to the middle left hand of the web page, and under the Data section, we click on the Workspaces text.

 

image19.png

 

To create a new workspace, click on “Add new workspace” button. You will be prompted to enter a workspace a Name and Namespace URI.

 

image20.png

A workspace name is a name describing your project and cannot exceed ten characters or contain spaces. A Namespace URI (Uniform Resource Identifier) is typically a URL associated to your project, with perhaps a different trailing identifier.

Click the “Submit” button.

If done correctly, on your workspace web page, the workspace that you have just created should be listed.

Step 2: Create a new Data Store

Now, we need to create a new Data Store.
Navigate to Data>Stores on your web administration page. A new window will open, showing a list of the data stores available.

image22.png

By clicking on “Add new store” button, you will be redirected to a list of data types GeoServer supports.

image23.png

Since we want to add a GeoTIFF layer, we are going to select the “GeoTIFF-Tagged Image File Format with Geographic Information”. On the “Add Raster Data Source” page, begin by configuring the Basic Store Info. Select from the drop down menu the workspace you have previously created, and define a data source name and a short description.

 

image24.png

Under the Connection Parameters specify the location of the GeoTIFF file:
Press “Save”. Now you will be redirected to a “New Layer” page in order to configure this new layer. If not, naviagate to the left of the screen and select Data/Layers/Add New Layer.

 

image25.png

Step 3: Layer Configuration

On the “New Layer” page, select the Layer you have just created and click “Publish”. A new page will open, and the data and publishing parameters for the layer should be configured on the Edit Layer.

 

 

image26.png

Enter a short Title and an Abstract for the new GeoTIFF layer. Fill in the form with the corresponding “Coordinate Reference Systems” – “Declared SRS”, and the EPSG code.Here you also have to define the “Bounding Boxes”, by clicking the “Compute from data” and “Compute for Native bounds”.

 

image27.png

Set the GeoTIFF style by first moving to the Publishing tab, and deselect the Style from the Default Style drop down list IMAGE (drop down list)

Finalize the data and publishing configuration by scrolling down to the bottom and clicking “Save”. Now the added layer is visible in the Layer list.

4.3.1.2 Case 2:How to publish a GeoTIFF mosaic scene with GeoServer


Before starting up: Go to the Start>Programs> GeoServer2.1.1>Start GeoServer. A DOS window will open (and should be kept open) indicating that GeoServer has started.

Go to the GeoServer Administration link in the Start Menu (GeoServer Web Admin Page) or by pointing your web browser to http://localhost:8080/geoserver. This page is the Web administration interface, which has a Web Administration Tool used to configure all aspects of the GeoServer, and adding data to tweaking services settings.

image17.png

We are going to describe the process of creating a new coverage by using the ImageMosaic plugin, which allows the creation of a mosaic from a number of georeferenced rasters. The rasters to be mosaicked need to comply with the following rules:

- All images to serve as a mosaic will be in the same Coordinate Reference System.

- All images to serve as a mosaic must share the same ColorModel and SampleModel.

- All images to serve as a mosaic must share the same spatial resolution and set of overviews, unless it is specified somehow or leave it to default.

To generate coverage with the ImageMosaic plugin the following files are needed:
- An index file to associate each image to a BBOX. At the moment just a Shapefile can be supported as an index. This will contain enclosing polygons for each raster file that conform the mosaic, as well as the path (either relative to the shapefile itself or absolute) in the “location” parameter, such a name can be configured to be different.

- A projection file (.prj) for the above-mentioned shapefile.

- A configuration file (.properties). This file contains properties such as cell size in x and y direction, the number of rasters for the ImageMosaic coverage, etc..



Both, the index Shapefile and the Configuration file can be created by the ImageMosaic plugin on the fly, avoiding the use of gdal or other similar utilities.

If you have a directory with all the images to be served as a mosaic, you just need to point GeoServer to such a directory and it will create the proper ancillary files.

Let’s explain how to configure a mosaic coverage.

Long in on the GeoServer welcome page by navigating to the upper right hand corner to log into GeoServer. The default username and password is admin and geoserver.

 

image18.png

Step 1: Create a New Workspace

Firstly, we need to create a new WorkSpace for the GeoTiFF Mosaic that we want to publish. The Workspace is a container used to group similar layers together. To do that, we are going to navigate to the middle left hand of the web page, and under the Data section, we are going to click on the Workspace text.

To create a new workspace, click on “Add new workspace” button. You will be prompted to enter a workspace a Name and Namespace URI.

image26.png


A workspace name is a name describing your project and cannot exceed ten characters or contain spaces. A Namespace URI (Uniform Resource Identifier) is typically a URL associated to your project, with perhaps a different trailing identifier.
Click the “Submit” button.

If done correctly, on your workspace web page, the workspace that you have just created should be listed.

image29.png

Step 2: Create a new Data Store and New Data Source

Now, we need to create a new Data Store.
Navigate to Data>Store on your web administration page. A new window will open, showing a list of the data stores available.

Then Add a new Store.

image22.png

 

 

Navigate to Layers on the Left of your screen, and add a new data source

image23.png

Since we want to add a GeoTIFF Mosaic, we are going to select the “ImageMosaic- Image Mosaicking plugin”. On the “New Raster Data Source” page, begin by configuring the Basic Store Info. Select from the drop down menu the workspace you have just created, and define a data source name and a short description.

image30.png


On the “Connection Parameters” the URL has to be specified, Here you have three alternatives:

1. Inserting the absolute path of the shapefile (path/Index.shp).

2. Inserting the absolute path of the directory in which the mosaic shapefile index resides, the GeoServer will look for it and make use of it (path), be aware not to have more than one .shp file on that directory.

3. Inserting the absolute path of a directory where the files you want to mosaic together reside (GeoTIFF, TIFF,…). In this case GeoServer automatically creates the needed mosaic files (.dbf, .prj, .properties, .shp and .shx) by inspecting the data of present in the given directory (GeoServer will also find the data in the subdirectories).

Some times, there has to be some manual edition to the .properties file or to the dbf.

And finally, press “Save”.

Step 3: Layer Configuration

 

image31.png

On the “New Layer” page, select the Layer you have just created and click “Publish”. A new page will open, and the data and publishing parameters for the layer should be configured.

image32.png


Enter a short Title and an Abstract for the new GeoTIFF mosaic. Fill in the form with the corresponding “Coordinate Reference Systems” – “Declared SRS”, and the EPSG code.

image33.png


Here you have also to define the “Bounding Boxes”, by clicking the “Compute from data” and “Compute for Native bounds”.

image34.png


Set the GeoTIFF Mosaic style by fist moving to the Publishing tab.

image35.png


Finalize the data and publishing configuration by scrolling down to the bottom and clicking “Save”. Now the added layer is visible in the Layer list.

image36.png


By navigating to Data/Layer Previwe and using the searching tool for the layer we just published, we will get the following window:

image37.png


To verify that the mosaic has been created and can be viewed, click the “publication” text and if working correctly a preview window should open and display the mosaic.

image38.png


Note:

When the created coverage appears in black it might be that GeoServer has not found no acceptable images in the provided ImageMosaic index. This can be explain because the shapefile index is empty (not images where found in in the provided directory) or it might be that the images’ paths in the shapefile index are not correct. If the shapefile index paths are not correct the dbf file can be opened and fixed with, for example an as OpenOffice. There is always the option to delete tha index file and let GeoServer recreate it from the root directory.

 

More information: http://docs.geoserver.org/stable/en/user/data/

 

Step 4. Testing the GeoTIFF mosaic in WCS in GeoServer

 

To test that the coverage we just published is complient with the OGC standards, we will sent a GetCapabilities request to our server:

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

If the response you get is an xml document with the characteristics of your WCS such as the illustrated bellow, it means that the server is correctly installed and validated.

 

image39.png

 

When in the xml response you search for a CoverageSummary and you find the layer you are testing, then it means that your layer is WCS.

<<Prev T.O.C Next>>

Tag
none

Files (0)

 
You must login to post a comment.