[Qgis-developer] Problems with Histogram tab in Raster properties
Hi, A) In release 14370 the histogram tab of the raster properties window has a problem: The histogram is not displayed the second time the 'histogram tab' is clicked. E.g.: 1 - open the raster properties window 2 - click on the histogram tab 3 - histogram is computed and displayed 4 - click on any other tab 5 - click on the histogram tab again 6 - blank screen!! On WinXP - OSGeo4W dev installation Can someone replicate the problem? B) And keeping with the histogram, three comments/suggestions: - Could the NaN be excluded from the histogram? - Could the X-axis numbers reflect the actual colour values instead of a fixed 0-300 range? Note that the X-axis of the histogram is spread on colours values, thus the displayed X-axis numbers are meaningless - Could it be possible to add a zoom function on the histogram? Best regards, Benoit ___ Qgis-developer mailing list Qgis-developer@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-developer
Re: [Qgis-developer] Plugin Offline editing: first tests
Il 10/10/2010 10:11, Paolo Cavallini ha scritto: I'm testing the plugin and found some issues. While converting to offline, I get a warning (from the shell) and an error (with a popup): WARNING: there is no transaction in progress ERROR: 313 feature(s) not added Could not commit changes to layer comuni (offline) but the layer seems to be copied. So I edit it, and I get another error while committing the changes to the SL db: Errors: ERROR: 314 feature(s) not added. I tested this with 2 different polygon layers, with the same problem. Points are handled well. Hi all. Anyone confirms this? If I have some hints, I can do further tests. All the best, and thanks. -- Paolo Cavallini: http://www.faunalia.it/pc ___ Qgis-developer mailing list Qgis-developer@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-developer
Re: [Qgis-developer] Plugin Offline editing: first tests
Hi Mattias. Thanks for your reply. Il 14/10/2010 11:42, Mathias Walker ha scritto: What source database are you using? PostGIS. Are there any special settings or missing primary keys in the polygon layers? Nothing special, the table has a gid. I can send you a dump if you wish. All the best. -- Paolo Cavallini: http://www.faunalia.it/pc ___ Qgis-developer mailing list Qgis-developer@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-developer
[Qgis-developer] Raster algebra C++
Hi devs, A very cool and handy tool is Alexander Bruys raster algebra plugin. It's so usefull in environmental modelling that Tim and I thought it would be good to have it in our analysis library (where it can be used by 3rd party applications too and without the dependency of the numpy library). So here is my initial patch that implements a calculator tool as part of the analysis library by extending the search string mechanism. Compared to the python plugin, is has some missing features (but they could be added): - no 'difference' and 'NDVI' buttons - only outputs float32 rasters - no possibility to load / save expressions On the other side, it has some additional features: - Possibility to insert output extent and resolution and do calculations with layers that have different resolutions / extent. If a layer resolution does not match, it is automatically resampled to the output resolution (of course with higher computation costs) - Selection of output format You can try the functionality by applying the following patch: http://karlinapp.ethz.ch/101014_qgis_rastercalculator.diff The menu to open the calculator is located under 'Layer-Raster calculator'. I didn't apply it to trunk directly, as it needs more testing and there are still some issues: - Flex detects a string as raster if it has '@' followed by a single number (the raster band number). Don't know if there are better solutions, especially to avoid conflicts with vector columns named that way. - QgsSearchTreeValue is extended with a new type to represent a raster matrix and with new operators and methods doing matrix operations. This class needs some code cleaning before applying to trunk - Handling of nodata values could be done in a more clever way: out of band values during resampling receive the nodata value of the input raster band. In case of error (e.g. division through zero), QgsSearchStingValue applies '-10'. - More testing is needed. Especially with the automatic resampling option, there is a high risk for rounding errors. Send me a mail if you found a bug (possibly with a sample dataset and easy instruction on how to reproduce). Looking forward for your feedback, Marco -- Dr. Marco Hugentobler Sourcepole - Linux Open Source Solutions Webereistrasse 66, 8134 Adliswil, Switzerland marco.hugentob...@sourcepole.ch http://www.sourcepole.ch Technical Advisor QGIS Project Steering Committee ___ Qgis-developer mailing list Qgis-developer@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-developer
Re: [Qgis-developer] Raster algebra C++
Hi Marco, seems that this is another great addition from your side. I'll try to build QGIS trunk (r14380) with this patch under Windows with MSVS Express 2008 and dependencies from OSGeo4W and get next error: qgssearchtreenode.cpp d:\devel\cpp\qgis\trunk\src\core\qgssearchtreenode.cpp(1304) : error C2666: 'pow' : 6 overloads have similar conversions c:\program files\microsoft visual studio 9.0\vc\include\math.h(575): could be 'long double pow(long double,int)' c:\program files\microsoft visual studio 9.0\vc\include\math.h(573): or 'long double pow(long double,long double)' c:\program files\microsoft visual studio 9.0\vc\include\math.h(527): or 'float pow(float,int)' c:\program files\microsoft visual studio 9.0\vc\include\math.h(525): or 'float pow(float,float)' c:\program files\microsoft visual studio 9.0\vc\include\math.h(489): or 'double pow(double,int)' c:\program files\microsoft visual studio 9.0\vc\include\math.h(123): or 'double pow(double,double)' while trying to match the argument list '(double, float)' I change line 1304 as res[i] = pow(double(value1), double(mat[i])); and the I get another errors: qgisapp.obj : error LNK2019: unresolved external symbol public: __thiscall QgsRasterCalculator::~QgsRasterCalculator(void) (??1QgsRasterCalculator@@q...@xz) referenced in function private: void __thiscall QgisApp::showRasterCalculator(void) (?showrastercalcula...@qgisapp@@AAEXXZ) qgisapp.obj : error LNK2019: unresolved external symbol public: int __thiscall QgsRasterCalculator::processCalculation(class QProgressDialog *) (?processcalculat...@qgsrastercalculator@@QAEHPAVQProgressDialog@@@Z) referenced in function private: void __thiscall QgisApp::showRasterCalculator(void) (?showrastercalcula...@qgisapp@@AAEXXZ) qgisapp.obj : error LNK2019: unresolved external symbol public: __thiscall QgsRasterCalculator::QgsRasterCalculator(class QString const ,class QString const ,class QString const ,class QgsRectangle const ,int,int,class QVectorstruct QgsRasterCalculatorEntry const ) (??0QgsRasterCalculator@@q...@abvqstring@@00ABVQgsRectangle@@hhabv?$qvec...@uqgsrastercalculatorentry@Z) referenced in function private: void __thiscall QgisApp::showRasterCalculator(void) (?showrastercalcula...@qgisapp@@AAEXXZ) On Linux I compile this without errors. Thanks On Thu, 14 Oct 2010 17:40:03 +0200 Marco Hugentobler marco.hugentob...@sourcepole.ch wrote: Hi devs, A very cool and handy tool is Alexander Bruys raster algebra plugin. It's so usefull in environmental modelling that Tim and I thought it would be good to have it in our analysis library (where it can be used by 3rd party applications too and without the dependency of the numpy library). So here is my initial patch that implements a calculator tool as part of the analysis library by extending the search string mechanism. Compared to the python plugin, is has some missing features (but they could be added): - no 'difference' and 'NDVI' buttons - only outputs float32 rasters - no possibility to load / save expressions On the other side, it has some additional features: - Possibility to insert output extent and resolution and do calculations with layers that have different resolutions / extent. If a layer resolution does not match, it is automatically resampled to the output resolution (of course with higher computation costs) - Selection of output format You can try the functionality by applying the following patch: http://karlinapp.ethz.ch/101014_qgis_rastercalculator.diff The menu to open the calculator is located under 'Layer-Raster calculator'. I didn't apply it to trunk directly, as it needs more testing and there are still some issues: - Flex detects a string as raster if it has '@' followed by a single number (the raster band number). Don't know if there are better solutions, especially to avoid conflicts with vector columns named that way. - QgsSearchTreeValue is extended with a new type to represent a raster matrix and with new operators and methods doing matrix operations. This class needs some code cleaning before applying to trunk - Handling of nodata values could be done in a more clever way: out of band values during resampling receive the nodata value of the input raster band. In case of error (e.g. division through zero), QgsSearchStingValue applies '-10'. - More testing is needed. Especially with the automatic resampling option, there is a high risk for rounding errors. Send me a mail if you found a bug (possibly with a sample dataset and easy instruction on how to reproduce). Looking forward for your feedback, Marco -- Dr. Marco Hugentobler Sourcepole - Linux Open Source Solutions Webereistrasse 66, 8134 Adliswil, Switzerland marco.hugentob...@sourcepole.ch http://www.sourcepole.ch Technical Advisor QGIS Project Steering Committee ___
Re: [Qgis-developer] Raster algebra C++
And another minor issue. I have raster 2007.tif. When I enter expression 2...@1 + 2...@2 I get Expression invalid message. Seems that raster names only with digits and symbols minus (-) don't recognized as valid raster names -- Alexander Bruy ___ Qgis-developer mailing list Qgis-developer@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-developer
Re: [Qgis-developer] Raster algebra C++
Hi Alexander, On Thu, 14. Oct 2010 at 20:58:01 +0300, Alexander Bruy wrote: I change line 1304 as res[i] = pow(double(value1), double(mat[i])); value1 is already double. So casting mat[i] should be enough. and the I get another errors: qgisapp.obj : error LNK2019: unresolved external symbol public: __thiscall QgsRasterCalculator::~QgsRasterCalculator(void) (??1QgsRasterCalculator@@q...@xz) referenced in function private: void __thiscall QgisApp::showRasterCalculator(void) (?showrastercalcula...@qgisapp@@AAEXXZ) qgisapp.obj : error LNK2019: unresolved external symbol public: int __thiscall QgsRasterCalculator::processCalculation(class QProgressDialog *) (?processcalculat...@qgsrastercalculator@@QAEHPAVQProgressDialog@@@Z) referenced in function private: void __thiscall QgisApp::showRasterCalculator(void) (?showrastercalcula...@qgisapp@@AAEXXZ) qgisapp.obj : error LNK2019: unresolved external symbol public: __thiscall QgsRasterCalculator::QgsRasterCalculator(class QString const ,class QString const ,class QString const ,class QgsRectangle const ,int,int,class QVectorstruct QgsRasterCalculatorEntry const ) (??0QgsRasterCalculator@@q...@abvqstring@@00ABVQgsRectangle@@hhabv?$qvec...@uqgsrastercalculatorentry@Z) referenced in function private: void __thiscall QgisApp::showRasterCalculator(void) (?showrastercalcula...@qgisapp@@AAEXXZ) Add ANALYSIS_EXPORT to the QgsRasterCalculator declaration in src/analysis/raster/qgsrastercalculator.h:39: class ANALYSIS_EXPORT QgsRasterCalculator Jürgen -- Jürgen E. Fischer norBIT GmbH Tel. +49-4931-918175-20 Dipl.-Inf. (FH) Rheinstraße 13Fax. +49-4931-918175-50 Software Engineer D-26506 Norden http://www.norbit.de -- norBIT Gesellschaft fuer Unternehmensberatung und Informationssysteme mbH Rheinstrasse 13, 26506 Norden GF: Jelto Buurman, HR: Amtsgericht Emden, HRB 5502 ___ Qgis-developer mailing list Qgis-developer@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-developer