Matthew Perry

Results 99 comments of Matthew Perry

Like Python's [`open`](https://docs.python.org/2/library/functions.html#open) function, would it be possible to add an optional `buffer` kwarg that would allow an explicit configurable buffer size in addition to manual flush?

Looks like the buffer size can be controlled by the [`GDAL_CACHEMAX` config option](https://trac.osgeo.org/gdal/wiki/ConfigOptions#GDAL_CACHEMAX). Setting it to 100k (the lowest allowable value it appears) causes very frequent disk writes: ![image](https://user-images.githubusercontent.com/1151287/36397221-b893e71c-15e7-11e8-8c86-c49b41113eb0.png) Setting...

untested ``` try: import http.client as httplib except ImportError: import httplib def connected(host="www.example.com"): conn = httplib.HTTPConnection(host) try: conn.request("HEAD", "/") return True except: return False ```

I ran into several problems like this recently but with JPEG-in-TIFF (`--co compress=JPEG`) Specifically: - If you have `photometric=ycbcr` - only 3-band rasters are supported - `interleave` must be pixel...

@brendan-ward The case you listed above is just warnings and GDAL seems to recover from it. But there are some combinations of configuration options that cause fatal errors or worse,...

I'm going to defer this until post-1.0 because a) we don't really have a good plan on how to address it and b) the proposed solutions don't change the python...

I've been testing locally and this works great. This unblocks a whole bunch of testing I need to do! Thanks @jp-dark I'm using the code below to create a geometry...

@sgoodm that's a great point, the current `io.py` is generally pretty terrible at handling edge cases. Since it uses exceptions as control flow, uncaught exceptions slip through and present themselves...

@sdtaylor that's a great result! By constraining the problem a bit, you've found some solid speedups here. I have some technical questions about the benchmarks, and some thoughts on including...

Initial testing ## Setup * Uint16 tif, 25235x25944, tiled ([source](https://www.sciencebase.gov/catalog/item/542aebf9e4b057766eed286a)) * shapefile with 11 multipolygons, fully covering the valid tif values. ([source]( https://www.naturalearthdata.com/downloads/10m-cultural-vectors/10m-admin-1-states-provinces/)) ## Results (basic stats) ```python zonal_stats(polygon, raster,...