mirror of
				https://github.com/qgis/QGIS.git
				synced 2025-10-30 00:07:09 -04:00 
			
		
		
		
	* try to commit some changes in the branch * addedd 3 file, cmake, vrp .h and .cpp * updating VRP, no good results * try to solve some issue to the virtual raster provider * metadata class added, it should be developed * registred in qgsproviderregistry the new VRP * on line to test debug in the new VRP * chenge of 1_06 * minor change 2 06 * updating VRP, it can add some useless color to map canvas * add baseclass test fro new provider * Delete testqgsvirtualrasterprovider.cpp * move VRP to src/providers * Delete src/core/providers/virtualrasterprovider directory * little change to cmake * added as dynamic provider * move the VRP to src/providers and let it work * move the VRP to src/providers and let it work * including qgis analysis * updating block function with some calc tools * delete block function, updating readblock function * modified block method, used setValue --> to update with bits * modified block method * modified block method, adding takedata to the resultmatrix * modified test for the new provider * Add some checks in the block method, for raster entries * tries for the calculator tool * work on the hardcoded part and test * work on the hardcoded test * minor change in order to make the calc functionaltiy work * minor change to the loop in which the computation occurs * try to understand how qgsrastermatrixworks * work on debugging new class * work on debugging new class * updating test and block method * updating test and and block, now it works running in test mode * updating test and and block, now it works running in test mode with bits * updating test and and block, now it works running in test mode with bits * update test * update test and provider class * add decodeuri and encodeui in metadata, at the moment they do nothing * modify qgsrasterdataprovider by adding decoding and encoding uri methods * workin on encode and decode funct * work on encode/decode after Martin advices * work on encode/decode after Martin advices, and update unit test * work on encode/decode and update Cmakelist of provider test * work on encode/decode and update Cmakelist and provider test * work on encode/decode and update test + constructor * work on encode/decode and constructor * decode is now non trivial, he same as constructor * working on encoding * working on encoding/decoding * change a little the code/decode mehods in order to return and get a struct as output/input * change of decode method * change the encode method, I should polish the code and optimize the encode for raster layers * add flag ptr bool to decode mehod * add flag ptr and modified the constructor of vrprovider * work on the constructor and deconstructor, the flag does not work properly * work on the constructor anf decoder * work on the constructor and decoder * work on the constructor and add some lines to popoluta mRasterEntries * delete hardcoded data * work on constructor and copy constructor 2 * add the parsing of the formula in the constructor, I should make a private var with calcnode * add the parsing of the formula in the constructor, I should make a private var with calcnode2 * add some checks in the constructor2 * modify the copy constructor, add some code to adjust the qgsrasterdataprovider.sip * modify checks in the constructor and in the decode method, in order to avoid nested if stat * delete the logic in the decode method and add in the constructor * delete the logic in the decode method and add in the constructor, add some redundant check in the constructor * delete the logic in the decode method and add in the constructor, add some redundant check in the constructor 2 * test is now more general * test is now more general2 * delete of a comment * banned keywords check * little error * add copyright * add copyright2 * add assignment operator= delete * add documentation in qgsrasterprovider * documentation * modify qgsstringutils * little modifications * add the checkbox to the ui * come back to old ui for raster calc * adjust some qt::endl in the test of vrprovider * start to work on the ui dialog * layot of the code * add some logic to the dialog of the raster calc * add some test to qgisapp, need to modify the encoder and maybe put it in the qgrastercalcdialog * modify some logic in rastercalcdialog and in the app, I should modify and move the encode method * modify the comment * add method to calcnode, modify the constructor of the provider and the open of the dialog * add documentation * some modifications according to the first review * sadd some changes according to Martin's review * change qgsrastercalcnode methods that returns raster names, small change to ui * change the ui * change the ui - using QString instead of QStringLiteral * change the ui - using QString instead of QStringLiteral * change name of subdirectory containing the virtual raster provider * change name of subdirectory containing the virtual raster provider2 * change name of subdirectory containing the virtual raster provider3 * minor changes to makefiles * minor change to dialog, to hide and show the output format and path * provider key changed to the shorter virtualraster * add some code to QgsRasterLayer::encodedSource and decodedSource * delete some comments * updating VRP, no good results * made some change after the the second review * delete the comments * change some part of the code (delete of comments and cleaning the code) * correct some layout errors * change the mail contatct in my prvider * change details on the method in qgsrastercalcnode * change some method of the test class of my provider * delete some leakage in the virtual raster provider * modify some parts according to the review + change two lines of code for encoding/decoding methods * modify a line of qgisapp.cpp * small change according to the comments on th PR * add a test method for second generation virtual raster and modify checks in qgisapp * correction of the test method Co-authored-by: franc <Franc-Brs>
		
			
				
	
	
		
			132 lines
		
	
	
		
			3.1 KiB
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
			
		
		
	
	
			132 lines
		
	
	
		
			3.1 KiB
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
| /************************************************************************
 | |
|  * This file has been generated automatically from                      *
 | |
|  *                                                                      *
 | |
|  * src/analysis/raster/qgsrastercalcnode.h                              *
 | |
|  *                                                                      *
 | |
|  * Do not edit manually ! Edit header and run scripts/sipify.pl again   *
 | |
|  ************************************************************************/
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| class QgsRasterCalcNode
 | |
