Skip to content
Permalink
Browse files

Spell check 'mitre' -> 'miter' (i.e. use en-us variation)

  • Loading branch information
nyalldawson committed Aug 7, 2017
1 parent 75a372c commit 4ab4a1fcad75a87d2e5cb26f943f7e97edc38c7d
Showing with 166 additions and 164 deletions.
  1. +7 −7 python/core/geometry/qgsgeometry.sip
  2. +2 −2 python/core/geometry/qgsgeometryengine.sip
  3. +6 −6 python/plugins/processing/algs/help/qgis.yaml
  4. +3 −3 python/plugins/processing/algs/qgis/Buffer.py
  5. +5 −5 python/plugins/processing/algs/qgis/FixedDistanceBuffer.py
  6. +5 −5 python/plugins/processing/algs/qgis/OffsetLine.py
  7. +5 −5 python/plugins/processing/algs/qgis/SingleSidedBuffer.py
  8. +5 −5 python/plugins/processing/algs/qgis/VariableDistanceBuffer.py
  9. +2 −2 python/plugins/processing/tests/testdata/expected/{buffer_polys_mitre.gfs → buffer_polys_miter.gfs}
  10. +12 −12 python/plugins/processing/tests/testdata/expected/{buffer_polys_mitre.gml → buffer_polys_miter.gml}
  11. +2 −2 python/plugins/processing/tests/testdata/expected/{line_offset_mitre.gfs → line_offset_miter.gfs}
  12. +14 −14 python/plugins/processing/tests/testdata/expected/{line_offset_mitre.gml → line_offset_miter.gml}
  13. +2 −2 ...tests/testdata/expected/{single_sided_buffer_line_mitre.gfs → single_sided_buffer_line_miter.gfs}
  14. +14 −14 ...tests/testdata/expected/{single_sided_buffer_line_mitre.gml → single_sided_buffer_line_miter.gml}
  15. +19 −19 python/plugins/processing/tests/testdata/qgis_algorithm_tests.yaml
  16. +2 −2 resources/function_help/json/offset_curve
  17. +2 −2 resources/function_help/json/single_sided_buffer
  18. +1 −0 scripts/spell_check/.agignore
  19. +1 −0 scripts/spell_check/spelling.dat
  20. +1 −1 src/analysis/vector/qgsgeometryanalyzer.cpp
  21. +2 −2 src/app/qgsmaptooloffsetcurve.cpp
  22. +1 −1 src/app/qgsoptions.cpp
  23. +4 −4 src/core/dxf/qgsdxfexport.cpp
  24. +6 −6 src/core/expression/qgsexpressionfunction.cpp
  25. +8 −8 src/core/geometry/qgsgeometry.cpp
  26. +7 −7 src/core/geometry/qgsgeometry.h
  27. +2 −2 src/core/geometry/qgsgeometryengine.h
  28. +6 −6 src/core/geometry/qgsgeos.cpp
  29. +5 −5 src/core/geometry/qgsgeos.h
  30. +4 −4 src/core/processing/qgsnativealgorithms.cpp
  31. +6 −6 src/core/symbology/qgssymbollayerutils.cpp
  32. +1 −1 src/plugins/geometry_checker/checks/qgsgeometrygapcheck.cpp
  33. +1 −1 tests/code_layout/acceptable_missing_doc.py
  34. +2 −2 tests/src/core/testqgsexpression.cpp
  35. +1 −1 tests/src/python/test_qgsgeometry.py
@@ -618,7 +618,7 @@ Test for containment of a point (uses GEOS)
enum JoinStyle
{
JoinStyleRound,
JoinStyleMitre,
JoinStyleMiter,
JoinStyleBevel,
};

@@ -629,40 +629,40 @@ of segments used to approximate curves *
:rtype: QgsGeometry
%End

