Skip to content
Permalink
Browse files

Merge branch 'master' of https://github.com/qgis/Quantum-GIS into atlas

Conflicts:
	python/core/qgsexpression.sip

Add a missing function to QgsExpression
  • Loading branch information
Hugo Mercier
Hugo Mercier committed Sep 26, 2012
2 parents 4657c84 + ee593e8 commit ff41bec29bab5854d8a0f4b1701dd111fac7ec89
Showing 576 changed files with 23,722 additions and 10,041 deletions.
@@ -78,5 +78,12 @@ MACRO(ADD_FLEX_FILES_PREFIX _sources prefix )
)

SET(${_sources} ${${_sources}} ${_out} )

# Disable warnings
IF(MSVC)
SET_SOURCE_FILES_PROPERTIES(${_out} PROPERTIES COMPILE_FLAGS /W0)
ELSE(MSVC)
SET_SOURCE_FILES_PROPERTIES(${_out} PROPERTIES COMPILE_FLAGS -w)
ENDIF(MSVC)
ENDFOREACH (_current_FILE)
ENDMACRO(ADD_FLEX_FILES_PREFIX)
@@ -1,7 +1,7 @@
<style>table {font-size:80%;}th {text-align:left; }.bartodo{ background-color:red;width:100px;height:20px;}.bardone{ background-color:green;width:80px;height:20px;font-size:80%;text-align:center;padding-top:4px;height:16px;color:white;}</style><table><tr><th colspan="2" style="width:250px;">Language</th><th>Finished %</th><th>Translators</th></tr>

<tr><td><img src="qrc:/images/flags/de.png"></td><td>German</td><td><div title="finished:8466 unfinished:0 untranslated:0" class="bartodo"><div class="bardone" style="width:100px">100.0</div></div></td><td>Jürgen E. Fischer, Stephan Holl, Otto Dassau, Werner Macho</td></tr>
<tr><td><img src="qrc:/images/flags/gl_ES.png"></td><td>Galician (Spain)</td><td><div title="finished:8111 unfinished:114 untranslated:195" class="bartodo"><div class="bardone" style="width:96px">96.5</div></div></td><td>Xan Vieiro</td></tr>
<tr><td><img src="qrc:/images/flags/gl_ES.png"></td><td>Galician (Spain)</td><td><div title="finished:8466 unfinished:0 untranslated:0" class="bartodo"><div class="bardone" style="width:100px">100.0</div></div></td><td>Xan Vieiro</td></tr>
<tr><td><img src="qrc:/images/flags/it.png"></td><td>Italian</td><td><div title="finished:7741 unfinished:0 untranslated:0" class="bartodo"><div class="bardone" style="width:91px">91.4</div></div></td><td>Paolo Cavallini, Flavio Rigolon, Maurizio Napolitano, Roberto Angeletti, Alessandro Fanna, Michele Beneventi, Marco Braida, Luca Casagrande, Luca Delucchi, Anne Gishla</td></tr>
<tr><td><img src="qrc:/images/flags/ja.png"></td><td>Japanese</td><td><div title="finished:7741 unfinished:0 untranslated:0" class="bartodo"><div class="bardone" style="width:91px">91.4</div></div></td><td>BABA Yoshihiko, Yoichi Kayama</td></tr>
<tr><td><img src="qrc:/images/flags/nl.png"></td><td>Dutch</td><td><div title="finished:7741 unfinished:0 untranslated:0" class="bartodo"><div class="bardone" style="width:91px">91.4</div></div></td><td>Richard Duivenvoorde, Raymond Nijssen, Carlo van Rijswijk</td></tr>
@@ -19,19 +19,21 @@ fixes, bug reports, contributed documentation, advocacy and supporting other
users on our mailing lists and forums. Financial contributions are also
welcome.

\section index_APIStability API Stability
\section index_APIStability Earlier versions of the API

Versions of QGIS prior to 1.0 did not guarantee API stability since the
application was undergoing rapid development of new features and we did not
want to commit ourselves to a fixed API. With the release of QGIS 1.0 we
guarantee a backwards compatible API for the 1.x and 1.0.x release series. 1.x
releases will be our 'unstable' development builds and 1.0.x releases our
'stable' (bugfixes and very minor tweaks only).
Earlier version of the documentation are also available on the Quantum GIS
website:

