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

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

主站蜘蛛池模板: 兴安盟| 星座| 和田市| 克什克腾旗| 清远市| 孟津县| 无极县| 葫芦岛市| 门源| 云霄县| 呼伦贝尔市| 温泉县| 芜湖县| 邯郸市| 聂拉木县| 英山县| 阿巴嘎旗| 汝南县| 和龙市| 同心县| 博野县| 罗田县| 日土县| 阿克陶县| 垫江县| 金川县| 万安县| 安仁县| 贞丰县| 福贡县| 扎囊县| 永德县| 沿河| 青海省| 韩城市| 沙坪坝区| 泽库县| 偏关县| 长汀县| 丰宁| 玉溪市|