Skip to content
Permalink
Browse files

Use Cartesian instead of cartesian

  • Loading branch information
DelazJ authored and m-kuhn committed Jul 13, 2017
1 parent cfbed91 commit 99ea2e8e8fc2034d8e9bd7565ce858703e72a50a
@@ -270,9 +270,9 @@ expression() instead.
Sets the geometry calculator used for distance and area calculations in expressions.
(used by $length, $area and $perimeter functions only). By default, no geometry
calculator is set and all distance and area calculations are performed using simple
cartesian methods (ie no ellipsoidal calculations).
Cartesian methods (ie no ellipsoidal calculations).
\param calc geometry calculator. Ownership is not transferred. Set to a None to force
cartesian calculations.
Cartesian calculations.
.. seealso:: geomCalculator()
%End

@@ -336,7 +336,7 @@ Returns true if WKB of the geometry is of WKBMulti* type

double sqrDistToVertexAt( QgsPointXY &point /In/, int atVertex ) const;
%Docstring
Returns the squared cartesian distance between the given point
Returns the squared Cartesian distance between the given point
to the given vertex index (vertex at the given position number,
ring and item (first number is index 0))
:rtype: float
@@ -363,7 +363,7 @@ Returns true if WKB of the geometry is of WKBMulti* type
Searches for the closest vertex in this geometry to the given point.
\param point Specifiest the point for search
\param atVertex Receives index of the closest vertex
:return: The squared cartesian distance is also returned in sqrDist, negative number on error
:return: The squared Cartesian distance is also returned in sqrDist, negative number on error
:rtype: float
%End

@@ -376,7 +376,7 @@ Returns true if WKB of the geometry is of WKBMulti* type
before the closest segment is always afterVertex - 1
\param leftOf Out: Returns if the point lies on the left of right side of the segment ( < 0 means left, > 0 means right )
\param epsilon epsilon for segment snapping
:return: The squared cartesian distance is also returned in sqrDist, negative number on error
:return: The squared Cartesian distance is also returned in sqrDist, negative number on error
:rtype: float
%End

@@ -19,7 +19,7 @@ class QgsDistanceArea