QgsGeometry buffer( double distance, int segments, EndCapStyle endCapStyle, JoinStyle joinStyle, double mitreLimit ) const;
QgsGeometry buffer( double distance, int segments, EndCapStyle endCapStyle, JoinStyle joinStyle, double miterLimit ) const;
%Docstring
Returns a buffer region around the geometry, with additional style options.
\param distance buffer distance
\param segments for round joins, number of segments to approximate quarter-circle
\param endCapStyle end cap style
\param joinStyle join style for corners in geometry
\param mitreLimit limit on the mitre ratio used for very sharp corners (JoinStyleMitre only)
\param miterLimit limit on the miter ratio used for very sharp corners (JoinStyleMiter only)
.. versionadded:: 2.4
:rtype: QgsGeometry
%End

QgsGeometry offsetCurve( double distance, int segments, JoinStyle joinStyle, double mitreLimit ) const;
QgsGeometry offsetCurve( double distance, int segments, JoinStyle joinStyle, double miterLimit ) const;
%Docstring
Returns an offset line at a given distance and side from an input line.
\param distance buffer distance
\param segments for round joins, number of segments to approximate quarter-circle
\param joinStyle join style for corners in geometry
\param mitreLimit limit on the mitre ratio used for very sharp corners (JoinStyleMitre only)
\param miterLimit limit on the miter ratio used for very sharp corners (JoinStyleMiter only)
.. versionadded:: 2.4
:rtype: QgsGeometry
%End

QgsGeometry singleSidedBuffer( double distance, int segments, BufferSide side,
JoinStyle joinStyle = JoinStyleRound,
double mitreLimit = 2.0 ) const;
double miterLimit = 2.0 ) const;
%Docstring
Returns a single sided buffer for a (multi)line geometry. The buffer is only
applied to one side of the line.
\param distance buffer distance
\param segments for round joins, number of segments to approximate quarter-circle
\param side side of geometry to buffer
\param joinStyle join style for corners
\param mitreLimit limit on the mitre ratio used for very sharp corners
\param miterLimit limit on the miter ratio used for very sharp corners
:return: buffered geometry, or an empty geometry if buffer could not be
calculated
.. versionadded:: 3.0
@@ -50,7 +50,7 @@ class QgsGeometryEngine
%Docstring
:rtype: QgsAbstractGeometry
%End
virtual QgsAbstractGeometry *buffer( double distance, int segments, int endCapStyle, int joinStyle, double mitreLimit, QString *errorMsg = 0 ) const = 0 /Factory/;
virtual QgsAbstractGeometry *buffer( double distance, int segments, int endCapStyle, int joinStyle, double miterLimit, QString *errorMsg = 0 ) const = 0 /Factory/;
%Docstring
:rtype: QgsAbstractGeometry
%End
@@ -170,7 +170,7 @@ class QgsGeometryEngine
:rtype: int
%End

virtual QgsAbstractGeometry *offsetCurve( double distance, int segments, int joinStyle, double mitreLimit, QString *errorMsg = 0 ) const = 0 /Factory/;
virtual QgsAbstractGeometry *offsetCurve( double distance, int segments, int joinStyle, double miterLimit, QString *errorMsg = 0 ) const = 0 /Factory/;
%Docstring
:rtype: QgsAbstractGeometry
%End
@@ -218,9 +218,9 @@ qgis:fixeddistancebuffer: >

The end cap style parameter controls how line endings are handled in the buffer.

The join style parameter specifies whether round, mitre or beveled joins should be used when offsetting corners in a line.
The join style parameter specifies whether round, miter or beveled joins should be used when offsetting corners in a line.

The mitre limit parameter is only applicable for mitre join styles, and controls the maximum distance from the offset curve to use when creating a mitred join.
The miter limit parameter is only applicable for miter join styles, and controls the maximum distance from the offset curve to use when creating a mitered join.

qgis:fixgeometries: >
This algorithm attempts to create a valid representation of a given invalid geometry without losing any of the input vertices. Already-valid geometries are returned without further intervention. Always outputs multi-geometry layer.
@@ -334,9 +334,9 @@ qgis:offsetline: >

