mirror of
				https://github.com/qgis/QGIS.git
				synced 2025-10-31 00:06:02 -04:00 
			
		
		
		
	Adds two new algorithms which expose QgsGeometry's methods for segmentizing curved geometries. "Segmentize by maximum distance": The segmentization is performed by specifying the maximum allowed offset distance between the original curve and the segmentized representation. "Segmentize by maximum angle": The segmentization is performed by specifying the maximum allowed radius angle between vertices on the straightened geometry (e.g the angle of the arc created from the original arc center to consective output vertices on the linearized geometry).
		
			
				
	
	
		
			27 lines
		
	
	
		
			2.1 KiB
		
	
	
	
		
			XML
		
	
	
	
	
	
			
		
		
	
	
			27 lines
		
	
	
		
			2.1 KiB
		
	
	
	
		
			XML
		
	
	
	
	
	
| <?xml version="1.0" encoding="utf-8" ?>
 | |
| <ogr:FeatureCollection
 | |
|      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
 | |
|      xsi:schemaLocation="http://ogr.maptools.org/ segmentize_by_angle.xsd"
 | |
|      xmlns:ogr="http://ogr.maptools.org/"
 | |
|      xmlns:gml="http://www.opengis.net/gml">
 | |
|   <gml:boundedBy>
 | |
|     <gml:Box>
 | |
|       <gml:coord><gml:X>-0.9875563570784498</gml:X><gml:Y>-3.019161406672679</gml:Y></gml:coord>
 | |
|       <gml:coord><gml:X>9.807504202322207</gml:X><gml:Y>4.303079673657821</gml:Y></gml:coord>
 | |
|     </gml:Box>
 | |
|   </gml:boundedBy>
 | |
|                                                                                              
 | |
|   <gml:featureMember>
 | |
|     <ogr:segmentize_by_angle fid="1">
 | |
|       <ogr:geometryProperty><gml:LineString srsName="EPSG:4326"><gml:coordinates>-0.98755635707845,-0.974075743913436 -0.696095751086827,0.344850591369106 -0.005888714481605,1.50594068665349 1.01349196457716,2.39215679681429 2.25929283346249,2.91416844211677 3.60593731102726,3.0193569100738 4.91768379222303,2.6971192154796 6.06230838593327,1.97993688007214</gml:coordinates></gml:LineString></ogr:geometryProperty>
 | |
|       <ogr:id>1</ogr:id>
 | |
|     </ogr:segmentize_by_angle>
 | |
|   </gml:featureMember>
 | |
|   <gml:featureMember>
 | |
|     <ogr:segmentize_by_angle fid="2">
 | |
|       <ogr:geometryProperty><gml:LineString srsName="EPSG:4326"><gml:coordinates>6.91442741208296,-3.01916140667268 6.32475035835957,-2.4284524156428 5.95800750896124,-1.67868190262791 5.8536814658075,-0.850568253126039 6.0230037052269,-0.033264075350454 6.44774542579607,0.68524174270488 7.08218001471432,1.22759669304234 7.85800585857777,1.53541222183353 8.69169952127193,1.57554969254374 9.49350766456267,1.34368800721371 9.74057664392659,1.88754171095694 9.80750420232221,2.48112458938787 9.68773977279365,3.06633943289311 9.39300535646221,3.58590805730082 8.95214822603083,3.98897743369522 8.40831748509891,4.23609695307115 7.81474082890195,4.30307967365782 7.22951485804922,4.18336962947338 6.70991884580703,3.88868349864743</gml:coordinates></gml:LineString></ogr:geometryProperty>
 | |
|       <ogr:id>2</ogr:id>
 | |
|     </ogr:segmentize_by_angle>
 | |
|   </gml:featureMember>
 | |
| </ogr:FeatureCollection>
 |