If a valid ellipsoid() has been set for the QgsDistanceArea, all calculations will be
performed using ellipsoidal algorithms (e.g. using Vincenty's formulas). If no
ellipsoid has been set, all calculations will be performed using cartesian
ellipsoid has been set, all calculations will be performed using Cartesian
formulas only. The behavior can be determined by calling willUseEllipsoid().

In order to perform accurate calculations, the source coordinate reference system
@@ -1,5 +1,5 @@
m.cogo
A simple utility for converting bearing and distance measurements to coordinates and vice versa. It assumes a cartesian coordinate system
A simple utility for converting bearing and distance measurements to coordinates and vice versa. It assumes a Cartesian coordinate system
Miscellaneous (m.*)
ParameterFile|input|Name of input file|False
OutputFile|output|Output text file
@@ -1123,6 +1123,7 @@ carrers:careers
Carribbean:Caribbean
Carribean:Caribbean
cartdridge:cartridge
cartesian:Cartesian
carthographer:cartographer
cartilege:cartilage
cartilidge:cartilage
@@ -306,7 +306,7 @@ void QgsMeasureDialog::updateUi()
if ( !mTool->canvas()->mapSettings().destinationCrs().isValid() )
{
// no CRS => no units, newb!
toolTip += "<br> * " + tr( "No map projection set, so area is calculated using cartesian calculations." );
toolTip += "<br> * " + tr( "No map projection set, so area is calculated using Cartesian calculations." );
toolTip += "<br> * " + tr( "Units are unknown." );
forceCartesian = true;
convertToDisplayUnits = false;
@@ -315,7 +315,7 @@ void QgsMeasureDialog::updateUi()
&& ( mAreaUnits == QgsUnitTypes::AreaSquareDegrees || mAreaUnits == QgsUnitTypes::AreaUnknownUnit ) )
{
//both source and destination units are degrees
toolTip += "<br> * " + tr( "Both project CRS (%1) and measured area are in degrees, so area is calculated using cartesian calculations in square degrees." ).arg(
toolTip += "<br> * " + tr( "Both project CRS (%1) and measured area are in degrees, so area is calculated using Cartesian calculations in square degrees." ).arg(
mTool->canvas()->mapSettings().destinationCrs().description() );
forceCartesian = true;
convertToDisplayUnits = false; //not required since we will be measuring in degrees
@@ -376,7 +376,7 @@ void QgsMeasureDialog::updateUi()
if ( !mTool->canvas()->mapSettings().destinationCrs().isValid() )
{
// no CRS => no units, newb!
toolTip += "<br> * " + tr( "No map projection set, so distance is calculated using cartesian calculations." );
toolTip += "<br> * " + tr( "No map projection set, so distance is calculated using Cartesian calculations." );
toolTip += "<br> * " + tr( "Units are unknown." );
forceCartesian = true;
convertToDisplayUnits = false;
@@ -385,7 +385,7 @@ void QgsMeasureDialog::updateUi()
&& mDistanceUnits == QgsUnitTypes::DistanceDegrees )
{
//both source and destination units are degrees
toolTip += "<br> * " + tr( "Both project CRS (%1) and measured length are in degrees, so distance is calculated using cartesian calculations in degrees." ).arg(
toolTip += "<br> * " + tr( "Both project CRS (%1) and measured length are in degrees, so distance is calculated using Cartesian calculations in degrees." ).arg(
mTool->canvas()->mapSettings().destinationCrs().description() );
forceCartesian = true;
convertToDisplayUnits = false; //not required since we will be measuring in degrees
@@ -488,7 +488,7 @@ void QgsMeasureDialog::updateUi()
double d = -1;
if ( forceCartesian )
{
//cartesian calculation forced
//Cartesian calculation forced
d = sqrt( p2.sqrDist( p1 ) );
mTotal += d;
}
@@ -270,9 +270,9 @@ class CORE_EXPORT QgsExpression
/** Sets the geometry calculator used for distance and area calculations in expressions.
* (used by $length, $area and $perimeter functions only). By default, no geometry
* calculator is set and all distance and area calculations are performed using simple
* cartesian methods (ie no ellipsoidal calculations).
* Cartesian methods (ie no ellipsoidal calculations).
* \param calc geometry calculator. Ownership is not transferred. Set to a nullptr to force
* cartesian calculations.
* Cartesian calculations.
* \see geomCalculator()
*/
void setGeomCalculator( const QgsDistanceArea *calc );
@@ -348,7 +348,7 @@ class CORE_EXPORT QgsGeometry
QgsPointXY vertexAt( int atVertex ) const;

/**
* Returns the squared cartesian distance between the given point
* Returns the squared Cartesian distance between the given point
* to the given vertex index (vertex at the given position number,
* ring and item (first number is index 0))
*/
@@ -370,7 +370,7 @@ class CORE_EXPORT QgsGeometry
* Searches for the closest vertex in this geometry to the given point.
* \param point Specifiest the point for search
* \param atVertex Receives index of the closest vertex
* \returns The squared cartesian distance is also returned in sqrDist, negative number on error
* \returns The squared Cartesian distance is also returned in sqrDist, negative number on error
*/
double closestVertexWithContext( const QgsPointXY &point, int &atVertex SIP_OUT ) const;

@@ -382,7 +382,7 @@ class CORE_EXPORT QgsGeometry
* before the closest segment is always afterVertex - 1
* \param leftOf Out: Returns if the point lies on the left of right side of the segment ( < 0 means left, > 0 means right )
* \param epsilon epsilon for segment snapping
* \returns The squared cartesian distance is also returned in sqrDist, negative number on error
* \returns The squared Cartesian distance is also returned in sqrDist, negative number on error
*/
#ifndef SIP_RUN
double closestSegmentWithContext( const QgsPointXY &point, QgsPointXY &minDistPoint, int &afterVertex, double *leftOf = nullptr, double epsilon = DEFAULT_SEGMENT_EPSILON ) const;
@@ -455,7 +455,7 @@ void QgsGeometryUtils::circleCenterRadius( const QgsPoint &pt1, const QgsPoint &
return;
}

// Using cartesian circumcenter eguations from page https://en.wikipedia.org/wiki/Circumscribed_circle
// Using Cartesian circumcenter eguations from page https://en.wikipedia.org/wiki/Circumscribed_circle
dx21 = pt2.x() - pt1.x();
dy21 = pt2.y() - pt1.y();
dx31 = pt3.x() - pt1.x();
@@ -356,7 +356,7 @@ double QgsDistanceArea::measureLineProjected( const QgsPointXY &p1, double dista
p2 = computeSpheroidProject( p1, distance, azimuth );
result = p1.distance( p2 );
}
else // cartesian coordinates
else // Cartesian coordinates
{
result = distance; // Avoid rounding errors when using meters [return as sent]
if ( sourceCrs().mapUnits() != QgsUnitTypes::DistanceMeters )
@@ -36,7 +36,7 @@ class QgsCurve;
*
* If a valid ellipsoid() has been set for the QgsDistanceArea, all calculations will be
* performed using ellipsoidal algorithms (e.g. using Vincenty's formulas). If no
* ellipsoid has been set, all calculations will be performed using cartesian
* ellipsoid has been set, all calculations will be performed using Cartesian
* formulas only. The behavior can be determined by calling willUseEllipsoid().
*
* In order to perform accurate calculations, the source coordinate reference system
@@ -129,7 +129,7 @@ class CORE_EXPORT QgsVectorFieldSymbolLayer: public QgsMarkerSymbolLayer
int mXIndex;
int mYIndex;

//Converts length/angle to cartesian x/y
//Converts length/angle to Cartesian x/y
void convertPolarToCartesian( double length, double angle, double &x, double &y ) const;
};

@@ -279,7 +279,7 @@
<item row="0" column="0">
<widget class="QCheckBox" name="mCheckBoxNoProjection">
<property name="toolTip">
<string>Use this option to treat all coordinates as cartesian coordinates in an unknown reference system.</string>
<string>Use this option to treat all coordinates as Cartesian coordinates in an unknown reference system.</string>
</property>
<property name="text">
<string>No projection (or unknown/non-Earth projection)</string>

0 comments on commit 99ea2e8

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