The segments parameter controls the number of line segments to use to approximate a quarter circle when creating rounded offsets.

The join style parameter specifies whether round, mitre or beveled joins should be used when offsetting corners in a line.
The join style parameter specifies whether round, miter or beveled joins should be used when offsetting corners in a line.

The mitre limit parameter is only applicable for mitre join styles, and controls the maximum distance from the offset curve to use when creating a mitred join.
The miter limit parameter is only applicable for miter join styles, and controls the maximum distance from the offset curve to use when creating a mitered join.

qgis:orientedminimumboundingbox: >
This algorithm takes a vector layer and generate a new one with the minimum rectangle that covers all the input features.
@@ -537,9 +537,9 @@ qgis:singlesidedbuffer: >

The segments parameter controls the number of line segments to use to approximate a quarter circle when creating rounded buffers.

The join style parameter specifies whether round, mitre or beveled joins should be used when buffering corners in a line.
The join style parameter specifies whether round, miter or beveled joins should be used when buffering corners in a line.

The mitre limit parameter is only applicable for mitre join styles, and controls the maximum distance from the buffer to use when creating a mitred join.
The miter limit parameter is only applicable for miter join styles, and controls the maximum distance from the buffer to use when creating a mitered join.

qgis:smoothgeometry: >
This algorithm smooths the geometries in a line or polygon layer. It creates a new layer with the same features as the ones in the input layer, but with geometries containing a higher number of vertices and corners in the geometries smoothed out.
@@ -32,7 +32,7 @@


def buffering(feedback, context, sink, distance, field, useField, source, dissolve, segments, endCapStyle=1,
joinStyle=1, mitreLimit=2):
joinStyle=1, miterLimit=2):

if useField:
field = source.fields().lookupField(field)
@@ -62,7 +62,7 @@ def buffering(feedback, context, sink, distance, field, useField, source, dissol

inGeom = inFeat.geometry()

buffered_geometries.append(inGeom.buffer(float(value), segments, endCapStyle, joinStyle, mitreLimit))
buffered_geometries.append(inGeom.buffer(float(value), segments, endCapStyle, joinStyle, miterLimit))

current += 1
feedback.setProgress(int(current * total))
@@ -86,7 +86,7 @@ def buffering(feedback, context, sink, distance, field, useField, source, dissol
value = distance
inGeom = inFeat.geometry()
outFeat = QgsFeature()
outGeom = inGeom.buffer(float(value), segments, endCapStyle, joinStyle, mitreLimit)
outGeom = inGeom.buffer(float(value), segments, endCapStyle, joinStyle, miterLimit)
outFeat.setGeometry(outGeom)
outFeat.setAttributes(attrs)
sink.addFeature(outFeat, QgsFeatureSink.FastInsert)
@@ -54,7 +54,7 @@ class FixedDistanceBuffer(QgisAlgorithm):
DISSOLVE = 'DISSOLVE'
END_CAP_STYLE = 'END_CAP_STYLE'
JOIN_STYLE = 'JOIN_STYLE'
MITRE_LIMIT = 'MITRE_LIMIT'
MITER_LIMIT = 'MITER_LIMIT'

def icon(self):
return QIcon(os.path.join(pluginPath, 'images', 'ftools', 'buffer.png'))
@@ -83,14 +83,14 @@ def initAlgorithm(self, config=None):
self.tr('End cap style'),
options=self.end_cap_styles, defaultValue=0))
self.join_styles = [self.tr('Round'),
'Mitre',
'Miter',
'Bevel']
self.addParameter(QgsProcessingParameterEnum(
self.JOIN_STYLE,
self.tr('Join style'),
options=self.join_styles, defaultValue=0))
self.addParameter(QgsProcessingParameterNumber(self.MITRE_LIMIT,
self.tr('Mitre limit'), minValue=0, defaultValue=2))
self.addParameter(QgsProcessingParameterNumber(self.MITER_LIMIT,
self.tr('Miter limit'), minValue=0, defaultValue=2))

