Home > Uncategorized > Geoserver: Adding shapefiles stores and layers

Geoserver: Adding shapefiles stores and layers

I have had the opportunity to have a closer look at Geoserver for the last two days. Geoserver is, citing from geoserver.org:

GeoServer is an open source server for sharing geospatial data

I decided to start out by adding the country dataset from natural earth and to publish it as a wms layer. It is provided for three different levels of details:

Download the data and extract it.

ne_folder_structure

Start geoserver from the start menu.

geoserver-start

Open a browser and surf to http://localhost:8080/geoserver/web if you used the default port. This should bring up the login page.

geoserver-login

Login as admin/geoserver. All the tools needed for data configuration and visualization definition is available in the tools menu to the left.

geoserver-tools

The first thing we need to to is to create a work space. Enter test as name and test as namespace uri. Next, we add on store for each level of detail, which each contains one single shapefile.

geoserver-shapestore

The most important parameters are the location and the character encoding (which is windows 1252 for the natural earth dataset according to the documentation).

geoserver-datalocation

Once the store is save, geoserver suggests to publish a layer. Press publish to create it. A few things needs to be set for the layers to work properly:

  • Declared srs needs to be set to EPSG:4326
  • Bounding boxes must be computed (using the Compute from data and Compute from native bounds respectively)

At this point it is possible to go to the layers preview to test the layer.

geoserver-samplemap

After adding all three layers the layers list should display something like:

geoserver-layers

Advertisements
Categories: Uncategorized
  1. No comments yet.
  1. No trackbacks yet.

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 )

Twitter picture

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

Facebook photo

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

Google+ photo

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

Connecting to %s

%d bloggers like this: