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

Summary

In this chapter, we looked at a number of important libraries for developing geospatial applications using Python. We learned the following:

  • GDAL is a C++ library for reading (and sometimes writing) raster-based geospatial data.
  • OGR is a C++ library for reading (and sometimes writing) vector-based geospatial data.
  • GDAL and OGR include Python bindings that are easy to use, and support a large number of data formats.
  • The PROJ.4 library, and its Pythonic pyproj wrapper, allow you to convert between geographic coordinates (points on the Earth's surface) and cartographic coordinates (x,y coordinates on a two-dimensional plane) using any desired map projection and ellipsoid.
  • The pyproj Geod class allows you to perform various geodetic calculations based on points on the Earth's surface, a given distance, and a given angle (azimuth).
  • A geospatial data manipulation library called the Java Topology Suite was originally developed for Java. This was then rewritten in C++ under the name GEOS, and there is now a Python interface to GEOS called Shapely.
  • Shapely makes it easy to represent geospatial data in the form of Points, LineStrings, LinearRings, Polygons, MultiPoints, MultiLineStrings, MultiPolygons, and GeometryCollections.
  • As well as representing geospatial data, these classes allow you to perform a variety of geospatial calculations.
  • Mapnik is a tool for producing good-looking maps based on geospatial data.
  • Mapnik can use an XML stylesheet to control the elements that appear on the map, and how they are formatted. Styles can also be created by hand if you prefer.
  • Each Mapnik style has a list of Rules which are used to identify features to draw onto the map.
  • Each Mapnik rule has a list of Symbolizers that control how the selected features are drawn.

While these tools are very powerful, you can't do anything with them until you have some geospatial data to work with. Unless you are lucky enough to have access to your own source of data, or are willing to pay large sums to purchase data commercially, your only choice is to make use of the geospatial data which is freely available on the Internet. These freely-available sources of geospatial data are the topic of the next chapter.

主站蜘蛛池模板: 蓝山县| 翁源县| 商城县| 儋州市| 基隆市| 建瓯市| 雷波县| 陕西省| 印江| 镇江市| 全南县| 盘锦市| 庐江县| 乌拉特中旗| 浦江县| 高尔夫| 元朗区| 马关县| 六盘水市| 察哈| 永川市| 渑池县| 休宁县| 巴彦县| 洞口县| 友谊县| 杭锦后旗| 武功县| 光山县| 甘肃省| 益阳市| 鄯善县| 来安县| 京山县| 维西| 宁国市| 施甸县| 聂荣县| 玉屏| 本溪市| 绥化市|