self.addParameter(QgsProcessingParameterFeatureSink(self.OUTPUT, self.tr('Buffer'), QgsProcessing.TypeVectorPolygon))

@@ -108,7 +108,7 @@ def processAlgorithm(self, parameters, context, feedback):
segments = self.parameterAsInt(parameters, self.SEGMENTS, context)
end_cap_style = self.parameterAsEnum(parameters, self.END_CAP_STYLE, context) + 1
join_style = self.parameterAsEnum(parameters, self.JOIN_STYLE, context) + 1
miter_limit = self.parameterAsDouble(parameters, self.MITRE_LIMIT, context)
miter_limit = self.parameterAsDouble(parameters, self.MITER_LIMIT, context)

(sink, dest_id) = self.parameterAsSink(parameters, self.OUTPUT, context,
source.fields(), QgsWkbTypes.Polygon, source.sourceCrs())
@@ -45,7 +45,7 @@ class OffsetLine(QgisFeatureBasedAlgorithm):
DISTANCE = 'DISTANCE'
SEGMENTS = 'SEGMENTS'
JOIN_STYLE = 'JOIN_STYLE'
MITRE_LIMIT = 'MITRE_LIMIT'
MITER_LIMIT = 'MITER_LIMIT'

def group(self):
return self.tr('Vector geometry tools')
@@ -68,14 +68,14 @@ def initParameters(self, config=None):
type=QgsProcessingParameterNumber.Integer,
minValue=1, defaultValue=8))
self.join_styles = [self.tr('Round'),
'Mitre',
'Miter',
'Bevel']
self.addParameter(QgsProcessingParameterEnum(
self.JOIN_STYLE,
self.tr('Join style'),
options=self.join_styles))
self.addParameter(QgsProcessingParameterNumber(self.MITRE_LIMIT,
self.tr('Mitre limit'), type=QgsProcessingParameterNumber.Double,
self.addParameter(QgsProcessingParameterNumber(self.MITER_LIMIT,
self.tr('Miter limit'), type=QgsProcessingParameterNumber.Double,
minValue=1, defaultValue=2))

def name(self):
@@ -94,7 +94,7 @@ def prepareAlgorithm(self, parameters, context, feedback):
self.distance = self.parameterAsDouble(parameters, self.DISTANCE, context)
self.segments = self.parameterAsInt(parameters, self.SEGMENTS, context)
self.join_style = self.parameterAsEnum(parameters, self.JOIN_STYLE, context) + 1
self.miter_limit = self.parameterAsDouble(parameters, self.MITRE_LIMIT, context)
self.miter_limit = self.parameterAsDouble(parameters, self.MITER_LIMIT, context)
return True

def processFeature(self, feature, feedback):
@@ -40,7 +40,7 @@ class SingleSidedBuffer(QgisFeatureBasedAlgorithm):
SIDE = 'SIDE'
SEGMENTS = 'SEGMENTS'
JOIN_STYLE = 'JOIN_STYLE'
MITRE_LIMIT = 'MITRE_LIMIT'
MITER_LIMIT = 'MITER_LIMIT'

def group(self):
return self.tr('Vector geometry tools')
@@ -55,7 +55,7 @@ def __init__(self):
self.sides = [self.tr('Left'),
'Right']
self.join_styles = [self.tr('Round'),
'Mitre',
'Miter',
'Bevel']

def initParameters(self, config=None):
@@ -74,8 +74,8 @@ def initParameters(self, config=None):
self.JOIN_STYLE,
self.tr('Join style'),
options=self.join_styles))
self.addParameter(QgsProcessingParameterNumber(self.MITRE_LIMIT,
self.tr('Mitre limit'), minValue=1, defaultValue=2))
self.addParameter(QgsProcessingParameterNumber(self.MITER_LIMIT,
self.tr('Miter limit'), minValue=1, defaultValue=2))

