Nyall Dawson 4b6f3a3ee5 [FEATURE][processing] New algorithm to orthagonalize geometries
Adds a new QgsGeometry::orthagonalize method which tries to make
angles in geometries either right angles or straight lines

Also adds a processing algorithm exposing this feature.
2016-12-09 09:41:56 +10:00

39 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.173559243727069</gml:X><gml:Y>-0.9643318490464938</gml:Y></gml:coord>
<gml:coord><gml:X>0.687043085460245</gml:X><gml:Y>1.126027868738941</gml:Y></gml:coord>
</gml:Box>
</gml:boundedBy>
<gml:featureMember>
<ogr:orthagonal_lines fid="lines_to_orth.0">
<ogr:geometryProperty><gml:LineString srsName="EPSG:4326"><gml:coordinates>-1.074456310482982,-0.916199588298252 0.048128551164703,-0.964331848922704 0.062280009502849,-0.634278538511395 0.687043085460245,-0.661066056858086</gml:coordinates></gml:LineString></ogr:geometryProperty>
<ogr:intval>0</ogr:intval>
</ogr:orthagonal_lines>
</gml:featureMember>
<gml:featureMember>
<ogr:orthagonal_lines fid="lines_to_orth.1">
<ogr:geometryProperty><gml:LineString srsName="EPSG:4326"><gml:coordinates>-1.074456310482982,-0.916199588298252 0.048128551278313,-0.964331849046494 0.062280009603929,-0.634278538621531 0.687043085460245,-0.661066056858086</gml:coordinates></gml:LineString></ogr:geometryProperty>
<ogr:intval>1</ogr:intval>
</ogr:orthagonal_lines>
</gml:featureMember>
<gml:featureMember>
<ogr:orthagonal_lines fid="lines_to_orth.2">
<ogr:geometryProperty><gml:LineString srsName="EPSG:4326"><gml:coordinates>-1.027472879898916,-0.278453309909787 -0.290913154921217,0.321316751857768 0.531737966482446,-0.156968783842037</gml:coordinates></gml:LineString></ogr:geometryProperty>
<ogr:intval>2</ogr:intval>
</ogr:orthagonal_lines>
</gml:featureMember>
<gml:featureMember>
<ogr:orthagonal_lines fid="lines_to_orth.3">
<ogr:geometryProperty><gml:LineString srsName="EPSG:4326"><gml:coordinates>-1.1679544331119,0.483380445772577 -1.173559243727069,1.112790863745332 0.312933083255933,1.126027868738941 0.319179574408909,0.42455808473015 -1.065182334531776,0.412230531370954</gml:coordinates></gml:LineString></ogr:geometryProperty>
<ogr:intval>3</ogr:intval>
</ogr:orthagonal_lines>
</gml:featureMember>
</ogr:FeatureCollection>