[Notes] "Python Geospatial Analysis Guide (2nd Edition)"

The purpose of reading this book is to record Python's tools for geospatial analysis, mainly open source things; turn it over quickly and record it

Overview section

  1. Ebola and the Ushahidi disaster system
  2. Lascaux cave, southwestern France, star map mural abstraction of things
  3. Mapping of conditions and wells during the European cholera epidemic of 1832 The distribution relationship between the two
  4. Sequence diagram of Napoleon's defeat in Russia in 1812, drawn by French engineers in 1869 Integrate the expression of timeline, line width, color, text, etc.
  5. The first GIS system - Canadian National Geographic Information System CGIS
  6. Remote sensing - long-distance detection, such as Landsat, etc.
  7. DEM - digital elevation model, such as SRTM (90m), GDEM (30m), WorldDEM (4m, asking for money), etc.
  8. CAD - computer-aided cartography, the difference from GIS cartography is the coordinates (GIS geographic coordinates)
  9. OSM - OpenStreetMap, an open source GIS crowdsourced data
  10. GIS basic concepts: thematic map, spatial database, spatial index, metadata, map projection, rendering, image data, remote sensing color
  11. GIS vector basic concepts: data structures, buffers, fusion, simplification, overlay, merge, contain, union, join, topology
  12. Basic concepts of GIS raster: band operation, change monitoring, histogram, feature extraction, supervised classification, unsupervised classification
  13. A small example is made with the turtle module, a graphics engine based on the Tkinter library

geospatial data

  1. The Internet map uses the web Mercator projection, made by Google, the original number EPSG: 900913, the official number EPSG: 3857
  2. Spatial indexing methods: quad tree, R tree
  3. Map tiles: grids and generalizations, graded images
  4. Open source vector library OGR supports 86+ vector formats, commercial FME supports 188+
  5. Shapefile format - Esri's and open standards, including .shp/.shx/.dbf|.sbn/.sbx/.prj etc.
  6. AutoCAD file formats - DXF, DWG, limited use in geospatial analysis
  7. Tag and markup formats - XML/KML/OSM/GML/GeoJSON/SVG/WKT (commonly used in prj)
  8. GeoJSON: One of the JSON formats, seamlessly integrated with Javascript, commonly used in WebGIS development
  9. Image data - ASCII text files, TIFF, regular images (JPEG/GIF/BMP/PNG, georeferenced text assistance required), complex types (NetCDF, GRIB, HDF5, for ocean, meteorology, etc.), compressed formats, etc.
  10. Point cloud data - generated by laser, radar, etc., for 3D

Geospatial Technology Overview

  1. 4 core functions implemented by geospatial software packages: data access, geometric computation, visualization, metadata tools
  2. GDAL, OGR, GEOS, PROJ.4 are the core and soul of the geospatial analysis industry commercial and open source software, all written in C/C++. In addition, let's take a look at GeoTools written in Java
    write picture description here
  3. GDAL: Geospatial data abstraction library, mainly for raster data access processing
  4. OGR: Simple Feature Library, Oriented to Vector Data Access Processing
  5. PROJ.4: for map projection
  6. CGAL: A library of computational geometry algorithms, such as polygonal straight skeleton lines
  7. JTS: Java Topology Suite, a Java-implemented Geospatial Computational Geometry Library
  8. GEOS: The open source geometry engine is the C++ version of the JTS library. The existing scripting languages ​​including Python are automatically bound to the GEOS library.
  9. PostGIS: The module of the open source relational database PostgreSQL, mostly provided by GEOS, realizes SQL query spatial data
  10. Other databases that support spatial analysis: Oracle Spatial, ArcSDE, Microsoft SQL Server, MySQL, SpatialLite
  11. Routing Analysis - Esri Network Analysis, PostGIS's open source pgRouting engine
  12. Desktop tools - QGIS, OpenEV, GRASS GIS, uDig, gvSIG, OpenJUMP, Google Earth, NASA World Wind, ArcGIS; (Domestic: Supermap, MapGIS, GeoStar, etc.)
  13. Metadata management - GeoNetwork, CatMDEdit

Python Geospatial Analysis Tools

  1. GDAL installation - source code compilation, part of larger software, installation of binary distributions
  2. Python networking library

    import urllib
    import ftplib
    import zipfile
    import tarfile
  3. Python's tag parser

    
    #历史悠久(自带)
    
    from xml.dom import minidom
    
    #元素树(自带)
    
    try:
        import xml.etree.cElementTree as ET
    except ImportError:
        import xml.etree.ElementTree as ET
    
    #专业解析HTML(等格式混乱的XML文件)
    
    from bs4 import BeautifulSoup
  4. WKT text. Note: shapely provides a set of Pythonic interfaces for GEOS

    
    #使用shapely
    
    import shapely.wkt
    
    #也可以用OGR库
    
    from osgeo import ogr
    ...
  5. Python processing json

    
    #使用json模块(自带)
    
    import json
    
    #使用geojson模块
    
    import geojson
  6. PyShp, used to read and write Shapefile files, does not support any geometric operations, only calls the Python standard library

    import shapefile
  7. dbfpy3, Python implementation, specializing in processing dbf files

    from dbfpy3 import dbf
  8. Shapely, a general-purpose geometry library, is a high-level, Python-style library for GEOS library geometry operations, avoiding file access and focusing only on geometry operations

    import shapely
  9. Finoa, provides a concise Python API for the data access function of the OGR library, the default GeoJSON format

    import finoa
  10. GDAL, handles raster data; OGR, general-purpose vector database

    from osgeo import ogr
    from osgeo import gdal
  11. NumPy, for fast processing of Python arrays, scientific computing, etc., implemented in C
  12. PIL, for image editing, implemented in C
  13. PNGCanvas, lightweight image editing implemented in Python
  14. GeoPandas, a geospatial extension to Pandas built from Shapely, Fiona, PyProj, matplotlib, Descartes, and other must-have libraries, with database support
  15. PyMySQL, provides a complete set of APIs implemented in Python to implement MySQL's spatial data support
  16. PyFPDF, written in Python, handles PDF files
  17. Spectral Python, SPy, Python spectral function package, handles remote sensing applications, especially hyperspectral

Python and GIS

  1. Distance from both sides: plane (Pythagorean), spherical (haversine), ellipsoid (Vincenty formula)
  2. Orientation calculation
  3. Coordinate transformation
  4. reprojection
  5. Shapefile editing
  6. Inquire
  7. visualization
  8. Spreadsheets
  9. GPS data
  10. Geocoding (geocoder-Google Maps, geopy-OSM)

Python and Remote Sensing

Omitted, mainly GDAL and PIL, PNGCanvas; examples include image band transformation, image histogram creation, image classification, image feature extraction, change monitoring applications

Python with elevation data

  1. ASCII grid elevation files: gdal, numpy
  2. Shaded relief map: linecache, numpy
  3. Create contour lines: gdal
  4. LIDAE data meshing: laspy, PIL; voronoi creates Delaunay triangulation

Python Geospatial Advanced Modeling

This chapter is a few examples that illustrate the problem solving process
Examples : a crop health map, a flood inundation model, a shaded map, a terrain path map, a street path map, a map with photos Geo-connected shapefiles

Real-time data

  1. The moment a map is made, it is out of date
  2. API for real-time traffic conditions
  3. Weather Tracker, Iowa State University's Mesonet platform provides free, real-time weather data applications
  4. NOAA provides a set of WMS interfaces to access OSM
  5. SRTM.py provides DEM download

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325342345&siteId=291194637