Python Geospatial Development Essentials
Packt Publishing Ltd, 17/06/2015 - 192 páginas
This book provides you with the resources to successfully develop your own GIS application in Python. The book begins by walking you through the loading and saving of data structures before you start to build the look and feel of your application and create its interactive map window. You'll then move on to managing, editing, and analyzing spatial data from within the application and finish with instructions for packaging the application for distribution.
By the end of the book, you should be able to use your GIS application as a template for further development, with the potential to expand and customize it to suit your needs.
Resultados 1-5 de 5
... of the loader module is to use. # import builtins import os # import fileformat
modules import shapefile as pyshp import pygeoj # import builtins import itertools
# import fileformats import shapefile  Accessing Geodata Loading vector files.
To deal with the shapefile format, an old but very commonly used vector file
format, we use the popular and lightweight PyShp library. To install it in the
command line just type C:/Python27/Scripts/pip install pyshp. Inside the from_file
Karim Bahgat. Next, the shapefile formats have an optional .prj file containing
projection information, so we also try to read this information if it exists, or default
to unprojected WGS84 if not. Finally, we have the function return the loaded fields
import builtins import itertools # import fileformats import shapefile as pyshp
import pygeoj # shapefile if filepath.endswith(".shp"): into nr shapewriter = pyshp.
Writer() #  Chapter 2 File format not supported Saving vector data.
For saving vector data to the shapefile format, once we have created a
shapewriter object, we first want to detect and set all the fields with the correct
value types. Instead of dealing with potential type mismatches, we just check
whether all valid ...