Академический Документы
Профессиональный Документы
Культура Документы
I would like to thank the PostGIS Steering Committee and everyone else who makes PostGIS such a beautiful project. A special thanks must go to the co-authors of this book: they have been brilliant mates always ready to give me suggestions and help. A mention is needed here to some geospatial minds that are great source of inspiration for me: Paul Ramsey, Sandro Santilli, Frank Warmerdam, and Even Rouault. Last, but not least, I would like to thank my wife Renata and my family for their support and patience.
Thomas J Kraft is currently a Planning Technician at Cleveland Metroparks after beginning as a GIS intern in 2011. He graduated with Honors from Cleveland State University in 2012, majoring in Environmental Science with an emphasis on GIS. When not in front of a computer, he enjoys his weekends landscaping and the outdoors in general. I'd like to thank the co-authors of this book, who are some of the most knowledgeable and motivated professionals in the field. It's truly an honor to have been involved in this process. I'd like to give special acknowledgements to Stephen Mather (also a coauthor) for introducing me to the world of open-source GIS and my girlfriend, Sandy, for keeping me on the straight and narrow.
Stephen Vincent Mather has worked in the geospatial industry for 15 years, having always had a flair for geospatial analyses in general, especially those at the intersection of Geography and Ecology. His work in open-source geospatial databases started 5 years ago with PostGIS and he immediately began using PostGIS as an analytic tool, attempting a range of innovative and sometimes bleeding-edge techniques (although he admittedly prefers the cutting edge). His geospatial career has spanned a variety of interesting and novel natural-resource projects, everything from the movement of ice sheets in Antarctica to hiking viewsheds and mobile trail applications to help park users find trails, picnic areas, and restrooms. Stephen is currently the GIS manager for Cleveland Metroparks in Cleveland, Ohio. He manages a small geospatial shop that specializes in high-end cartography, crating and generating data, geospatial web development, and analyses for natural-resource management, largely with open-source software.
Stephen is also a Mennonite technologist, aka a straw-hat hacker, interested in creating fair and open data and infrastructure for better governance and humanitarian purposes. He is heavily involved in the Cleveland Civic Hacking movement as he works with the public to help them get engaged with geospatial data. In his spare time, he builds guitars really, really slowly. Thanks go out to those who form my geospatial pedigree: Gordon Longsworth (and his advisor Ian Mcharg), Kevin Czajkowski, Karl Schneider, and Ken Jezek, as well as to the geospatial minds who inspire me, including Martin Davis. A special thanks goes to the blessings that are my two beautiful and bright children and my wife (who is equally so), all of whom exhibit endless patience and love. They are three people who both structure my life and fill its interstitial spaces with the glow of their love.
Bborie Park has been breaking (and subsequently fixing) computers for most of his life. His primary interests involve developing end-to-end pipelines for spatial datasets. He is an active contributor to the PostGIS project and is a member of the PostGIS Steering Committee. He happily resides with his wife Nicole in the San Francisco Bay Area. I would like to thank my wife Nicole, who patiently tolerated many hours, days, and weeks of my working when I should have been relaxing. I would also like to thank the PostGIS community and Steering Committee for accepting and providing feedback for my contributions to the project.
PostGIS Cookbook
How close is the nearest hospital from my children's school? Where were the property crimes in my city for the last three months? What is the shortest route from my home to my office? What route should I prescribe for my company's delivery truck so as to maximize equipment utilization and minimize fuel consumption? Where should the next fi re station should be built so as to minimize the response time? People ask these questions and others like them every day all over this planet. Answering these questions require a mechanism capable of thinking in two or more dimensions. Historically, a Desktop GIS application was used to formulate an answer for each question. This methodthough completely functionalis incapable of answering many questions at once. In addition, this method is typically unable to effectively manage and operate on massive spatial datasets, such as all of the roads of Europe for 2013 in one dataset, or allow tasks to be automated instead of significant pointing and clicking. Once scalability, support for large datasets, and a direct input mechanism are required or desired, most users explore using a spatial database. There are several spatial database software available, some proprietary and others open source. PostGIS is an open source spatial database software and is probably the most accessible of all spatial database software. PostGIS runs as an extension to provide spatial capabilities to PostgreSQL databases. In this capacity, PostGIS permits the inclusion of spatial data alongside data typically found in a database. By having all of the data together, questions such as "What is the rank of all of the police stations after taking into account the distance for each response time?" are possible. New or enhanced capabilities are possible by building upon the core functions provided by PostGIS and the inherent extensibility of PostgreSQL. PostGIS Cookbook uses a problem-solving approach to help you acquire a solid understanding of PostGIS. Hopefully, this book provides answers to some common spatial questions and gives you the inspiration and confidence to use and enhance PostGIS in finding solutions to challenging spatial problems.
Chapter 3, Working with Vector Data The Basics, introduces PostGIS operations commonly done on vectors, known as geometries and geographies in PostGIS. Operations covered include the processing of invalid geometries, determining relationships between geometries, and simplifying complex geometries. Chapter 4, Working with Vector Data Advanced Recipes, dives into advanced topics for analyzing geometries. You will learn how to make use of KNN filters to increase the performance of proximity queries, create polygons from LiDAR data, and compute Voronoi cells usable in neighborhood analyses. Chapter 5, Working with Raster Data, presents a realistic workflow for operating on rasters in PostGIS. You will learn how to import a raster, modify the raster, conduct analysis on the raster, and export the raster in standard raster formats. Chapter 6, Working with pgRouting, introduces the pgRouting extension that brings graph traversal and analysis capabilities to PostGIS. The recipes in this chapter answer the real-world questions of conditionally navigating from point A to point B and accurately modeling complex routes, such as waterways. Chapter 7, Into the Nth Dimension, covers tools and techniques used to process and analyse multi-dimensional spatial data in PostGIS, including LiDAR-sourced point cloud. Topics covered include the loading of point clouds into PostGIS, creating 2.5D and 3D geometries from point clouds, and the application of several photogrammetry principles. Chapter 8, PostGIS Programming, shows how to use the Python language to write applications that operate on and interact with PostGIS. The applications written include methods to read and write external datasets to and from PostGIS, as well as a basic geocoding engine using OpenStreetMap datasets. Chapter 9, PostGIS and the Web, presents the use of OGC and REST web services to deliver PostGIS data and services to the Web. This chapter discusses providing OGC WFS and WMS services with MapServer and GeoServer and consuming them from clients such as OpenLayers and Leaflet. It then shows how to build a web application with GeoDjango. Chapter 10, Maintenance, Optimization, and Performance Tuning, takes a step back from PostGIS and focuses on the capabilities of the PostgreSQL database server. By leveraging the tools provided by PostgreSQL, you can ensure the long-term viability of your spatial and nonspatial data and maximize the performance of various PostGIS operations. Chapter 11, Using Desktop Clients, shows how spatial data in PostGIS can be consumed and manipulated by various open source desktop GIS applications. Several applications are discussed so as to highlight the different approaches to interact with spatial data and help you find the right tool for the task.