<ul>
<li><a href="http://qgis.org/api/1.8">1.8</a>
<li><a href="http://qgis.org/api/1.7">1.7</a>
<li><a href="http://qgis.org/api/1.6">1.6</a>
</ul>

\section index_maillist Mailing Lists
<ul>
<li>For support we encourage you to join our <a
href="http://qgis.osgeo.org/community/mailing-lists.html">mailing lists</a> for
href="http://qgis.org/en/community/mailing-lists.html">mailing lists</a> for
developers.</li> </ul>

\section index_bugs Bug Reporting

Large diffs are not rendered by default.

Large diffs are not rendered by default.

@@ -6254,12 +6254,50 @@ Cambiare questa situazione prima, perché il plugin OSM non quale layer è la de
<translation>Console python</translation>
</message>
<message>
<source>To access Quantum GIS environment from this console
use qgis.utils.iface object (instance of QgisInterface class).
<source>Clear console</source>
<translation>Pulisci console</translation>
</message>
<message>
<source>Import iface class</source>
<translation>Importa la classe iface</translation>
</message>
<message>
<source>Import sextante class</source>
<translation>Importa la classe Sextante</translation>
</message>
<message>
<source>Open script file</source>
<translation>Apri file</translation>
</message>
<message>
<source>Save to script file</source>
<translation>Salva file</translation>
</message>
<message>
<source>Help</source>
<translation>Aiuto</translation>
</message>
<message>
<source>Run command</source>
<translation>Esegui comando</translation>
</message>
<message>
<source>## History saved successfully ##</source>
<translation>## Storia comandi salvata con successo ##</translation>
</message>
<message>
<source>## History cleared successfully ##</source>
<translation>## Storia comandi cancellata con successo ##</translation>
</message>
<message>
<source>## To access Quantum GIS environment from this console
## use qgis.utils.iface object (instance of QgisInterface class). Read help for more info.

</source>
<translation>Per accedere all&apos;ambiente Quantum GIS da questa console
usa l&apos;oggetto qgis.utils.iface (istanza della classe QgisInterface).</translation>
<translation>## Per accedere all&apos;ambiente Quantum GIS da questa console
## usa l&apos;oggetto qgis.utils.iface (istanza della classe QgisInterface). Consulta l'aiuto per ottenere più informazioni.

</translation>
</message>
</context>
<context>
@@ -28,18 +28,36 @@ INCLUDE_DIRECTORIES(
${QT_QTXML_INCLUDE_DIR}
${GDAL_INCLUDE_DIR}
${GEOS_INCLUDE_DIR}
${QWT_INCLUDE_DIR}

../src/core
../src/core/pal
../src/core/composer
../src/core/diagram
../src/core/gps
../src/core/gps/qextserialport
../src/core/raster
../src/core/renderer
../src/core/symbology
../src/core/symbology-ng

../src/gui/raster
../src/gui/attributetable

../src/analysis/interpolation
../src/analysis/raster

${CMAKE_BINARY_DIR} # qgsconfig.h, qgsversion.h
)

IF(NOT WITH_TOUCH)
SET(SIP_DISABLE_FEATURES ${SIP_DISABLE_FEATURES} HAVE_TOUCH)
ENDIF(NOT WITH_TOUCH)

IF(NOT QT_MOBILITY_LOCATION_FOUND)
SET(SIP_DISABLE_FEATURES ${SIP_DISABLE_FEATURES} MOBILITY_LOCATION)
ENDIF(NOT QT_MOBILITY_LOCATION_FOUND)

IF(PYQT4_VERSION_NUM LESS 263680) # 0x040600
SET(SIP_DISABLE_FEATURES ${SIP_DISABLE_FEATURES} PROXY_FACTORY)
ENDIF(PYQT4_VERSION_NUM LESS 263680)
@@ -9,3 +9,44 @@
%Include qgsgeometryanalyzer.sip
%Include qgsoverlayanalyzer.sip
%Include qgszonalstatistics.sip