def name(self):
return 'singlesidedbuffer'
@@ -100,7 +100,7 @@ def prepareAlgorithm(self, parameters, context, feedback):
self.side = QgsGeometry.SideLeft
else:
self.side = QgsGeometry.SideRight
self.miter_limit = self.parameterAsDouble(parameters, self.MITRE_LIMIT, context)
self.miter_limit = self.parameterAsDouble(parameters, self.MITER_LIMIT, context)
return True

def processFeature(self, feature, feedback):
@@ -53,7 +53,7 @@ class VariableDistanceBuffer(QgisAlgorithm):
DISSOLVE = 'DISSOLVE'
END_CAP_STYLE = 'END_CAP_STYLE'
JOIN_STYLE = 'JOIN_STYLE'
MITRE_LIMIT = 'MITRE_LIMIT'
MITER_LIMIT = 'MITER_LIMIT'

def icon(self):
return QIcon(os.path.join(pluginPath, 'images', 'ftools', 'buffer.png'))
@@ -83,14 +83,14 @@ def initAlgorithm(self, config=None):
self.tr('End cap style'),
options=self.end_cap_styles, defaultValue=0))
self.join_styles = [self.tr('Round'),
'Mitre',
'Miter',
'Bevel']
self.addParameter(QgsProcessingParameterEnum(
self.JOIN_STYLE,
self.tr('Join style'),
options=self.join_styles, defaultValue=0))
self.addParameter(QgsProcessingParameterNumber(self.MITRE_LIMIT,
self.tr('Mitre limit'), minValue=0, defaultValue=2))
self.addParameter(QgsProcessingParameterNumber(self.MITER_LIMIT,
self.tr('Miter limit'), minValue=0, defaultValue=2))

self.addParameter(
QgsProcessingParameterFeatureSink(self.OUTPUT, self.tr('Buffer'), QgsProcessing.TypeVectorPolygon))
@@ -108,7 +108,7 @@ def processAlgorithm(self, parameters, context, feedback):
segments = self.parameterAsInt(parameters, self.SEGMENTS, context)
end_cap_style = self.parameterAsEnum(parameters, self.END_CAP_STYLE, context) + 1
join_style = self.parameterAsEnum(parameters, self.JOIN_STYLE, context) + 1
miter_limit = self.parameterAsDouble(parameters, self.MITRE_LIMIT, context)
miter_limit = self.parameterAsDouble(parameters, self.MITER_LIMIT, context)

field = self.parameterAsString(parameters, self.FIELD, context)

@@ -1,7 +1,7 @@
<GMLFeatureClassList>
<GMLFeatureClass>
<Name>buffer_polys_mitre</Name>
<ElementPath>buffer_polys_mitre</ElementPath>
<Name>buffer_polys_miter</Name>
<ElementPath>buffer_polys_miter</ElementPath>
<GeometryType>3</GeometryType>
<SRSName>EPSG:4326</SRSName>
<DatasetSpecificInfo>
@@ -12,47 +12,47 @@
</gml:boundedBy>

