<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://ojwiki.soldin.de/index.php?action=history&amp;feed=atom&amp;title=Beanshell%3ARemoving_repeated_points_in_selected_layers_feature_geometries</id>
	<title>Beanshell:Removing repeated points in selected layers feature geometries - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://ojwiki.soldin.de/index.php?action=history&amp;feed=atom&amp;title=Beanshell%3ARemoving_repeated_points_in_selected_layers_feature_geometries"/>
	<link rel="alternate" type="text/html" href="https://ojwiki.soldin.de/index.php?title=Beanshell:Removing_repeated_points_in_selected_layers_feature_geometries&amp;action=history"/>
	<updated>2026-04-15T08:31:58Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.35.5</generator>
	<entry>
		<id>https://ojwiki.soldin.de/index.php?title=Beanshell:Removing_repeated_points_in_selected_layers_feature_geometries&amp;diff=208&amp;oldid=prev</id>
		<title>Mentaer at 00:02, 12 October 2009</title>
		<link rel="alternate" type="text/html" href="https://ojwiki.soldin.de/index.php?title=Beanshell:Removing_repeated_points_in_selected_layers_feature_geometries&amp;diff=208&amp;oldid=prev"/>
		<updated>2009-10-12T00:02:14Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left diff-editfont-monospace&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 00:02, 12 October 2009&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l5&quot; &gt;Line 5:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 5:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  // in selected layers feature geometries&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  // in selected layers feature geometries&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  // Michaël Michaud 22/10/2005&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  // Michaël Michaud 22/10/2005&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt;−&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  // Create a GeometryFactory to build new Geometries  &lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  // Create a GeometryFactory to build new Geometries  &lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  GeometryFactory gf = new GeometryFactory();&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  GeometryFactory gf = new GeometryFactory();&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Mentaer</name></author>
	</entry>
	<entry>
		<id>https://ojwiki.soldin.de/index.php?title=Beanshell:Removing_repeated_points_in_selected_layers_feature_geometries&amp;diff=207&amp;oldid=prev</id>
		<title>Mentaer: Created page with &#039;This scrit remove repeated points in every geometry of the selected layers.   {  // Script removing repeated points  // in selected layers feature geometries  // Michaël Michaud…&#039;</title>
		<link rel="alternate" type="text/html" href="https://ojwiki.soldin.de/index.php?title=Beanshell:Removing_repeated_points_in_selected_layers_feature_geometries&amp;diff=207&amp;oldid=prev"/>
		<updated>2009-10-11T23:59:58Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;#039;This scrit remove repeated points in every geometry of the selected layers.   {  // Script removing repeated points  // in selected layers feature geometries  // Michaël Michaud…&amp;#039;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;This scrit remove repeated points in every geometry of the selected layers.&lt;br /&gt;
&lt;br /&gt;
 {&lt;br /&gt;
 // Script removing repeated points&lt;br /&gt;
 // in selected layers feature geometries&lt;br /&gt;
 // Michaël Michaud 22/10/2005&lt;br /&gt;
&lt;br /&gt;
 // Create a GeometryFactory to build new Geometries &lt;br /&gt;
 GeometryFactory gf = new GeometryFactory();&lt;br /&gt;
 // Point filter (may be called by GeometryCollection filter)&lt;br /&gt;
 filter(Point geom) {return geom;}&lt;br /&gt;
 // LineString filter&lt;br /&gt;
 filter(LineString geom) {&lt;br /&gt;
   return gf.createLineString(CoordinateArrays.removeRepeatedPoints(geom.coordinates));&lt;br /&gt;
 }&lt;br /&gt;
 // Polygon filter&lt;br /&gt;
 filter(Polygon geom) {&lt;br /&gt;
   shell = gf.createLinearRing(CoordinateArrays.removeRepeatedPoints(geom.exteriorRing.coordinates));&lt;br /&gt;
   holes = new LinearRing[geom.numInteriorRing];&lt;br /&gt;
   for (int i = 0 ; i &amp;lt; geom.numInteriorRing ; i++) {&lt;br /&gt;
     hole[i] = CoordinateArrays.removeRepeatedPoints(geom.getInteriorRingN(i).coordinates);&lt;br /&gt;
   }&lt;br /&gt;
   return gf.createPolygon(shell, holes);&lt;br /&gt;
 }&lt;br /&gt;
 // GeometryCollection filter&lt;br /&gt;
 filter(GeometryCollection geom) {&lt;br /&gt;
   geoms = new Geometry[geom.numGeometries];&lt;br /&gt;
   for (int i = 0 ; i &amp;lt; geom.numGeometries ; i++) {&lt;br /&gt;
     geoms[i] = filter(geom.getGeometryN(i));&lt;br /&gt;
   }&lt;br /&gt;
   return gf.createGeometryCollection(geoms);&lt;br /&gt;
 }&lt;br /&gt;
 // Iterator over features of selected layer&lt;br /&gt;
 for (layer : wc.layerNamePanel.selectedLayers) {&lt;br /&gt;
   for (f : layer.featureCollectionWrapper.features) {&lt;br /&gt;
     f.setGeometry(filter(f.geometry));&lt;br /&gt;
   }&lt;br /&gt;
 }&lt;br /&gt;
 }&lt;/div&gt;</summary>
		<author><name>Mentaer</name></author>
	</entry>
</feed>