// %Include interpolation/Bezier3D.sip
// %Include interpolation/CloughTocherInterpolator.sip
// %Include interpolation/DualEdgeTriangulation.sip
// %Include interpolation/HalfEdge.sip
// %Include interpolation/LinTriangleInterpolator.sip
// %Include interpolation/Line3D.sip
// %Include interpolation/Node.sip
// %Include interpolation/NormVecDecorator.sip
// %Include interpolation/ParametricLine.sip
// %Include interpolation/Point3D.sip
// %Include interpolation/TriangleInterpolator.sip
// %Include interpolation/Triangulation.sip
// %Include interpolation/TriDecorator.sip
// %Include interpolation/Vector3D.sip
%Include interpolation/qgsgridfilewriter.sip
%Include interpolation/qgsinterpolator.sip
%Include interpolation/qgsidwinterpolator.sip
%Include interpolation/qgstininterpolator.sip

%Include raster/qgsderivativefilter.sip
%Include raster/qgsaspectfilter.sip
%Include raster/qgshillshadefilter.sip
%Include raster/qgsninecellfilter.sip
%Include raster/qgsrastercalcnode.sip
%Include raster/qgsrastercalculator.sip
%Include raster/qgsrastermatrix.sip
%Include raster/qgsrelief.sip
%Include raster/qgsruggednessfilter.sip
%Include raster/qgsslopefilter.sip
%Include raster/qgstotalcurvaturefilter.sip