<gml:featureMember>
<ogr:buffer_polys_mitre fid="polys.0">
<ogr:buffer_polys_miter fid="polys.0">
<ogr:geometryProperty><gml:Polygon srsName="EPSG:4326"><gml:outerBoundaryIs><gml:LinearRing><gml:coordinates>-2,-2 -2,4 4,4 4,1 3,1 3,-2 -2,-2</gml:coordinates></gml:LinearRing></gml:outerBoundaryIs></gml:Polygon></ogr:geometryProperty>
<ogr:name>aaaaa</ogr:name>
<ogr:intval>33</ogr:intval>
<ogr:floatval>44.123456</ogr:floatval>
</ogr:buffer_polys_mitre>
</ogr:buffer_polys_miter>
</gml:featureMember>
<gml:featureMember>
<ogr:buffer_polys_mitre fid="polys.1">
<ogr:buffer_polys_miter fid="polys.1">
<ogr:geometryProperty><gml:Polygon srsName="EPSG:4326"><gml:outerBoundaryIs><gml:LinearRing><gml:coordinates>5.0,6.414213562373096 7.93754927857421,3.451405886594554 7.757968851470933,3.017860383945075 2.242031148529061,3.017860383945087 2.062450721425788,3.451405886594566 5.0,6.414213562373096</gml:coordinates></gml:LinearRing></gml:outerBoundaryIs></gml:Polygon></ogr:geometryProperty>
<ogr:name>Aaaaa</ogr:name>
<ogr:intval>-33</ogr:intval>
<ogr:floatval>0</ogr:floatval>
</ogr:buffer_polys_mitre>
</ogr:buffer_polys_miter>
</gml:featureMember>
<gml:featureMember>
<ogr:buffer_polys_mitre fid="polys.2">
<ogr:buffer_polys_miter fid="polys.2">
<ogr:geometryProperty><gml:Polygon srsName="EPSG:4326"><gml:outerBoundaryIs><gml:LinearRing><gml:coordinates>1,4 1,7 4,7 4,4 1,4</gml:coordinates></gml:LinearRing></gml:outerBoundaryIs></gml:Polygon></ogr:geometryProperty>
<ogr:name>bbaaa</ogr:name>
<ogr:floatval>0.123</ogr:floatval>
</ogr:buffer_polys_mitre>
</ogr:buffer_polys_miter>
</gml:featureMember>
<gml:featureMember>
<ogr:buffer_polys_mitre fid="polys.3">
<ogr:buffer_polys_miter fid="polys.3">
<ogr:geometryProperty><gml:Polygon srsName="EPSG:4326"><gml:outerBoundaryIs><gml:LinearRing><gml:coordinates>5,2 11,2 11,-4 5,-4 5,2</gml:coordinates></gml:LinearRing></gml:outerBoundaryIs></gml:Polygon></ogr:geometryProperty>
<ogr:name>ASDF</ogr:name>
<ogr:intval>0</ogr:intval>
</ogr:buffer_polys_mitre>
</ogr:buffer_polys_miter>
</gml:featureMember>
<gml:featureMember>
<ogr:buffer_polys_mitre fid="polys.4">
<ogr:buffer_polys_miter fid="polys.4">
<ogr:intval>120</ogr:intval>
<ogr:floatval>-100291.43213</ogr:floatval>
</ogr:buffer_polys_mitre>
</ogr:buffer_polys_miter>
</gml:featureMember>
<gml:featureMember>
<ogr:buffer_polys_mitre fid="polys.5">
<ogr:buffer_polys_miter fid="polys.5">
<ogr:geometryProperty><gml:Polygon srsName="EPSG:4326"><gml:outerBoundaryIs><gml:LinearRing><gml:coordinates>3.162277660168381,3.0 7.0,1.720759220056127 7.0,-4.618033988749896 1.0,-1.618033988749894 1,3 3.162277660168381,3.0</gml:coordinates></gml:LinearRing></gml:outerBoundaryIs></gml:Polygon></ogr:geometryProperty>
<ogr:name>elim</ogr:name>
<ogr:intval>2</ogr:intval>
<ogr:floatval>3.33</ogr:floatval>
</ogr:buffer_polys_mitre>
</ogr:buffer_polys_miter>
</gml:featureMember>
</ogr:FeatureCollection>
@@ -1,7 +1,7 @@
<GMLFeatureClassList>
<GMLFeatureClass>
<Name>line_offset_mitre</Name>
<ElementPath>line_offset_mitre</ElementPath>
<Name>line_offset_miter</Name>
<ElementPath>line_offset_miter</ElementPath>
<GeometryType>2</GeometryType>
<SRSName>EPSG:4326</SRSName>
<DatasetSpecificInfo>

0 comments on commit 4ab4a1f

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