| {
 | |
| %Docstring(signature="appended")
 | |
| Represents a node in a raster calculator.
 | |
| %End
 | |
| 
 | |
| %TypeHeaderCode
 | |
| #include "qgsrastercalcnode.h"
 | |
| %End
 | |
|   public:
 | |
|     enum Type
 | |
|     {
 | |
|       tOperator,
 | |
|       tNumber,
 | |
|       tRasterRef,
 | |
|       tMatrix
 | |
|     };
 | |
| 
 | |
|     enum Operator
 | |
|     {
 | |
|       opPLUS,
 | |
|       opMINUS,
 | |
|       opMUL,
 | |
|       opDIV,
 | |
|       opPOW,
 | |
|       opSQRT,
 | |
|       opSIN,
 | |
|       opCOS,
 | |
|       opTAN,
 | |
|       opASIN,
 | |
|       opACOS,
 | |
|       opATAN,
 | |
|       opEQ,
 | |
|       opNE,
 | |
|       opGT,
 | |
|       opLT,
 | |
|       opGE,
 | |
|       opLE,
 | |
|       opAND,
 | |
|       opOR,
 | |
|       opSIGN,
 | |
|       opLOG,
 | |
|       opLOG10,
 | |
|       opABS,
 | |
|       opMAX,
 | |
|       opMIN,
 | |
|       opNONE,
 | |
|     };
 | |
| 
 | |
|     QgsRasterCalcNode();
 | |
| %Docstring
 | |
| Constructor for QgsRasterCalcNode.
 | |
| %End
 | |
| 
 | |
|     QgsRasterCalcNode( double number );
 | |
|     QgsRasterCalcNode( QgsRasterMatrix *matrix );
 | |
|     QgsRasterCalcNode( Operator op, QgsRasterCalcNode *left, QgsRasterCalcNode *right );
 | |
|     QgsRasterCalcNode( const QString &rasterName );
 | |
|     ~QgsRasterCalcNode();
 | |
| 
 | |
| 
 | |
|     Type type() const;
 | |
| %Docstring
 | |
| QgsRasterCalcNode cannot be copied
 | |
| %End
 | |
| 
 | |
|     void setLeft( QgsRasterCalcNode *left );
 | |
|     void setRight( QgsRasterCalcNode *right );
 | |
| 
 | |
| 
 | |
|     QString toString( bool cStyle = false ) const;
 | |
| %Docstring
 | |
| Returns a string representation of the expression
 | |
| 
 | |
| :param cStyle: if ``True`` operators will follow C syntax
 | |
| 
 | |
| .. versionadded:: 3.6
 | |
| %End
 | |
| 
 | |
|     QList<const QgsRasterCalcNode *> findNodes( const QgsRasterCalcNode::Type type ) const;
 | |
| %Docstring
 | |
| Returns a list of nodes of a specific ``type``
 | |
| 
 | |
| .. versionadded:: 3.6
 | |
| %End
 | |
| 
 | |
|     static QgsRasterCalcNode *parseRasterCalcString( const QString &str, QString &parserErrorMsg ) /Factory/;
 | |
| 
 | |
|     QStringList referencedLayerNames( );
 | |
| %Docstring
 | |
| Returns a list of raster layer names that are referenced in the formula without the quotation marks.
 | |
| It uses QgsRasterCalcNode.cleanRasterReferences
 | |
| 
 | |
| .. note::
 | |
| 
 | |
|    since QGIS 3.22
 | |
| %End
 | |
| 
 | |
|     QStringList cleanRasterReferences();
 | |
| %Docstring
 | |
| Returns a list of raster layer references that are addressed in the formula, without quotation marks.
 | |
| 
 | |
| .. note::
 | |
| 
 | |
|    since QGIS 3.22
 | |
| %End
 | |
| 
 | |
|   private:
 | |
|     QgsRasterCalcNode( const QgsRasterCalcNode &rh );
 | |
| };
 | |
| 
 | |
| 
 | |
| /************************************************************************
 | |
|  * This file has been generated automatically from                      *
 | |
|  *                                                                      *
 | |
|  * src/analysis/raster/qgsrastercalcnode.h                              *
 | |
|  *                                                                      *
 | |
|  * Do not edit manually ! Edit header and run scripts/sipify.pl again   *
 | |
|  ************************************************************************/
 |