%Include network/qgsgraph.sip
%Include network/qgsarcproperter.sip
%Include network/qgsgraphanalyzer.sip
%Include network/qgslinevectorlayerdirector.sip
%Include network/qgsgraphbuilderintr.sip
%Include network/qgsgraphbuilder.sip
%Include network/qgsgraphdirector.sip
%Include network/networkanalysis.sip
%Include network/qgsdistancearcproperter.sip
@@ -0,0 +1,41 @@
class Bezier3D : ParametricLine
{
%TypeHeaderCode
#include <Bezier3D.h>
%End

public:
/**Default constructor*/
Bezier3D();
/**Constructor, par is a pointer to the parent, controlpoly a controlpolygon*/
// Bezier3D( ParametricLine* par, QVector<Point3D*>* controlpoly );
/**Destructor*/
virtual ~Bezier3D();
/**Do not use this method, since a Bezier curve does not consist of other curves*/
virtual void add( ParametricLine *pl );
/**Calculates the first derivative and assigns it to v*/
virtual void calcFirstDer( float t, Vector3D* v );
/**Calculates the second derivative and assigns it to v*/
virtual void calcSecDer( float t, Vector3D* v );
//virtual Point3D calcPoint(float t);
/**Calculates the point on the curve and assigns it to p*/
virtual void calcPoint( float t, Point3D* p );
/**changes the order of control points*/
virtual void changeDirection();
//virtual void draw(QPainter* p);
//virtual bool intersects(ParametricLine* pal);
/**Do not use this method, since a Bezier curve does not consist of other curves*/
virtual void remove( int i );
/**Returns a control point*/
virtual const Point3D* getControlPoint( int number ) const;
/**Returns a pointer to the control polygon*/
// virtual const QVector<Point3D*>* getControlPoly() const;
/**Returns the degree of the curve*/
virtual int getDegree() const;
/**Returns the parent*/
virtual ParametricLine* getParent() const;
/** Sets the parent*/
virtual void setParent( ParametricLine* par );
/**Sets the control polygon*/
// virtual void setControlPoly( QVector<Point3D*>* cp );
};
@@ -0,0 +1,24 @@
class CloughTocherInterpolator : TriangleInterpolator
{
%TypeHeaderCode
#include <CloughTocherInterpolator.h>
%End
protected:
/**Finds out, in which triangle the point with the coordinates x and y is*/
void init( double x, double y );
/**Calculates the Bernsteinpolynomials to calculate the Beziertriangle. 'n' is three in the cubical case, 'i', 'j', 'k' are the indices of the controllpoint and 'u', 'v', 'w' are the barycentric coordinates of the point*/
double calcBernsteinPoly( int n, int i, int j, int k, double u, double v, double w );

public:
/**standard constructor*/
CloughTocherInterpolator();
/**constructor with a pointer to the triangulation as argument*/
CloughTocherInterpolator( NormVecDecorator* tin );
/**destructor*/
virtual ~CloughTocherInterpolator();
/**Calculates the normal vector and assigns it to vec (not implemented at the moment)*/
virtual bool calcNormVec( double x, double y, Vector3D* result );
/**Performs a linear interpolation in a triangle and assigns the x-,y- and z-coordinates to point*/
virtual bool calcPoint( double x, double y, Point3D* result );
virtual void setTriangulation( NormVecDecorator* tin );
};
@@ -0,0 +1,104 @@
class DualEdgeTriangulation: Triangulation
{
%TypeHeaderCode
#include <DualEdgeTriangulation.h>
%End
public:
DualEdgeTriangulation();
DualEdgeTriangulation( int nop, Triangulation* decorator );
virtual ~DualEdgeTriangulation();
void setDecorator( Triangulation* d );
/**Adds a line (e.g. a break-, structure- or an isoline) to the triangulation. The class takes ownership of the line object and its points*/
void addLine( Line3D* line, bool breakline );
/**Adds a point to the triangulation and returns the number of this point in case of success or -100 in case of failure*/
int addPoint( Point3D* p );
/**Performs a consistency check, remove this later*/
virtual void performConsistencyTest();
/**Calculates the normal at a point on the surface*/
virtual bool calcNormal( double x, double y, Vector3D* result );
/**Calculates x-, y and z-value of the point on the surface*/
virtual bool calcPoint( double x, double y, Point3D* result );
/**draws the points, edges and the forced lines*/
//virtual void draw(QPainter* p, double xlowleft, double ylowleft, double xupright, double yupright, double width, double height) const;
/**Returns a pointer to the point with number i*/
virtual Point3D* getPoint( unsigned int i ) const;
/**Returns the number of the point opposite to the triangle points p1, p2 (which have to be on a halfedge)*/
int getOppositePoint( int p1, int p2 );
/**Finds out, in which triangle the point with coordinates x and y is and assigns the numbers of the vertices to 'n1', 'n2' and 'n3' and the vertices to 'p1', 'p2' and 'p3'*/
// virtual bool getTriangle( double x, double y, Point3D* p1, int* n1, Point3D* p2, int* n2, Point3D* p3, int* n3 );
/**Finds out, in which triangle the point with coordinates x and y is and assigns addresses to the points at the vertices to 'p1', 'p2' and 'p3*/
virtual bool getTriangle( double x, double y, Point3D* p1, Point3D* p2, Point3D* p3 );
/**Returns a pointer to a value list with the information of the triangles surrounding (counterclockwise) a point. Four integer values describe a triangle, the first three are the number of the half edges of the triangle and the fourth is -10, if the third (and most counterclockwise) edge is a breakline, and -20 otherwise. The value list has to be deleted by the code which called the method*/
QList<int>* getSurroundingTriangles( int pointno );
/**Returns the largest x-coordinate value of the bounding box*/
virtual double getXMax() const;
/**Returns the smallest x-coordinate value of the bounding box*/
virtual double getXMin() const;
/**Returns the largest y-coordinate value of the bounding box*/
virtual double getYMax() const;
/**Returns the smallest x-coordinate value of the bounding box*/
virtual double getYMin() const;
/**Returns the number of points*/
virtual int getNumberOfPoints() const;
/**Removes the line with number i from the triangulation*/
void removeLine( int i );
/**Removes the point with the number i from the triangulation*/
void removePoint( int i );
/**Sets the behaviour of the triangulation in case of crossing forced lines*/
virtual void setForcedCrossBehaviour( Triangulation::forcedCrossBehaviour b );
/**Sets the color of the normal edges*/
virtual void setEdgeColor( int r, int g, int b );
/**Sets the color of the forced edges*/
virtual void setForcedEdgeColor( int r, int g, int b );
/**Sets the color of the breaklines*/
virtual void setBreakEdgeColor( int r, int g, int b );
/**Sets an interpolator object*/
void setTriangleInterpolator( TriangleInterpolator* interpolator );
/**Eliminates the horizontal triangles by swapping or by insertion of new points*/
void eliminateHorizontalTriangles();
/**Adds points to make the triangles better shaped (algorithm of ruppert)*/
virtual void ruppertRefinement();
/**Returns true, if the point with coordinates x and y is inside the convex hull and false otherwise*/
bool pointInside( double x, double y );
/**Reads the dual edge structure of a taff file*/
//bool readFromTAFF(QString fileName);
/**Saves the dual edge structure to a taff file*/
//bool saveToTAFF(QString fileName) const;
/**Swaps the edge which is closest to the point with x and y coordinates (if this is possible)*/
virtual bool swapEdge( double x, double y );
/**Returns a value list with the numbers of the four points, which would be affected by an edge swap. This function is e.g. needed by NormVecDecorator to know the points, for which the normals have to be recalculated. The returned ValueList has to be deleted by the code which calls the method*/
virtual QList<int>* getPointsAroundEdge( double x, double y );
/**Saves the triangulation as a (line) shapefile
@return true in case of success*/
virtual bool saveAsShapefile( const QString& fileName ) const;

protected:
/**inserts an edge and makes sure, everything is ok with the storage of the edge. The number of the HalfEdge is returned*/
unsigned int insertEdge( int dual, int next, int point, bool mbreak, bool forced );
/**inserts a forced segment between the points with the numbers p1 and p2 into the triangulation and returns the number of a HalfEdge belonging to this forced edge or -100 in case of failure*/
int insertForcedSegment( int p1, int p2, bool breakline );
/**Returns the number of an edge which points to the point with number 'point' or -1 if there is an error*/
int baseEdgeOfPoint( int point );
/**returns the number of a HalfEdge from a triangle in which 'point' is in. If the number -10 is returned, this means, that 'point' is outside the convex hull. If -5 is returned, then numerical problems with the leftOfTest occured (and the value of the possible edge is stored in the variable 'mUnstableEdge'. -20 means, that the inserted point is exactly on an edge (the number is stored in the variable 'mEdgeWithPoint'). -25 means, that the point is already in the triangulation (the number of the point is stored in the member 'mTwiceInsPoint'. If -100 is returned, this means that something else went wrong*/
int baseEdgeOfTriangle( Point3D* point );
/**Checks, if 'edge' has to be swapped because of the empty circle criterion. If so, doSwap(...) is called.*/
bool checkSwap( unsigned int edge );
/**Swaps 'edge' and test recursively for other swaps (delaunay criterion)*/
void doSwap( unsigned int edge );
/**Swaps 'edge' and does no recursiv testing*/
void doOnlySwap( unsigned int edge );
/**Returns true, if it is possible to swap an edge, otherwise false(concave quad or edge on (or outside) the convex hull)*/
bool swapPossible( unsigned int edge );
/**divides a polygon in a triangle and two polygons and calls itself recursively for these two polygons. 'poly' is a pointer to a list with the numbers of the edges of the polygon, 'free' is a pointer to a list of free halfedges, and 'mainedge' is the number of the edge, towards which the new triangle is inserted. Mainedge has to be the same as poly->begin(), otherwise the recursion does not work*/
void triangulatePolygon( QList<int>* poly, QList<int>* free, int mainedge );
/**Tests, if the bounding box of the halfedge with index i intersects the specified bounding box. The main purpose for this method is the drawing of the triangulation*/
bool halfEdgeBBoxTest( int edge, double xlowleft, double ylowleft, double xupright, double yupright ) const;
/**Calculates the minimum angle, which would be present, if the specified halfedge would be swapped*/
double swapMinAngle( int edge ) const;
/**Inserts a new point on the halfedge with number 'edge'. The position can have a value from 0 to 1 (e.g. 0.5 would be in the middle). The return value is the number of the new inserted point. tin is the triangulation, which should be used to calculate the elevation of the inserted point*/
int splitHalfEdge( int edge, float position );
/**Returns true, if a half edge is on the convex hull and false otherwise*/
bool edgeOnConvexHull( int edge );
/**Function needed for the ruppert algorithm. Tests, if point is in the circle through both endpoints of edge and the endpoint of edge->dual->next->point. If so, the function calls itself recursively for edge->next and edge->next->next. Stops, if it finds a forced edge or a convex hull edge*/
void evaluateInfluenceRegion( Point3D* point, int edge, QSet<int> &set );
};

0 comments on commit ff41bec

Please sign in to comment.
You can’t perform that action at this time.