[gdal-dev] Motion: Add Kurt Schwehr to GDAL PSC
Hi, I propose to add Kurt Schwehr to the GDAL project steering committee. Kurt has been a committer for 2 years, and over the last few months has substantially increased his level of involvment, mainly in the area of improving code quality, going through the Coverity Scan database of code defects, other code cleanups, test suite improvements, ... He has also confirm his interest in long term involvment in the project. I believe he would be a good asset for the project. Motion: To add Kurt Schwehr to the GDAL PSC. +1 from me. Best regards, Even -- Spatialys - Geospatial professional services http://www.spatialys.com ___ gdal-dev mailing list gdal-dev@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/gdal-dev
Re: [gdal-dev] combine two raster data
Dear Wangyal, Well, with the Perl bindings you could do something like this (note: not tested code!). I'm assuming many things: the rasters are similar size, they are not too big so they fit into memory, etc. use Modern::Perl; use Geo::GDAL; my ($admin,$lu) = @ARGV; my $ds_admin = Geo::GDAL::Open($admin); die "can't open $admin as a raster dataset" unless $ds_admin; my $ds_lu = Geo::GDAL::Open($lu); die "can't open $lu as a raster dataset" unless $ds_lu; my $data_admin = $ds_admin->Band(1)->ReadTile; my $data_lu = $ds_admin->Band(1)->ReadTile; my %lu_at_admin; # will contain the number of cells of each land use in each admin area for (my $y = 0; $y < @$data_admin-1; $y++) { my $row_admin = $data_admin->[$y]; my $row_lu = $lu_admin->[$y]; for (my $x = 0; $x < @$row_admin-1; $x++) { $lu_at_admin{$row_admin->[$x]}{$row_lu->[$x]}++; } } for my $admin (sort keys %lu_at_admin) { for my $lu (sort keys %{$lu_at_admin{$admin}}) { say "There are $lu_at_admin{$admin}{$lu} cells of land use $lu in admin area $admin."; } } Best, Ari Jolma On 07.10.2015 23:12, Tsering W. Shawa wrote: I am looking for a script to combine two raster data that have unique values. For example, one raster has administrative unit name and another has land cover data. I want to combine these two raster data to find a relationship between two data. I can do the same process in another GIS software but wanted to find an option to do this using gdal. Any suggestion or help will be appreciated. Thanks, -Wangyal ___ gdal-dev mailing list gdal-dev@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/gdal-dev ___ gdal-dev mailing list gdal-dev@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/gdal-dev
[gdal-dev] combine two raster data
I am looking for a script to combine two raster data that have unique values. For example, one raster has administrative unit name and another has land cover data. I want to combine these two raster data to find a relationship between two data. I can do the same process in another GIS software but wanted to find an option to do this using gdal. Any suggestion or help will be appreciated. Thanks, -Wangyal ___ gdal-dev mailing list gdal-dev@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/gdal-dev
Re: [gdal-dev] Motion: Add Kurt Schwehr to GDAL PSC
Folks, I worked closely with Kurt at Google, and I am very supportive of adding him to the GDAL PSC. +1 Frank Best regards, Frank On Wed, Oct 7, 2015 at 4:54 PM, Even Rouaultwrote: > Hi, > > I propose to add Kurt Schwehr to the GDAL project steering committee. > > Kurt has been a committer for 2 years, and over the last few months has > substantially increased his level of involvment, mainly in the area of > improving code quality, going through the Coverity Scan database of code > defects, other code cleanups, test suite improvements, ... He has also confirm > his interest in long term involvment in the project. I believe he would be a > good asset for the project. > > Motion: To add Kurt Schwehr to the GDAL PSC. > > +1 from me. > > Best regards, > > Even > > -- > Spatialys - Geospatial professional services > http://www.spatialys.com > ___ > gdal-dev mailing list > gdal-dev@lists.osgeo.org > http://lists.osgeo.org/mailman/listinfo/gdal-dev -- ---+-- I set the clouds in motion - turn up | Frank Warmerdam, warmer...@pobox.com light and sound - activate the windows | http://pobox.com/~warmerdam and watch the world go round - Rush| Geospatial Software Developer ___ gdal-dev mailing list gdal-dev@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/gdal-dev
Re: [gdal-dev] postgis OGRFeature crash QGIS
Le mercredi 07 octobre 2015 12:51:05, Luca Delucchi a écrit : > Hi everybody, > > I'm fixing some problem with a QGIS plugin, and I'm fighting with a > problem with postgis OGRFeature that it crash QGIS for a > __GI___libc_free problem. The log of gdb is available here [0]. > > The error appear at the end of write_layer_single function (line 204) > during the return of this file [1]. I tried to fix in several way, but > I'm not able to understand. The error appear only with > postgresql/postgis datasource, not with other. > > Thanks a lot for any suggestion Luca, I'm not completely sure if this is the reason, but there's at least something to correct related to the use of: self.feat_defn.AddFieldDefn(style_field) Quoting OGRFeatureDefn::AddFieldDefn() documentation http://gdal.org/classOGRFeatureDefn.html#a40e681d8464b42f1a1fac655f16ac3dd : "To add a new field definition to a layer definition, do not use this function directly, but use OGRLayer::CreateField() instead." Hum actually looking more closely, I think the issue is that you modify the layer definition after having accumulated features in the "features" dictionary. Still quoting OGRFeatureDefn::AddFieldDefn() documentation "This method should only be called while there are no OGRFeature objects in existance based on this OGRFeatureDefn." So you should probably call outLayer.CreateField() before reading the postgres features. Even -- Spatialys - Geospatial professional services http://www.spatialys.com ___ gdal-dev mailing list gdal-dev@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/gdal-dev
[gdal-dev] postgis OGRFeature crash QGIS
Hi everybody, I'm fixing some problem with a QGIS plugin, and I'm fighting with a problem with postgis OGRFeature that it crash QGIS for a __GI___libc_free problem. The log of gdb is available here [0]. The error appear at the end of write_layer_single function (line 204) during the return of this file [1]. I tried to fix in several way, but I'm not able to understand. The error appear only with postgresql/postgis datasource, not with other. Thanks a lot for any suggestion [0] http://pastebin.com/LnjCwsXW [1] http://pastebin.com/gvsYYwUz -- ciao Luca http://gis.cri.fmach.it/delucchi/ www.lucadelu.org ___ gdal-dev mailing list gdal-dev@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/gdal-dev
Re: [gdal-dev] postgis OGRFeature crash QGIS
On 7 October 2015 at 13:18, Even Rouaultwrote: > > Luca, > Hi Even, > I'm not completely sure if this is the reason, but there's at least something > to correct related to the use of: > > self.feat_defn.AddFieldDefn(style_field) > > Quoting OGRFeatureDefn::AddFieldDefn() documentation > http://gdal.org/classOGRFeatureDefn.html#a40e681d8464b42f1a1fac655f16ac3dd : > > "To add a new field definition to a layer definition, do not use this function > directly, but use OGRLayer::CreateField() instead." > > Hum actually looking more closely, I think the issue is that you modify the > layer definition after having accumulated features in the "features" > dictionary. > > Still quoting OGRFeatureDefn::AddFieldDefn() documentation > "This method should only be called while there are no OGRFeature objects in > existance based on this OGRFeatureDefn." > > So you should probably call outLayer.CreateField() before reading the postgres > features. > CreateField works perfectly, I also removed the workaround for postgresql Thanks a lot > Even > -- ciao Luca http://gis.cri.fmach.it/delucchi/ www.lucadelu.org ___ gdal-dev mailing list gdal-dev@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/gdal-dev
[gdal-dev] Python gdal catch ERROR 6
Hi devs, PDF driver is actually supporting only 8 bit band, and if I try to create a layer using CreateCopy function with a dataset different from 8 bit I get "ERROR 6: PDF driver doesn't support data type UInt16. Only eight bit byte bands supported." I try to catch this error using try/except but it doesn't work, should I test if the result of CreateCopy is not None? Is there any other better way to catch this error? thanks -- ciao Luca http://gis.cri.fmach.it/delucchi/ www.lucadelu.org ___ gdal-dev mailing list gdal-dev@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/gdal-dev
Re: [gdal-dev] Dropping Windows-CE support?
Le mardi 06 octobre 2015 23:07:41, Kurt Schwehr a écrit : > Hi all, > > Any objections to me removing Windows-CE support from GDAL svn-trunk head? No objections from me. There are also traces of WIN32CE in other files (such as port/cpl_strtod.cpp) > > -kurt > > https://trac.osgeo.org/gdal/ticket/6133 For removal of MacOS 9 and older. > Even Mentioned WinCE. > > find . -name \*.cpp -o -name \*.c -o -name \*.h | egrep -v 'zlib|png|svn' | > xargs egrep -i 'WIN32_WCE|windows ce|wince' > ./port/cpl_win32ce_api.h: * Purpose: ASCII wrappers around only Unicode > Windows CE API. > ./port/cpl_win32ce_api.h:#ifndef _CPL_WINCEAPI_H_INCLUDED > ./port/cpl_win32ce_api.h:#define _CPL_WINCEAPI_H_INCLUDED1 > ./port/cpl_win32ce_api.h: * Windows CE API non-Unicode Wrappers > ./port/cpl_win32ce_api.h:/* Replace Windows CE API calls with our own > non-Unicode equivalents. */ > ./port/cpl_win32ce_api.h:#endif /* #ifndef _CPL_WINCEAPI_H_INCLUDED */ > ./port/cpl_port.h:#if defined(_WIN32) && !defined(WIN32) && > !defined(_WIN32_WCE) > ./port/cpl_port.h:#if defined(_WINDOWS) && !defined(WIN32) && > !defined(_WIN32_WCE) > ./port/cpl_port.h:/* We will use WIN32CE as a standard Windows CE > (Mobile) define. */ > ./port/cpl_port.h:#if defined(_WIN32_WCE) > ./port/cpl_error.cpp:# include "cpl_wince.h" > ./port/cpl_vsi_virtual.h:# include "cpl_wince.h" > ./port/cpl_wince.h: * $Id: cpl_wince.h 10645 2007-01-18 02:22:39Z warmerdam > $ > ./port/cpl_wince.h: * Purpose: Windows CE specific declarations. > ./port/cpl_wince.h:#ifndef _CPL_WINCE_H_INCLUDED > ./port/cpl_wince.h:#define _CPL_WINCE_H_INCLUDED > ./port/cpl_wince.h:#endif /* #ifndef _CPL_WINCE_H_INCLUDED */ > ./port/cpl_vsil_win32.cpp:/* On WinCE we only support plain ascii > filenames. */ > ./port/cpl_vsisimple.cpp:/* Windows CE or other platforms */ > ./port/cpl_odbc.cpp:#ifndef WIN32CE /* ODBC is not supported on Windows CE. > */ > ./port/cpl_conv.cpp:# include "cpl_wince.h" > ./port/cpl_odbc.h:#ifndef WIN32CE /* ODBC is not supported on Windows CE. > */ ./port/cpl_win32ce_api.cpp: * Purpose: ASCII wrappers around only > Unicode Windows CE API. > ./port/cplgetsymbol.cpp:/* Windows CE Implementation > */ > ./port/cpl_vsi.h:#if !defined(_WIN32) && !defined(_WIN32_WCE) > ./port/cpl_vsi.h:#if !defined(_WIN32_WCE) > ./port/cpl_vsi.h:/* Windows CE */ > ./port/cpl_vsi.h:#if defined(_WIN32_WCE) > ./ogr/swq.h:#if defined(_WIN32) && !defined(_WIN32_WCE) > ./ogr/swq.h:#elif defined(_WIN32_WCE) > ./ogr/ogrsf_frmts/ods/ods_formula.h:#if defined(_WIN32) && > !defined(_WIN32_WCE) > ./ogr/ogrsf_frmts/ods/ods_formula.h:#elif defined(_WIN32_WCE) > ./ogr/ogrsf_frmts/shape/ogrshapelayer.cpp:#if defined(_WIN32_WCE) > ./ogr/ogrsf_frmts/geojson/libjson/config.h:#ifdef _WIN32_WCE > ./ogr/ogrsf_frmts/geojson/libjson/config.h:#ifdef _WIN32_WCE > ./ogr/ogrgeometry.cpp:#ifndef _WIN32_WCE > ./ogr/ogrgeometry.cpp: "OGRGeometry::exportToKML() not > supported in the WinCE build." ); > ./ogr/ogrgeometry.cpp:#ifndef _WIN32_WCE > ./ogr/ogrgeometry.cpp: "OGRGeometry::exportToJson() not > supported in the WinCE build." ); -- Spatialys - Geospatial professional services http://www.spatialys.com ___ gdal-dev mailing list gdal-dev@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/gdal-dev