25 Commits

Author SHA1 Message Date
Sean Gillies
c4b458bfcf Merge branch 'master' of github.com:mwtoews/rasterio into mwtoews-master
Conflicts:
	rasterio/_io.pyx
2014-06-03 11:05:28 -06:00
Sean Gillies
859b2f71e0 Make affine>=1.0 a requirement. 2014-05-28 15:43:19 -06:00
Sean Gillies
7728fda458 Add affine requirement. 2014-05-27 09:53:29 -06:00
mwtoews
b3ad562a4c Add read() to RasterReader to read bands as 3D array
* Use 'masked' argument to return masked array based on nodatavals
 * Needs more verification and unit testing to ensure it works, and
   this is open to any other addition/removal of features as this is
   a new high-level function.

Other changes in this commit:
 * Check 'window' parameter structure, and raise ValueError if not correct
 * Cython 0.21dev has difficulty compiling e.g. `set([0]).pop()`, so
   modify how 'meta' property works, for now.
 * Allocate Numpy arrays with 'empty' rather than 'zeros', since they are
   expected to be filled with values from raster.
 * setup.py: make an executable, 'find_packages' not used, and avoid
   cythonizing new files on './setup.py clean' command
2014-05-22 23:45:07 +12:00
Sean Gillies
d3d19c990a Remove rasterio.insp from setup.py 2014-05-02 15:38:09 -06:00
Sean Gillies
32b9d0e5f5 Add a GDAL error context.
Using a with statement like:

    with g_errs():
        ds = _gdal.GDALOpen('foo.tif')

On exit, the last GDAL error is converted to a Python exception.

Closes #75.
2014-04-22 22:24:06 -06:00
Sean Gillies
fc563c8f22 Deprecate rasterio.insp.
Closes #50 and #52.
2014-03-15 09:15:46 -06:00
cgohlke
1f2a719652 Fix building from sdist package on PyPI 2014-03-14 23:16:36 -07:00
Sean Gillies
04270a3c8e Add a rio_cp program suggested by @celoyd. 2014-03-14 10:39:15 -06:00
Sean Gillies
6770b70b94 Reprojection of images.
Both ndarray to ndarray and inter-dataset reprojections are
possible. TODO:

- Add the finer warping options.
- Use valid data masks when warping.
- Test data types other than uint8.
- Make warping of big datasets chunky. Though we do have the
  option of rasterio dataset windows.

Lots of improvements to be made. Much cargo, very culting. I've
still a lot to learn in the intersection of Cython, C++, and
GDAL's warping API.

Closes #12.
2014-02-23 22:50:26 -07:00
Sean Gillies
9c23e12b7e Updates for 0.5.1.
Inspector now appears as bin/rasterio.insp.
2014-02-02 10:15:43 -07:00
Sean Gillies
3898c3273b Add mask option to shapes().
This lets you exclude background pixels if you're only interested
in foreground shapes and saves a significant amount of time.

Closes #26.
2014-01-27 09:08:44 -07:00
Sean Gillies
892bf372f4 Intermediate commit, adding driver contexts (#21) 2014-01-21 10:56:28 -07:00
Sean Gillies
494b9906b2 rasterio.features.shapes() yields feature shapes (#20).
GeoJSON-ish features are excessive, so now shapes() simply yields
a geom, image_value pair. This let me delete a bunch of Cython code.
It's easy enough to make features out of these if needed.
2014-01-18 00:36:13 -07:00
Sean Gillies
29cb0b7344 Working polygonize function (#20).
TODO: tests, better examples, removal of unneeded code copied
from Fiona.
2014-01-17 01:08:09 -07:00
Sean Gillies
fd8afd6cf8 Add nodata kwarg to rasterio.open()
In 'w' mode, all bands of new files will have this nodata value set.

Closes #17.
2013-12-18 20:46:17 -07:00
Sean Gillies
d995c5e57b Document way to assert uniform block structure.
Also note changes and bump version to get ready for 0.3.
2013-12-15 11:37:09 -07:00
Sean Gillies
222200b654 Add read-only crs_wkt attribute.
Closes #10.
2013-11-26 14:17:50 -07:00
Sean Gillies
aa7b30176f Add rasterio.five and remove six dependency.
Closes #9. Thanks, @mwtoews!
2013-11-26 08:51:41 -07:00
Sean Gillies
8703afc0ac Add a _copy module with RasterCopier class.
First swing at exposing CreateCopy. Works, but creation options not
fully implemented.
2013-11-23 21:59:38 -07:00
Sean Gillies
6287816c93 Push changes and new version number. 2013-11-22 16:40:40 -07:00
Sean Gillies
46bfbbf073 Register using the long description from README.rst 2013-11-19 15:52:48 -07:00
Sean Gillies
c0f4b5b989 Exclude MANIFEST.in from sdist manifest. 2013-11-19 14:23:34 -07:00
Sean Gillies
89280eb352 Bail out of setup if Numpy isn't available.
Also add requirements files.
2013-11-19 14:12:49 -07:00
Sean Gillies
e37439668b Initial commit of rasterio package.
It reads byte type bands to numpy ubyte arrays.
2013-11-03 10:23:50 -07:00