万本电子书0元读

万本电子书0元读

顶部广告

Python Geospatial Development, Second Edition电子书

售       价:¥

1人正在读 | 0人评论 9.8

作       者:Erik Westra

出  版  社:Packt Publishing

出版时间:2013-05-24

字       数:682.7万

所属分类: 进口书 > 外文原版书 > 电脑/网络

温馨提示:数字商品不支持退换货,不提供源文件,不支持导出打印

为你推荐

  • 读书简介
  • 目录
  • 累计评论(0条)
  • 读书简介
  • 目录
  • 累计评论(0条)
This is a tutorial style book that will teach usage of Python tools for GIS using simple practical examples and then show you how to build a complete mapping application from scratch. The book assumes basic knowledge of Python. No knowledge of Open Source GIS is required.Experienced Python developers who want to learn about geospatial concepts, work with geospatial data, solve spatial problems, and build map-based applications.This book will be useful those who want to get up to speed with Open Source GIS in order to build GIS applications or integrate Geo-Spatial features into their existing applications.
目录展开

Python Geospatial Development

Table of Contents

Python Geospatial Development

Credits

About the Author

About the Reviewers

www.PacktPub.com

Support files, eBooks, discount offers and more

Why Subscribe?

Free Access for Packt account holders

Preface

What this book covers

What you need for this book

Who this book is for

Conventions

Reader feedback

Customer support

Downloading the example code

Errata

Piracy

Questions

1. Geospatial Development Using Python

Python

Geospatial development

Applications of geospatial development

Analyzing geospatial data

Visualizing geospatial data

Creating a geospatial mash-up

Recent developments

Summary

2. GIS

Core GIS concepts

Location

Distance

Units

Projections

Cylindrical projections

Conic projections

Azimuthal projections

The nature of map projections

Coordinate systems

Datums

Shapes

GIS data formats

Working with GIS data manually

Summary

3. Python Libraries for Geospatial Development

Reading and writing geospatial data

GDAL/OGR

GDAL design

GDAL example code

OGR design

OGR example code

Documentation

Availability

Dealing with projections

pyproj

Design

Proj

Geod

Example code

Documentation

Availability

Analyzing and manipulating geospatial data

Shapely

Design

Example code

Documentation

Availability

Visualizing geospatial data

Mapnik

Design

Example code

Documentation

Availability

Summary

4. Sources of Geospatial Data

Sources of geospatial data in vector format

OpenStreetMap

Data format

Obtaining and using OpenStreetMap data

The OpenStreetMap API

Planet.osm

Mirror sites and extracts

Working with OpenStreetMap data

TIGER

Data format

Obtaining and using TIGER data

Natural Earth

Data format

Obtaining and using Natural Earth vector data

Global, self-consistent, hierarchical, high-resolution shoreline database (GSHHS)

Data format

Obtaining the GSHHS database

World Borders Dataset

Data format

Obtaining World Borders Dataset

Sources of geospatial data in raster format

Landsat

Data format

Obtaining Landsat imagery

Natural Earth

Data format

Obtaining and using Natural Earth raster data

Global Land One-kilometer Base Elevation (GLOBE)

Data format

Obtaining and using GLOBE data

National Elevation Dataset (NED)

Data format

Obtaining and using NED data

Sources of other types of geospatial data

GEOnet Names Server

Data format

Obtaining and using GEOnet Names Server data

Geographic Names Information System (GNIS)

Data format

Obtaining and using GNIS Data

Choosing your geospatial data source

Summary

5. Working with Geospatial Data in Python

Pre-requisites

Reading and writing geospatial data

Task – calculate the bounding box for each country in the world

Task – save the country bounding boxes into a shapefile

Task – analyze height data using a digital elevation map

Changing datums and projections

Task – change projections to combine shapefiles using geographic and UTM coordinates

Task – change datums to allow older and newer TIGER data to be combined

Representing and storing geospatial data

Task – define the border between Thailand and Myanmar

Task – save geometries into a text file

Performing geospatial calculations

Task – identify parks in or near urban areas

Converting and standardizing units of geometry and distance

Task – calculate the length of the Thai-Myanmar border

Task – find a point 132.7 kilometers west of Soshone, California

Exercises

Summary

6. GIS in the Database

Spatially-enabled databases

Spatial indexes

Open source spatially-enabled databases

MySQL

PostGIS

Installing and configuring PostGIS

Using PostGIS

Documentation

Advanced PostGIS features

SpatiaLite

Installing SpatiaLite

Installing pysqlite

Accessing SpatiaLite from Python

Documentation

Using SpatiaLite

SpatiaLite capabilities

