Nyall Dawson 4d60d0cdb5 [FEATURE] Add option to QgsGeometry::smooth to not smooth
segments shorter than a certain threshold or sharp corners
with an angle exceeding a threshold

Expose the angle threshold to processing smooth algorithm

Also:
- optimise QgsGeometry::smooth for new geometry classes
- Fix smooth does not work with geometries containing Z/M
2016-09-03 08:31:33 +10:00

49 lines
2.3 KiB
XML

<?xml version="1.0" encoding="utf-8" ?>
<ogr:FeatureCollection
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation=""
xmlns:ogr="http://ogr.maptools.org/"
xmlns:gml="http://www.opengis.net/gml">
<gml:boundedBy>
<gml:Box>
<gml:coord><gml:X>-1</gml:X><gml:Y>-3</gml:Y></gml:coord>
<gml:coord><gml:X>11</gml:X><gml:Y>5</gml:Y></gml:coord>
</gml:Box>
</gml:boundedBy>
<gml:featureMember>
<ogr:smoothed_lines fid="lines.0">
<ogr:geometryProperty><gml:LineString srsName="EPSG:4326"><gml:coordinates>6,2 8.25,2.0 9.0,2.25 9.0,2.75 9.5,3.5 11,5</gml:coordinates></gml:LineString></ogr:geometryProperty>
</ogr:smoothed_lines>
</gml:featureMember>
<gml:featureMember>
<ogr:smoothed_lines fid="lines.1">
<ogr:geometryProperty><gml:LineString srsName="EPSG:4326"><gml:coordinates>-1,-1 1,-1</gml:coordinates></gml:LineString></ogr:geometryProperty>
</ogr:smoothed_lines>
</gml:featureMember>
<gml:featureMember>
<ogr:smoothed_lines fid="lines.2">
<ogr:geometryProperty><gml:LineString srsName="EPSG:4326"><gml:coordinates>2,0 2.0,1.5 2.25,2.0 2.75,2.0 3.0,2.25 3,3</gml:coordinates></gml:LineString></ogr:geometryProperty>
</ogr:smoothed_lines>
</gml:featureMember>
<gml:featureMember>
<ogr:smoothed_lines fid="lines.3">
<ogr:geometryProperty><gml:LineString srsName="EPSG:4326"><gml:coordinates>3,1 5,1</gml:coordinates></gml:LineString></ogr:geometryProperty>
</ogr:smoothed_lines>
</gml:featureMember>
<gml:featureMember>
<ogr:smoothed_lines fid="lines.4">
<ogr:geometryProperty><gml:LineString srsName="EPSG:4326"><gml:coordinates>7,-3 10,-3</gml:coordinates></gml:LineString></ogr:geometryProperty>
</ogr:smoothed_lines>
</gml:featureMember>
<gml:featureMember>
<ogr:smoothed_lines fid="lines.5">
<ogr:geometryProperty><gml:LineString srsName="EPSG:4326"><gml:coordinates>6,-3 10,1</gml:coordinates></gml:LineString></ogr:geometryProperty>
</ogr:smoothed_lines>
</gml:featureMember>
<gml:featureMember>
<ogr:smoothed_lines fid="lines.6">
</ogr:smoothed_lines>
</gml:featureMember>
</ogr:FeatureCollection>