- GeoServer Cookbook
- Stefano Iacovella
- 412字
- 2021-08-05 17:09:54
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
- 自然語言處理實戰:預訓練模型應用及其產品化
- 深入淺出Java虛擬機:JVM原理與實戰
- C++ 從入門到項目實踐(超值版)
- Learning DHTMLX Suite UI
- 計算機應用基礎實踐教程
- Mastering React
- Internet of Things with ESP8266
- C++20高級編程
- Spring MVC+MyBatis開發從入門到項目實踐(超值版)
- 微課學人工智能Python編程
- 進入IT企業必讀的324個Java面試題
- Sitecore Cookbook for Developers
- Python Geospatial Analysis Cookbook
- VB語言程序設計實驗教程
- 軟件方法(上):業務建模和需求(第2版)