官术网_书友最值得收藏!

Introduction

Vector data is probably the main source of spatial information that is used inside GeoServer to build maps. You may use the data both to render maps on the server side, that is, using the Web Map Service (WMS) standard, or have the client get the shapes and manipulate or render them in a map, that is, using the Web Feature Service (WFS) standard.

In this chapter, we will use both these standards, and we will focus on how to filter data and optimize configuration for better performance. We assume that you're already comfortable with the standard WMS and WFS requests and you know how to configure a data store and a layer with the GeoServer web interface.

The recipes in this chapter use a few datasets. Configuring and publishing them is quite easy, so we are not covering these steps in detail. We will use publicly available data from NASA Earth Observatory ( (http://www.naturalearthdata.com). Configuration and publication of datasets is straightforward, and hence not covered in detail.

You should download the Blue Marble dataset from NASA Earth Observatory. In the home page, you can find it by navigating to the LAND section. Use the GeoTiff format with 0.1 degrees resolution to match the exercises provided in this book. You should publish this dataset as NaturalEarth:blueMarble for use with exercises that require a map that looks like the one in this book.

You also need a couple of datasets from Natural Earth: the datasets for countries and populated places in the 1:10,000,000 scale. Go to http://www.naturalearthdata.com/downloads/10m-cultural-vectors/ and download the datasets for countries and populated places in the shapefile format. Publish the countries' data as NaturalEarth:countries.

We will be using the populated places dataset to create a SQL view. To be able to create it, you should load the data in a spatial RDBMS. Our choice is PostGIS, as it is a very good option; it is powerful, easy to deploy, and free.

Tip

We won't cover how to install and configure a PostGIS installation. In fact, PostGIS is not an RDBMS, but a spatial plugin for PostgreSQL. So, you should first install the latter and then add the former. If this sounds new and somehow complicated for you, there are a lot of nice guides on the Internet that you can use for a quick start.

The procedure to install on Linux can be found at:

http://trac.osgeo.org/postgis/wiki/UsersWikiInstall

For Windows, a good choice is downloading the binary packaged by Enterprise DB:

http://www.enterprisedb.com/products-services-training/pgdownload#windows

主站蜘蛛池模板: 永清县| 荆门市| 黄大仙区| 赤壁市| 阿坝县| 龙泉市| 乐亭县| 民乐县| 竹溪县| 白山市| 勃利县| 黔东| 遵义县| 南漳县| 芷江| 滨州市| 瑞金市| 河津市| 永丰县| 武宣县| 浮山县| 峡江县| 上犹县| 顺昌县| 高碑店市| 余干县| 桃源县| 剑河县| 荔波县| 日土县| 和硕县| 那坡县| 吴忠市| 巴青县| 米易县| 黄石市| 文成县| 松阳县| 富蕴县| 茂名市| 芦山县|