Re: [gdal-dev] empty Gtiff from Python

2012-01-31 Thread questions anon
Was this problem solved? I have tried both dst_ds.GetRasterBand(1).WriteArray(myarray) gdal.Band.WriteArray(dst_ds.GetRasterBand(1), myarray) but my tiff still results in zeros. Any feedback will be greatly appreciated. On Fri, Oct 28, 2011 at 7:23 PM, Tom van der Putte wrote: > Hi List, > > I'm

Re: [gdal-dev] numpy array to raster

2012-01-31 Thread questions anon
no I quickly checked that! myarray is: [[ 16.15035553 16.14380074 16.15581551 ..., 18.06388149 18.08930645 18.08825245] [ 16.2154911 16.21180592 16.23977184 ..., 18.1085537 18.12040272 18.12342682] [ 16.32851467 16.29202938 16.28964043 ..., 18.16753635 18.14905453 18.166329

Re: [gdal-dev] numpy array to raster

2012-01-31 Thread Kyle Shannon
Is 'myarray' full of zeros? /** * * Kyle Shannon * ksshan...@gmail.com * */ On Tue, Jan 31, 2012 at 19:20, questions anon wrote: > thanks Frank, following your instructions with: > > src_ds=gdal_array.OpenArray(myarray) > dst_ds = > gdal.GetDriverByName('GTiff').Create('E:/test/rasterise/

Re: [gdal-dev] numpy array to raster

2012-01-31 Thread questions anon
thanks Frank, following your instructions with: src_ds=gdal_array.OpenArray(myarray) dst_ds = gdal.GetDriverByName('GTiff').Create('E:/test/rasterise/mynewraster.tif',ncols, nrows, 1 ,gdal.GDT_Byte) dst_ds.SetGeoTransform(geotransform) dst_ds.GetRasterBand(1).WriteArray(myarray) I do not receive a

Re: [gdal-dev] numpy array to raster

2012-01-31 Thread Frank Warmerdam
On Tue, Jan 31, 2012 at 4:38 PM, questions anon wrote: > I need to output my numpy array as a raster so that someone else can access > the data in ArcGIS. So basically the steps I need are: > read numpy array into gdal > convert to raster > use latitude and longitude and array size to set projecti

[gdal-dev] numpy array to raster

2012-01-31 Thread questions anon
I need to output my numpy array as a raster so that someone else can access the data in ArcGIS. So basically the steps I need are: read numpy array into gdal convert to raster use latitude and longitude and array size to set projection I am really struggling with gdal because I can't seem to find

Re: [gdal-dev] read a catalog is slower then directly the raster?

2012-01-31 Thread Even Rouault
> > Hello Even, > > We have tested as you said. Also we added some code to check execution > time of GDALRasterIO. We used two rasters in QGIS. First > ftp://ftp.remotesensing.org/pub/geotiff/samples/misc/tjpeg.tif have > rotation and warpped in QGIS, second - without rotation > http://gis-lab.i

Re: [gdal-dev] read a catalog is slower then directly the raster ?

2012-01-31 Thread Dmitry Baryshnikov
31.01.2012 19:20, Even Rouault пишет: Hi, Even I faced this problem before. I checked under debugger and saw that vrt sources were not creating overviews. So, gdal was making long RasterIO executions to the source raster, but not overviews. I provided a patch which took the overviews from origin

Re: [gdal-dev] ogr to convert 3D to 2D with height as attribute

2012-01-31 Thread Chaitanya kumar CH
Zoltan, ogr2ogr allows using OGR SQL [1]. You can access the geometry in WKT format and use the SUBSTR function to make reasonable modifications. There are many more functionalities to OGR SQL. Check out the OGR SQL page and see if they help. [1]: http://www.gdal.org/ogr/ogr_sql.html On Tue, Jan

Re: [gdal-dev] read a catalog is slower then directly the raster ?

2012-01-31 Thread Even Rouault
> > > Hi, Even > > I faced this problem before. I checked under debugger and saw that vrt > sources were not creating overviews. So, gdal was making long RasterIO > executions to the source raster, but not overviews. I provided a patch > which took the overviews from origin raster and wrapped them

Re: [gdal-dev] read a catalog is slower then directly the raster ?

2012-01-31 Thread Dmitry Baryshnikov
31.01.2012 18:32, Even Rouault пишет: Selon Dmitry Baryshnikov: 31.01.2012 16:54, Andrea Peri ?: Hi, using qgis I notice that it is more slow to open some raster from a catalog.vrt rather than opening the same raster directly. The slow is so big that when the catalog has many raster qgis t

Re: [gdal-dev] read a catalog is slower then directly the raster ?

2012-01-31 Thread Even Rouault
Selon Dmitry Baryshnikov : > 31.01.2012 16:54, Andrea Peri ?: > > Hi, > > using qgis I notice that it is more slow to open some raster from a > > catalog.vrt rather than opening the same raster directly. > > The slow is so big that when the catalog has many raster qgis take > > many time to op

Re: [gdal-dev] writing encoding into GPX files

2012-01-31 Thread Even Rouault
Selon "Pouliot, Christopher (DNR)" : > Hello all, > > I'm writing GPX files with OGR and the documentation states: "The content > returned by OGR will be encoded in UTF-8, after the conversion from the > encoding mentionned in the file header is." Note that the quoted sentence mentions what happ

Re: [gdal-dev] read a catalog is slower then directly the raster ?

2012-01-31 Thread Dmitry Baryshnikov
31.01.2012 16:54, Andrea Peri ?: Hi, using qgis I notice that it is more slow to open some raster from a catalog.vrt rather than opening the same raster directly. The slow is so big that when the catalog has many raster qgis take many time to open the catalog. Because qgis use gdal to rea

[gdal-dev] ogr to convert 3D to 2D with height as attribute

2012-01-31 Thread Zoltan Szecsei
Hi, I've got a few 3D DGN files that wont successfully read into a proprietary GIS prog, but do read into QGIS (ie: ogr sub-engine) successfully. I have tried using ogr to convert the DGN to a DXF file, but that also fails to import into this GIS package. I could write something to pick thro

[gdal-dev] read a catalog is slower then directly the raster ?

2012-01-31 Thread Andrea Peri
Hi, using qgis I notice that it is more slow to open some raster from a catalog.vrt rather than opening the same raster directly. The slow is so big that when the catalog has many raster qgis take many time to open the catalog. Because qgis use gdal to read raster and also to read a catalog. I gue

[gdal-dev] writing encoding into GPX files

2012-01-31 Thread Pouliot, Christopher (DNR)
Hello all, I'm writing GPX files with OGR and the documentation states: "The content returned by OGR will be encoded in UTF-8, after the conversion from the encoding mentionned in the file header is." When my GPX file is written out it does not include the encoding="UTF-8" in the head tag.