Re: [gdal-dev] gdal_polygonize.py TIF to JSON performance

2015-01-14 Thread David Strip
I ran a test case on my Windows 7 laptop (i7, quad core (not that it matters), 2.4 GHz, 8G RAM). Input file was geotiff, 29847x33432, paletted 8-bit, 11 landcover classes. This dataset covers the city limits of Philadelphia, PA, so the polygon representing the Delaware River runs approximately from

[gdal-dev] OGRCircularString - full circle from three points

2015-01-14 Thread Martin Landa
Hi, I am working with three points which define a full circle. To describe it using OGRCircularString I would need five points defining two circular arcs, right? So in my case to compute an intermediate point for the second arc, right? Thanks for clarification! Martin -- Martin Landa http://geo

Re: [gdal-dev] WKB Representation of Raster Data

2015-01-14 Thread Mateusz Loskot
On 14 Jan 2015 19:51, "Even Rouault" wrote: > > Selon Daniel Wiesmann : > > Do you happen to know where PostGIS Raster is documented? I understand > > how it is constructed, but I had to piece it together from the source > > code and the user documentattion. > > This is documented there : > http:

Re: [gdal-dev] WKB Representation of Raster Data

2015-01-14 Thread Even Rouault
Selon Daniel Wiesmann : > Hello Everyone > > I am working on integration of Raster data into the Django web-framework > leveraging GDAL. For this I have written some GDAL C-Bindings through > ctypes in python. > > https://github.com/django/django/blob/master/django/contrib/gis/gdal/prototypes/rast

Re: [gdal-dev] Cropping a raster by a polygon - only nodata outside polygon wanted

2015-01-14 Thread Jukka Rahkonen
mathieu gmail.com> writes: > Is there a simple way to find one or several pixel value none of the bands use ? Hi, Another GDAL users just some time ago told about a workaround for a little bit similar use case. The idea is to use first gdal_calc.py and update all (0,0,0) pixels into (1,1,1).

[gdal-dev] WKB Representation of Raster Data

2015-01-14 Thread Daniel Wiesmann
Hello Everyone I am working on integration of Raster data into the Django web-framework leveraging GDAL. For this I have written some GDAL C-Bindings through ctypes in python. https://github.com/django/django/blob/master/django/contrib/gis/gdal/prototypes/raster.py For reading and storing da

Re: [gdal-dev] gdal_translate and multithreading

2015-01-14 Thread Even Rouault
Selon Pierre Soille : > > > > > > Even, > > > > thank you for your prompt reply.  To be more specific, the > successive steps of my procedure are > > > > 1] gdalwarp of a vrt file referring to 8 bands (stored as > gtiffs) of Landsat8 image from UTM into the equi

Re: [gdal-dev] gdal_translate and multithreading

2015-01-14 Thread Pierre Soille
Even, thank you for your prompt reply.  To be more specific, the successive steps of my procedure are 1] gdalwarp of a vrt file referring to 8 bands (stored as gtiffs) of Landsat8 image from UTM into the equivalent EPSG:4326 vrt file:

Re: [gdal-dev] Cropping a raster by a polygon - only nodata outside polygon wanted

2015-01-14 Thread mathieu
Ok thanks a lot for the answer! Le 14 janv. 2015 13:25, "Even Rouault-2 [via OSGeo.org]" < ml-node+s1560n5181459...@n6.nabble.com> a écrit : > Selon mathieu <[hidden email] > >: > > > Is there a simple way to find one or several pixel value no

Re: [gdal-dev] Cropping a raster by a polygon - only nodata outside polygon wanted

2015-01-14 Thread Even Rouault
Selon mathieu : > Is there a simple way to find one or several pixel value none of the bands > use ? Analyzing the histograms is the closest way I can think of. With "gdalinfo -hist in.tif" for example (but it is admitedly not completely trivial to find the index from the output) Or programatica

Re: [gdal-dev] Cropping a raster by a polygon - only nodata outside polygon wanted

2015-01-14 Thread mathieu
Is there a simple way to find one or several pixel value none of the bands use ? Mathieu 2015-01-14 12:06 GMT+01:00 Even Rouault-2 [via OSGeo.org] < ml-node+s1560n5181443...@n6.nabble.com>: > Selon mathieu <[hidden email] > >: > > > The prob

Re: [gdal-dev] Cropping a raster by a polygon - only nodata outside polygon wanted

2015-01-14 Thread Even Rouault
Selon mathieu : > The problem is that I don't know want an alpha channel because some of my > users work on MapInfo and MapInfo doesn't deal with alpha channels.. Really ??? Tell them to use QGIS instead. It does support alpha channel. Otherwise try to find a nodata value that isn't a valid pixe

Re: [gdal-dev] Cropping a raster by a polygon - only nodata outside polygon wanted

2015-01-14 Thread mathieu
The problem is that I don't know want an alpha channel because some of my users work on MapInfo and MapInfo doesn't deal with alpha channels.. 2015-01-14 11:39 GMT+01:00 Even Rouault-2 [via OSGeo.org] < ml-node+s1560n5181432...@n6.nabble.com>: > Mathieu, > > If 0 is a valid value at some location

Re: [gdal-dev] Cropping a raster by a polygon - only nodata outside polygon wanted

2015-01-14 Thread Even Rouault
Mathieu, If 0 is a valid value at some locations of your raster, then you cannot use it as the nodata value. Use an alpha band instead for example by using -dstalpha instead of -dstnodata 0 Even > Hello, > > I crop a 3 band raster by a polygon with the following formula : > /gdalwarp -of GTiff -

[gdal-dev] Cropping a raster by a polygon - only nodata outside polygon wanted

2015-01-14 Thread mathieu
Hello, I crop a 3 band raster by a polygon with the following formula : /gdalwarp -of GTiff -cutline polygon.shp -cl polygon input.tif output.tif / But pixels outside my polygon are assigned the 0 value. I'd like them to have nodata If I put the -dstnodata 0 option : /gdalwarp -of GTiff -cutline

Re: [gdal-dev] gdal_translate and multithreading

2015-01-14 Thread Even Rouault
Pierre, Nor gdal_translate nor the VRT driver uses multithreading. But it is possible that the driver that handles the underlying dataset referenced by the VRT uses multithreading. There are very few of them however. I can only think of : - JP2KAK. You can specify JP2KAK_THREADS=1 - JP2OpenJPEG. Y

[gdal-dev] gdal_translate and multithreading

2015-01-14 Thread Pierre Soille
Hello, while translating a vrt file into a tif file with gdal_translate, I noticed thanks to htop utility that gdal_translate is using multithreading (typicallay 4 threads). I fail to find any multithreading option for gdal_translate (contrary to gdal_warp that has a multi option and where the num