Wed 11 March 2015

Filed under Blog

Tags python ogr gdal

So I re-compiled the Python GDAL packages to bump the version to 1.11.2, compile in the HDF4 tweak that we required to open more than 32 HDF files simultaneously, and make sure that GDAL works with MODIS data. There's still a glitch, which means that I have compiled the library against GEOS v3.3.3 rather than v3.4.2, but since this isn't a major issue for me at the moment, I won't bother with it at the moment.

Here's how to get things going using the Miniconda Python installation (you can also install all the other packages in Continuum's repositories, but these are the ones that we mostly use):

wget http://repo.continuum.io/miniconda/Miniconda-latest-Linux-x86_64.sh
bash ./Miniconda-latest-Linux-x86_64.sh
export PATH=/opt/anaconda/bin:$PATH
conda install numpy scipy matplotlib ipython ipython-notebook conda-build
conda install scikit-learn pandas spyder numba numexpr cython binstar
conda install -c https://conda.binstar.org/jgomezdans proj4
conda install -c https://conda.binstar.org/jgomezdans hdf4
conda install -c https://conda.binstar.org/jgomezdans gdal
conda install geos

As you can see, the last line install geos again (v3.3.3), otherwise, GDAL complains. This is a minor niggle, and I can open both netcdf and HDF files, as well as GeoTIFFs and so on.

Comment

Thu 29 January 2015

Filed under Blog

Tags python ogr gdal

Today I had the unenviable task of stitching together and reprojecting a large number of Shapefiles (yes, shapefiles are still used. Nothing has changed since 1992, I guess). The process is greatly simplified by using OGR's virtual datasets for vectors in a way that is reminiscent of how you ...

Read More

Tue 02 September 2014

Filed under Blog

Tags python gdal linux

Installing GDAL and its Python bindings on Linux is typically quite easy, provided you are using Debian or Ubuntu, as they already have packages compiled for them. The packages are compiled so as to support a large number of different file formats. However, if you are using other Linux distributions ...

Read More

Thu 13 March 2014

Filed under Blog

Tags gdal ogr geoprocessing

Sometimes, one wants to do some really simple geoprocessing on a large numbers of shapefiles. While you could definitely use Spatialite for that, I would rather avoid this. ogr2ogr, on the other hand, provides handy access to Spatialite-like functionality. Let's say you wanted to produce a text file which ...

Read More

Thu 27 June 2013

Filed under Blog

Tags MODIS GDAL tips

MODIS products are usually provided as data granules, representing the magnitude of interest (plus a number of different extra layers of metadata, quality assurance flags, etc) over a given temporal period for an area typically extending 1200 by 1200 km in the MODIS sinusoidal projection, around 10x10 degrees. Typically, your ...

Read More

EO & DA Ramblings © J Gomez-Dans Powered by Pelican and Twitter Bootstrap. Icons by Font Awesome and Font Awesome More