11 views

Uploaded by Ibraheem Khan

save

You are on page 1of 13

Overview of GDAL and NumPy Where to use these instead of ArcGIS, Imagine, etc. Description of a real-world application Step through two examples Mess around with NumPy functionality How to install the environment using Python 2.4

JPEG. Can handle many image formats for read and slightly fewer for write: AI Grid. etc. GeoTiff. PNG. Google Earth. UMN MapServer.2. ArcGIS 9.GDAL (Geospatial Data Abstraction Library) GDAL is a “translator library for raster geospatial data formats” Open source Used in many applications: GRASS. Imagine. NetCDF. . etc.

VB. Java … Early developers have chosen Python as their scripting language and documentation is relatively good for this. R. C#. Perl. .GDAL (Geospatial Data Abstraction Library) Presents an “abstract data model” for processing spatial data Can be used directly from C/C++ and can be “wrapped” for use with Python.

type conversions.e. etc. mathematical.NumPy (Numerical Python) An array/matrix package for Python Well suited for image processing – i. one function can operate on the entire array Slicing by dimensions and applying functions to these slices is concise and straightforward Nearly 400 methods defined for use with NumPy arrays (e. logical.g.) .

GDAL and NumPy Since GDAL 1. GDAL has implemented NG (New Generation) Python bindings which includes NumPy Process: Get raster band(s) Convert the raster band(s) to a NumPy array using ReadAsArray() Process the raster band(s) using NumPy functionality Open GDALDataset Write out GDALDataset Convert the NumPy array to GDAL raster bands using WriteAsArray() .3(?).