Commercial Spatially-enabled databases

Oracle

MS SQL Server

Recommended best practices

Using the database to keep track of spatial references

Using the appropriate spatial reference for your data

Option 1 – using a database that supports geographies

Option 2 – transforming features as required

Option 3 – transforming features from the outset

When to use unprojected coordinates

Avoiding on-the-fly transformations within a query

Don't create geometries within a query

Using spatial indexes appropriately

Knowing the limits of your database's query optimizer

MySQL

PostGIS

SpatiaLite

Working with geospatial databases using python

Prerequisites

Working with MySQL

Working with PostGIS

Working with SpatiaLite

Comparing the databases

Summary

7. Working with Spatial Data

About DISTAL

Designing and building the database

Downloading the data

World Borders Dataset

GSHHS

GNIS

GEOnet Names Server

Importing the data

World Borders Dataset

GSHHS

US place name data

Worldwide place name data

Implementing the DISTAL application

The shared "database" module

The "select country" script

The "select area" script

Calculating the bounding box

Calculating the map's dimensions

Setting up the data source

Rendering the map image

The "show results" script

Identifying the clicked-on point

Identifying features by distance

Calculating distances manually

Using angular distances

Using projected coordinates

A hybrid approach

Displaying the results

Application review and improvements

Usability

Quality

Place name issues

Lat/Long coordinate problems

Performance

Finding the problem

Improving performance

Calculating the tiled shorelines

Using tiled shorelines

Analyzing the performance improvement

Summary

8. Using Python and Mapnik to Generate Maps

Introducing Mapnik

Creating an example map

Mapnik in depth

Data sources

Shapefile

PostGIS

Gdal

Ogr

SQLite

OSM

MemoryDatasource

Rules, filters, and styles

Filters

Scale denominators

"Else" rules

"Also" rules

Symbolizers

Drawing lines

LineSymbolizer

Line color

Line width

Opacity

Line caps

Line joins

Dashed and dotted lines

Drawing roads and other complex linear features

LinePatternSymbolizer

Drawing polygons

PolygonSymbolizer

Fill color

Opacity

Gamma correction

PolygonPatternSymbolizer

Drawing labels

TextSymbolizer

Specifying the text to be displayed

Selecting a suitable font

Drawing semi-transparent text

Controlling text placement

Repeating labels

Controlling text overlap

Drawing text on a dark background

Adjusting the position of the text

Splitting labels across multiple lines

Controlling character and line spacing

Controlling capitalization

Advanced text placement and formatting

Drawing points

PointSymbolizer

ShieldSymbolizer

Drawing raster images

Using colors

Maps and layers

Map attributes and methods

Layer attributes and methods

Map rendering

MapGenerator revisited

The MapGenerator interface

Creating the main map layer

Displaying points on the map

Rendering the map

What the map generator teaches us

Map definition files

Summary

9. Putting It All Together – a Complete Mapping System

About ShapeEditor

Designing ShapeEditor

Importing a shapefile

Selecting a feature

Editing a feature

Exporting a shapefile

Prerequisites

The structure of a Django application

Models

Views

URL dispatching

Templates

Setting up the database

Setting up the ShapeEditor project

Defining the ShapeEditor's applications

Creating the shared application

Defining the data models

Shapefile

Attribute

Feature

AttributeValue

The models.py file

Playing with the admin system

Summary

10. ShapeEditor – Implementing List View, Import, and Export

Implementing the "list shapefiles" view

Importing shapefiles

The "import shapefile" view function

Extracting the uploaded shapefile

Importing the shapefile's contents

Open the shapefile

Add the Shapefile object to the database

Define the shapefile's attributes

Store the shapefile's features

Store the shapefile's attributes

Cleaning up

Exporting shapefiles

Defining the OGR shapefile

Saving the features into the shapefile

Saving the attributes into the shapefile

Compressing the shapefile

Deleting temporary files

Returning the ZIP archive to the user

Summary

11. ShapeEditor – Selecting and Editing Features

Selecting a feature to edit

Implementing Tile Map Server

Setting up the base map

Tile rendering

Parsing the query parameters

Setting up the map

Defining the base layer

Defining the feature layer

Rendering the map tile

Completing the Tile Map Server

Using OpenLayers to display the map

Intercepting mouse clicks

Implementing the find feature view

Editing features

Adding features

Deleting features

Deleting shapefiles

Using ShapeEditor

Further improvements and enhancements

Summary

Index

累计评论(0条) 0个书友正在讨论这本书 发表评论

发表评论

发表评论,分享你的想法吧!

买过这本书的人还买过

读了这本书的人还在读

回顶部