资源说明:Preface 1
Chapter 1: GIS Fundamentals 7
What is GIS about? 7
The foundation of any GIS – spatial data 8
Measuring the world 9
Projecting a sphere on a plane 10
Understanding coordinate systems 12
Commonly used coordinate systems 12
Universal Transverse Mercator system 12
Web Mercator 13
Spatial Reference Identifier (SRID) 13
Representing geometrical shapes 14
Modeling the real world with raster data 16
Representing the world 17
Time for action – exploring OpenStreetMap 20
Adding more colors to your maps 23
Choropleth maps 23
Proportional maps 25
Time for action – making your thematic map 26
Summary 29
Chapter 2: Getting Started with GeoServer 31
Installing Java 32
Time for action – checking the presence of Java on Windows 32
Time for action – checking the presence of Java on Ubuntu 34
Time for action – installing JRE on Windows 35
Time for action – installing JRE on Ubuntu 36
Installing Apache Tomcat 38
Time for action – installing Apache Tomcat on Windows 38
Table of Contents
[ ii ]
Time for action – installing Apache Tomcat on Ubuntu 42
Time for action – configuring Tomcat as a service on Ubuntu 45
Installing GeoServer 48
Time for action – deploying GeoServer on Tomcat 49
Implementing basic security 51
Time for action – improving security settings 52
Summary 53
Chapter 3: Exploring the Administrative Interface 55
Understanding the interface 55
About & Status 57
Server Status 57
Locks 58
Connections 58
Memory Usage 58
JVM Version and fonts 58
JAI usage and configurations 58
Update Sequence 58
Resource Cache 59
Configuration and catalog 59
GeoServer Logs 59
Contact Information 59
About 60
Time for action – manually reloading configuration 60
Data 61
Layer Preview 61
Time for action – OpenLayers preview 62
Time for action – KML preview 63
Workspaces 64
Time for action – creating a workspace 65
Stores 66
Layers 68
Layer groups 69
Styles 69
Services 70
WMS 71
Time for action – limiting the SRS list from WMS 71
WFS 73
WCS 73
Settings 73
Global 73
Verbose Reporting 73
Enable Global Services 74
Table of Contents
[ iii ]
Proxy Base URL 74
Logging Profile 74
Log to StdOut 74
Log location 74
Time for action – changing your logging configuration 74
JAI 75
Tile Caching 76
Security 76
Settings 77
Users, Groups, and Roles 77
Data 78
Catalog security 78
Services security 79
Demos 79
Time for action – exploring Demo requests 80
SRS List 83
Time for action – filtering the projection list 83
Summary 85
Chapter 4: Accessing Layers 87
Layer types 88
OpenLayers 88
Time for action – exploring OpenLayers options 89
Working with tiles 90
Exploring the Web Map Service output formats 92
AtomPub 92
GIF 92
GeoRSS 93
JPEG 94
KML (Plain) 94
KMZ (Compressed) 94
PDF 95
PNG 95
SVG 95
TIFF 95
Web Feature Service 96
CSV 96
GML (plain text) 96
GML2 (compressed GZIP) 97
GeoJSON 97
Time for action – parsing GeoJSON 97
Shapefile 98
Table of Contents
[ iv ]
Extra output options 98
GDAL and OGR output 99
TEXT/HTML 99
Time for action – using the GetFeatureInfo freemarker template 99
Using WMS Reflector 101
Time for action – using WMS Reflector 102
Summary 103
Chapter 5: Adding Your Data 105
Configuring your data 105
Configuring vector data sources 106
Adding a properties file 106
Configuring an external Web Feature Service 107
Adding shapefiles 107
Time for action – adding shapefiles 107
Using PostGIS 110
Time for action – installing PostgreSQL and PostGIS 110
Time for action – loading data in PostGIS and publishing them in GeoServer 116
Configuring raster data sources 120
ArcGrid 120
GeoTiff 120
Gtopo30 121
ImageMosaic 121
WorldImage 121
Configuring an external Web Map Service 121
Exploring additional data sources 122
Using Oracle 122
Time for action – adding Oracle support in GeoServer 122
Using MySQL 123
Time for action – adding MySQL data source 124
Summary 126
Chapter 6: Styling Your Layers 127
Understanding Styled Layer Descriptor 127
Editing styles 128
Exploring the standard structure of a style 129
Time for action – viewing GeoServer bundled styles 130
Loading data for styling 133
Working with point symbols 134
Time for action – creating a simple point style 134
Time for action – adding a stroke value 137
Table of Contents
[ v ]
Time for action – dealing with angles and transparency 140
Time for action – composing simple shapes 141
Time for action – using external graphics 144
Linestring symbols 146
Time for action – creating a simple line style 146
Time for action – adding a border and a centerline 148
Time for action – using hatching 149
Time for action – using dashed lines 151
Time for action – mixing dashing lines and markers 153
Working with polygon symbols 155
Time for action – creating a simple polygon style 155
Time for action – using a graphic filling 157
Time for action – using hatching with polygons 158
Adding labels 160
Time for action – labeling points 161
Time for action – labeling lines 163
Time for action – labeling polygons 166
Thematic mapping 168
Time for action – classifying roads 169
Setting visibility 173
Time for action – enhancing thematic roads map 173
Putting it all together 175
Time for action – grouping layers 176
Summary 178
Chapter 7: Creating Simple Maps 179
Exploring Google Maps API 180
Time for action – adding a GeoServer layer as overlay 180
Time for action – adding a GeoServer layer as a base layer 185
Using pre-calculated maps 187
Time for action – adding a GeoServer cached layer as overlay 187
Time for action – customizing Google basemap 189
Interacting with the user 193
Time for action – intercepting the Click event 193
Using OpenLayers 196
Time for action – integrating GeoServer and OpenLayers 196
Time for action – using GeoRSS with OpenLayers 199
Exploring Leaflet 201
Time for action – using Leaflet with GeoServer layers 201
Summary 203
Table of Contents
[ vi ]
Chapter 8: Performance and Caching 205
Exploring GeoWebCache 206
Time for action – configuring GeoWebCache storage 206
Time for action – configuring Disk Quota 209
Setting caching defaults 212
Direct integration 212
WMS-C 212
TMS and WMTS 213
Default layers options 213
Default Cached Gridsets 214
Configuring gridsets 215
Time for action – creating a custom gridset 215
Configuring tile layers 218
Time for action – configuring layers and layer groups for caching 219
Time for action – using tiles with OpenLayers 221
Time for action – seeding a layer 227
Using an external GeoWebCache 231
Summary 233
Chapter 9: Automating Tasks: GeoServer REST Interface 235
Introducing REST 236
Using REST 236
Time for action – installing the Requests library 237
Managing data 238
Working with workspaces and namespaces 238
Time for action – managing workspaces 239
Using data stores 246
Time for action – managing data stores 246
Using feature types 252
Time for action – adding a new shapefile 254
Time for action – adding a PostGIS table 256
Publishing data 260
Working with styles 260
Time for action – adding a new style 260
Working with layers 261
Time for action – managing layers 262
Summary 265
Table of Contents
[ vii ]
Chapter 10: Securing GeoServer Before Production 267
Basic security settings 268
Time for action – enabling strong encryption 269
Time for action – changing the master password 270
Defining users, groups, and roles 271
User definition 272
Group definition 272
User/group services 272
Roles definition 272
Time for action – creating users and groups 272
Time for action – defining roles 276
Accessing data and services 277
Time for action – securing layers 278
Summary 284
Chapter 11: Tuning GeoServer in a Production Environment 285
Tuning Java 286
Time for action – configuring Java runtime parameters 286
Time for action – installing native JAI 288
Removing unused services 291
Time for action – disabling unused services 291
Setting a proxy 292
Time for action – configuring a proxy 293
Avoiding service faults 295
Time for action – configuring a cluster 297
Summary 303
Chapter 12: Going Further: Getting Help and Troubleshooting 305
Going beyond maps 305
Delivering vector data 306
Time for action – retrieving vector data 306
Delivering raster data 310
Time for action – retrieving raster data 310
Getting help 312
Summary 314
Appendix: Pop Quiz Answers 315
Index 319
本源码包内暂不包含可直接显示的源代码文件,请下载源码包。