etc.Why use GDAL/NumPy instead of canned GIS software? Not advisable if what you want to do is easily handled within ArcGIS/Imagine/etc.) . – there is a lot of programming overhead Well suited for process model applications where the logic at a cell based is too complex Example: Grid algebra : grid1 + grid2 (probably use GIS) Finding NN in multidimensional space (maybe use GDAL/Numpy) Also useful if your spatial data is NOT standard GIS formats (JPEG. PNG.

PNG and is easiest to ingest as unsigned 8.A real-world application GNNViz – Translate the Gradient Nearest Neighbor (GNN) model into a rendered 3-D environment Game uses standard imagery such as JPEG.or 16-bit images .

projection.or 16-bit image where: No data : 0 Clipped window minimum : 1 Clipped window maximum : 255 Also needed to maintain metadata about spatial location. content . original Z values.A real-world application Problem: Clip and convert spatial data (in any format) to an unsigned 8.

A real-world application (design) Class design: Superclasses class Header Subclass class Viz8BitImage class SpatialReference class VizImage class Viz16BitImage class ValueReference .

“python extractor.bat Run the GnnViz example: Cd to gnnviz (i. “cd gnnviz”) Run the example (i.py”) .Step through Copy the folder “geoprogramming” from T:\commons\matt.gregory to C:\temp Open a CMD shell (Start->Run->Type “cmd”) CD to C:\temp\geoprogramming Run setenv.e.e.

b.reshape(2.min().shape(b) c = numpy. numpy.3) print c. a-b. b.3]) b = numpy.NumPy examples import numpy a = numpy. a.array([4.shape(a).append(a.6]) print a+b.array([1.max().b) d = c. a*b.min().5. a/b print a.2.max() print numpy. d Go nuts … .

org and http://trac.scipy.org/gdal/ Listserve: gdal-dev@lists.osgeo.scipy.org/Tentative_NumPy_Tutorial Numpy Example List: http://www.scipy.org/Download Numpy tutorial (not complete): http://www.org Numpy homepage: http://numpy.scipy.org/ Numpy download: http://www.maptools.org/Numpy_Example_List_With_Doc NumPy .Resources GDAL: www.gdal.

edu/gregorym/mediawiki/index. Incomplete docs at: Easier to install Numpy and GDAL binaries into your site-packages Python folder http://sandbox.fsl.4 Copy T:\commons\matt.orst.gregory\install into C:\Python24\Lib\site-packages Set environmental variables: set PATH=%PATH%:C:\Python24\Lib\site-packages\gdal set PYTHONPATH=%PYTHONPATH%:C:\Python24\Lib\sitepackages\gdal .Building the Environment Somewhat painful.php/Installing_GDAL-Python24-Numpy Install Numpy for Python 2.

- Python Programming (Part 1)Uploaded byRana Rahman Khan
- Export PDF Plot rUploaded byTiffany
- Cyient to establish a state-of-the-art technology development center in Warangal [Company Update]Uploaded byShyam Sunder
- Princple of GeoinformaticsUploaded bysumanpunia
- Advanced GIS FunctionsUploaded byIni Chitoz
- SOLID WASTE MANAGEMENT SYSTEMUploaded byIJIERT-International Journal of Innovations in Engineering Research and Technology
- pyalgo_excerpt.pdfUploaded byRajesh Kumar Subramani
- Bp Water ResourcesUploaded byRazi Baig
- UniL ArcGIS Carto Geomorpho Informations Et BibliographieUploaded byCuitla
- Geospatial Developer ManualUploaded byMathias Eder
- HOUSE HEARING, 113TH CONGRESS - H.R. 1604, MAP IT ONCE, USE IT MANY TIMES ACT AND H.R. 916, FEDERAL LAND ASSET INVENTORY REFORM ACT OF 2013Uploaded byScribd Government Docs
- The Impact of Water and Soil Electrical Conductivity and Calcium Carbonate on Wheat Crop Using a Combination of Fuzzy Inference System and GisUploaded byIJSTR Research Publication
- Python Console Application Development 2Uploaded byDishant Shukla
- Data Integration within Public Property Management SystemsUploaded byIsgude Gude
- A Comparison of Programming Languages in Economics.pdfUploaded byAli Asadullah Baig
- Knowledge Translation TOOLSUploaded byJahnavi Nakka
- project proposal uasUploaded byapi-249321040
- project proposal uasUploaded byapi-252194257

- SQLUploaded byEmerson Novais
- Unidad 1 Auditoria.Uploaded byLarisa Nava Ome
- AP7-AA7.1-Ev1-Ejercicios de Programación Con Estructuras de Datos en JavaUploaded byanon_621630572
- Vision ArtificialUploaded byYeimmy Paola Camargo Useche
- 06-Roots of EquationsUploaded byMark Anthony Caro
- Durable Ideas in Software Engineering Concepts, Methods and AppUploaded byAndrés López
- Vb80ugUploaded byGurbinder Singh
- Stack C++Uploaded byAida Raihanah
- ALC MODELLING Programming MethodsUploaded byluis_inagaki
- ORTHOPLAN_OUT.docxUploaded byTianyi Li
- 04.02.ActivityUploaded byKhanh Le Minh
- 14m2Uploaded byAlfonsoCuevas
- AlgoritmosUploaded byalexsoares17
- Programming in C- SCS8C11Uploaded byUdaya Kumar
- Historico Normal y Detallado FinalUploaded byCristhian Gabriel Zapata Lopez
- Calculadora de Resistencias PROYECTO MATEUploaded byDamian Raul Núñez
- Metaprogramming RubyUploaded byOleksiy Kovyrin
- JSTL Core TagsUploaded bygovindbirajdar
- Array ConceptUploaded bydaibalme2515
- Lec-03,4,5,6-CBSEUploaded byshoukatsardar
- 187604351 Ge6151 Computer ProgrammingUploaded bydgk84_id
- 1.1 Fill in the Blanks in Each of the Following:Uploaded byMuhammad Mahadi Hasan
- Sap Sd PricingUploaded byjeevan
- Questions and AnswersUploaded byChithra Antony
- Using the AT89C2051 MCU as Virtual MachineUploaded byplcmana
- DW_OLAP_2Uploaded byMartin Elf
- ReportUploaded byShreeprabha Aggarwal
- JAVA4Uploaded bymonaminakshi
- matlab-1Uploaded bysiker
- Simulink_Pixhawk_Support_v2.1.pdfUploaded byPatoSanchez