Revision: 6224 http://sourceforge.net/p/jump-pilot/code/6224 Author: michaudm Date: 2020-01-26 18:34:32 +0000 (Sun, 26 Jan 2020) Log Message: ----------- FR#265 : add a plugin to make line from ordered points
Modified Paths: -------------- core/trunk/ChangeLog core/trunk/scripts/default-plugins.xml core/trunk/src/language/jump.properties core/trunk/src/language/jump_cz.properties core/trunk/src/language/jump_de.properties core/trunk/src/language/jump_es.properties core/trunk/src/language/jump_fi.properties core/trunk/src/language/jump_fr.properties core/trunk/src/language/jump_hu.properties core/trunk/src/language/jump_it.properties core/trunk/src/language/jump_ja_JP.properties core/trunk/src/language/jump_ml.properties core/trunk/src/language/jump_pt.properties core/trunk/src/language/jump_pt_BR.properties core/trunk/src/language/jump_ta_IN.properties core/trunk/src/language/jump_te.properties core/trunk/src/language/jump_zh_CN.properties core/trunk/src/language/jump_zh_HK.properties Added Paths: ----------- core/trunk/src/org/openjump/core/ui/plugin/tools/geometrychange/PointsToPathsPlugIn.java Modified: core/trunk/ChangeLog =================================================================== --- core/trunk/ChangeLog 2020-01-14 16:36:38 UTC (rev 6223) +++ core/trunk/ChangeLog 2020-01-26 18:34:32 UTC (rev 6224) @@ -3,6 +3,9 @@ # 2. make sure that lines break at 80 chars for constricted display situations #<-------------------------------- 80 chars ----------------------------------># +2020-01-26 mmichaud <m.michael.mich...@orange.fr> + * FR#265 : add a plugin to make line from ordered points + 2020-01-14 mmichaud <m.michael.mich...@orange.fr> * Display a message instead of throwing an exception if a WMS GetCapabilies has an empty tag WMT_MS_Capabilies/Service/Title Modified: core/trunk/scripts/default-plugins.xml =================================================================== --- core/trunk/scripts/default-plugins.xml 2020-01-14 16:36:38 UTC (rev 6223) +++ core/trunk/scripts/default-plugins.xml 2020-01-26 18:34:32 UTC (rev 6224) @@ -783,6 +783,9 @@ org.openjump.core.ui.plugin.tools.geometrychange.ExtractPointsPlugIn </plug-in> <plug-in> + org.openjump.core.ui.plugin.tools.geometrychange.PointsToPathsPlugIn + </plug-in> + <plug-in> org.openjump.core.ui.plugin.tools.geometrychange.ExtractCommonBoundaryBetweenPolysPlugIn </plug-in> <plug-in> Modified: core/trunk/src/language/jump.properties =================================================================== --- core/trunk/src/language/jump.properties 2020-01-14 16:36:38 UTC (rev 6223) +++ core/trunk/src/language/jump.properties 2020-01-26 18:34:32 UTC (rev 6224) @@ -1679,6 +1679,15 @@ org.openjump.core.ui.plugin.tools.generate.PointLayerFromAttributeTablePlugIn.items-processed = items processed org.openjump.core.ui.plugin.tools.generate.PointLayerFromAttributeTablePlugIn.Points-from = Points from org.openjump.core.ui.plugin.tools.generate.PointLayerFromAttributeTablePlugIn.Create-Point-Layer = Create Point Layer +org.openjump.core.ui.plugin.tools.geometrychange.PointsToPathsPlugIn=Create LineStrings From Ordered Points +org.openjump.core.ui.plugin.tools.geometrychange.PointsToPathsPlugIn.layer = Layer +org.openjump.core.ui.plugin.tools.geometrychange.PointsToPathsPlugIn.use-selection = Use selection only +org.openjump.core.ui.plugin.tools.geometrychange.PointsToPathsPlugIn.order-by-attribute = Sorting attribute +org.openjump.core.ui.plugin.tools.geometrychange.PointsToPathsPlugIn.order-by-attribute-tooltip = Attribute used to sort points belonging to a path +org.openjump.core.ui.plugin.tools.geometrychange.PointsToPathsPlugIn.group-by-option = Group by option +org.openjump.core.ui.plugin.tools.geometrychange.PointsToPathsPlugIn.group-by-attribute = Attribute used to group points +org.openjump.core.ui.plugin.tools.geometrychange.PointsToPathsPlugIn.group-by-attribute-tooltip = Create distinct paths for distinct attribute values +org.openjump.core.ui.plugin.tools.geometrychange.PointsToPathsPlugIn.invalid-path = Cannot build a path with less than 2 points org.openjump.core.ui.plugin.tools.statistics.CalcVarianceAndMeanPerClassPlugIn = Calculate Mean and Variance Per Class org.openjump.core.ui.plugin.tools.statistics.CalcVarianceAndMeanPerClassPlugIn.Select-attribute-to-calculate-statistics-from = Select attribute to calculate statistics from org.openjump.core.ui.plugin.tools.statistics.CalcVarianceAndMeanPerClassPlugIn.Select-attribute-with-classification = Select attribute with classification information Modified: core/trunk/src/language/jump_cz.properties =================================================================== --- core/trunk/src/language/jump_cz.properties 2020-01-14 16:36:38 UTC (rev 6223) +++ core/trunk/src/language/jump_cz.properties 2020-01-26 18:34:32 UTC (rev 6224) @@ -2959,4 +2959,13 @@ ui.plugin.raster.VectorizeToPolygonsPlugIn.Name=\#T\:Create polygons from Raster ui.plugin.raster.VectorizeToPolygonsPlugIn.explode-multipolygons=\#T\:Explode multipolygons ui.plugin.raster.VectorizeToPolygonsPlugIn.algorithms=\#T\:Algorithms -ui.AboutDialog.copy-clipboard=#T:Copy To Clipboard \ No newline at end of file +ui.AboutDialog.copy-clipboard=#T:Copy To Clipboard +org.openjump.core.ui.plugin.tools.geometrychange.PointsToPathsPlugIn=#T:Create LineStrings From Ordered Points +org.openjump.core.ui.plugin.tools.geometrychange.PointsToPathsPlugIn.group-by-attribute=#T:Attribute used to group points +org.openjump.core.ui.plugin.tools.geometrychange.PointsToPathsPlugIn.group-by-attribute-tooltip=#T:Create distinct paths for distinct attribute values +org.openjump.core.ui.plugin.tools.geometrychange.PointsToPathsPlugIn.group-by-option=#T:Group by option +org.openjump.core.ui.plugin.tools.geometrychange.PointsToPathsPlugIn.invalid-path=#T:Cannot build a path with less than 2 points +org.openjump.core.ui.plugin.tools.geometrychange.PointsToPathsPlugIn.layer=#T:Layer +org.openjump.core.ui.plugin.tools.geometrychange.PointsToPathsPlugIn.order-by-attribute=#T:Sorting attribute +org.openjump.core.ui.plugin.tools.geometrychange.PointsToPathsPlugIn.order-by-attribute-tooltip=#T:Attribute used to sort points belonging to a path +org.openjump.core.ui.plugin.tools.geometrychange.PointsToPathsPlugIn.use-selection=#T:Use selection only \ No newline at end of file Modified: core/trunk/src/language/jump_de.properties =================================================================== --- core/trunk/src/language/jump_de.properties 2020-01-14 16:36:38 UTC (rev 6223) +++ core/trunk/src/language/jump_de.properties 2020-01-26 18:34:32 UTC (rev 6224) @@ -2952,4 +2952,13 @@ ui.plugin.raster.VectorizeToPolygonsPlugIn.explode-multipolygons=\#T\:Explode multipolygons ui.plugin.raster.VectorizeToPolygonsPlugIn.algorithms=\#T\:Algorithms ui.AboutDialog.copy-clipboard=#T:Copy To Clipboard +org.openjump.core.ui.plugin.tools.geometrychange.PointsToPathsPlugIn=#T:Create LineStrings From Ordered Points +org.openjump.core.ui.plugin.tools.geometrychange.PointsToPathsPlugIn.group-by-attribute=#T:Attribute used to group points +org.openjump.core.ui.plugin.tools.geometrychange.PointsToPathsPlugIn.group-by-attribute-tooltip=#T:Create distinct paths for distinct attribute values +org.openjump.core.ui.plugin.tools.geometrychange.PointsToPathsPlugIn.group-by-option=#T:Group by option +org.openjump.core.ui.plugin.tools.geometrychange.PointsToPathsPlugIn.invalid-path=#T:Cannot build a path with less than 2 points +org.openjump.core.ui.plugin.tools.geometrychange.PointsToPathsPlugIn.layer=#T:Layer +org.openjump.core.ui.plugin.tools.geometrychange.PointsToPathsPlugIn.order-by-attribute=#T:Sorting attribute +org.openjump.core.ui.plugin.tools.geometrychange.PointsToPathsPlugIn.order-by-attribute-tooltip=#T:Attribute used to sort points belonging to a path +org.openjump.core.ui.plugin.tools.geometrychange.PointsToPathsPlugIn.use-selection=#T:Use selection only com.vividsolutions.wms.AbstractParser.wms-parser-not-found=#T:Mandatory element <{0}> not found in the GetCapabilities,\nThere may be a WMS version problem! Modified: core/trunk/src/language/jump_es.properties =================================================================== --- core/trunk/src/language/jump_es.properties 2020-01-14 16:36:38 UTC (rev 6223) +++ core/trunk/src/language/jump_es.properties 2020-01-26 18:34:32 UTC (rev 6224) @@ -2930,4 +2930,13 @@ ui.plugin.raster.VectorizeToPolygonsPlugIn.Name=Crear poligonos desde raster ui.plugin.raster.VectorizeToPolygonsPlugIn.explode-multipolygons=Explotar multipol\xEDgonos ui.plugin.raster.VectorizeToPolygonsPlugIn.algorithms=Algoritmos +org.openjump.core.ui.plugin.tools.geometrychange.PointsToPathsPlugIn=#T:Create LineStrings From Ordered Points +org.openjump.core.ui.plugin.tools.geometrychange.PointsToPathsPlugIn.group-by-attribute=#T:Attribute used to group points +org.openjump.core.ui.plugin.tools.geometrychange.PointsToPathsPlugIn.group-by-attribute-tooltip=#T:Create distinct paths for distinct attribute values +org.openjump.core.ui.plugin.tools.geometrychange.PointsToPathsPlugIn.group-by-option=#T:Group by option +org.openjump.core.ui.plugin.tools.geometrychange.PointsToPathsPlugIn.invalid-path=#T:Cannot build a path with less than 2 points +org.openjump.core.ui.plugin.tools.geometrychange.PointsToPathsPlugIn.layer=#T:Layer +org.openjump.core.ui.plugin.tools.geometrychange.PointsToPathsPlugIn.order-by-attribute=#T:Sorting attribute +org.openjump.core.ui.plugin.tools.geometrychange.PointsToPathsPlugIn.order-by-attribute-tooltip=#T:Attribute used to sort points belonging to a path +org.openjump.core.ui.plugin.tools.geometrychange.PointsToPathsPlugIn.use-selection=#T:Use selection only com.vividsolutions.wms.AbstractParser.wms-parser-not-found=#T:Mandatory element <{0}> not found in the GetCapabilities,\nThere may be a WMS version problem! Modified: core/trunk/src/language/jump_fi.properties =================================================================== --- core/trunk/src/language/jump_fi.properties 2020-01-14 16:36:38 UTC (rev 6223) +++ core/trunk/src/language/jump_fi.properties 2020-01-26 18:34:32 UTC (rev 6224) @@ -2929,4 +2929,13 @@ ui.plugin.raster.VectorizeToPolygonsPlugIn.explode-multipolygons=\Pura multipolygonit ui.plugin.raster.VectorizeToPolygonsPlugIn.algorithms=\Algoritmi ui.AboutDialog.copy-clipboard=Kopioi leikep\u00F6yd\u00E4lle +org.openjump.core.ui.plugin.tools.geometrychange.PointsToPathsPlugIn=#T:Create LineStrings From Ordered Points +org.openjump.core.ui.plugin.tools.geometrychange.PointsToPathsPlugIn.group-by-attribute=#T:Attribute used to group points +org.openjump.core.ui.plugin.tools.geometrychange.PointsToPathsPlugIn.group-by-attribute-tooltip=#T:Create distinct paths for distinct attribute values +org.openjump.core.ui.plugin.tools.geometrychange.PointsToPathsPlugIn.group-by-option=#T:Group by option +org.openjump.core.ui.plugin.tools.geometrychange.PointsToPathsPlugIn.invalid-path=#T:Cannot build a path with less than 2 points +org.openjump.core.ui.plugin.tools.geometrychange.PointsToPathsPlugIn.layer=#T:Layer +org.openjump.core.ui.plugin.tools.geometrychange.PointsToPathsPlugIn.order-by-attribute=#T:Sorting attribute +org.openjump.core.ui.plugin.tools.geometrychange.PointsToPathsPlugIn.order-by-attribute-tooltip=#T:Attribute used to sort points belonging to a path +org.openjump.core.ui.plugin.tools.geometrychange.PointsToPathsPlugIn.use-selection=#T:Use selection only com.vividsolutions.wms.AbstractParser.wms-parser-not-found=#T:Mandatory element <{0}> not found in the GetCapabilities,\nThere may be a WMS version problem! Modified: core/trunk/src/language/jump_fr.properties =================================================================== --- core/trunk/src/language/jump_fr.properties 2020-01-14 16:36:38 UTC (rev 6223) +++ core/trunk/src/language/jump_fr.properties 2020-01-26 18:34:32 UTC (rev 6224) @@ -2961,4 +2961,13 @@ ui.plugin.raster.VectorizeToPolygonsPlugIn.explode-multipolygons=\#T\:Explode multipolygons ui.plugin.raster.VectorizeToPolygonsPlugIn.algorithms=\#T\:Algorithms ui.AboutDialog.copy-clipboard=Copier dans le presse-papier +org.openjump.core.ui.plugin.tools.geometrychange.PointsToPathsPlugIn=Cr\xE9er des lignes \xE0 partir de points ordonn\xE9s +org.openjump.core.ui.plugin.tools.geometrychange.PointsToPathsPlugIn.group-by-attribute=Attribut de regroupement +org.openjump.core.ui.plugin.tools.geometrychange.PointsToPathsPlugIn.group-by-attribute-tooltip=Cr\xE9e un chemin distinct pour chaque valeur d'attribut +org.openjump.core.ui.plugin.tools.geometrychange.PointsToPathsPlugIn.group-by-option=Option de regroupement +org.openjump.core.ui.plugin.tools.geometrychange.PointsToPathsPlugIn.invalid-path=Un chemin ne peut \xEAtre construit avec moins de 2 points +org.openjump.core.ui.plugin.tools.geometrychange.PointsToPathsPlugIn.layer=Couche +org.openjump.core.ui.plugin.tools.geometrychange.PointsToPathsPlugIn.order-by-attribute=Attribut d\xE9finissant l'ordre des points +org.openjump.core.ui.plugin.tools.geometrychange.PointsToPathsPlugIn.order-by-attribute-tooltip=Attribute utilis\xE9 pour d\xE9finir l'ordre des points le long du chemin +org.openjump.core.ui.plugin.tools.geometrychange.PointsToPathsPlugIn.use-selection=Utiliser uniquement la s\xE9lection com.vividsolutions.wms.AbstractParser.wms-parser-not-found=L''\xE9lement obligatoire <{0}> n''a pas \xE9t\xE9 trouv\xE9 dans le GetCapabilities,\nCela peut \xEAtre d\xFB \xE0 un probl\xE8me de version WMS! Modified: core/trunk/src/language/jump_hu.properties =================================================================== --- core/trunk/src/language/jump_hu.properties 2020-01-14 16:36:38 UTC (rev 6223) +++ core/trunk/src/language/jump_hu.properties 2020-01-26 18:34:32 UTC (rev 6224) @@ -2948,4 +2948,13 @@ ui.plugin.raster.VectorizeToPolygonsPlugIn.explode-multipolygons=\#T\:Explode multipolygons ui.plugin.raster.VectorizeToPolygonsPlugIn.algorithms=\#T\:Algorithms ui.AboutDialog.copy-clipboard=#T:Copy To Clipboard +org.openjump.core.ui.plugin.tools.geometrychange.PointsToPathsPlugIn=#T:Create LineStrings From Ordered Points +org.openjump.core.ui.plugin.tools.geometrychange.PointsToPathsPlugIn.group-by-attribute=#T:Attribute used to group points +org.openjump.core.ui.plugin.tools.geometrychange.PointsToPathsPlugIn.group-by-attribute-tooltip=#T:Create distinct paths for distinct attribute values +org.openjump.core.ui.plugin.tools.geometrychange.PointsToPathsPlugIn.group-by-option=#T:Group by option +org.openjump.core.ui.plugin.tools.geometrychange.PointsToPathsPlugIn.invalid-path=#T:Cannot build a path with less than 2 points +org.openjump.core.ui.plugin.tools.geometrychange.PointsToPathsPlugIn.layer=#T:Layer +org.openjump.core.ui.plugin.tools.geometrychange.PointsToPathsPlugIn.order-by-attribute=#T:Sorting attribute +org.openjump.core.ui.plugin.tools.geometrychange.PointsToPathsPlugIn.order-by-attribute-tooltip=#T:Attribute used to sort points belonging to a path +org.openjump.core.ui.plugin.tools.geometrychange.PointsToPathsPlugIn.use-selection=#T:Use selection only com.vividsolutions.wms.AbstractParser.wms-parser-not-found=#T:Mandatory element <{0}> not found in the GetCapabilities,\nThere may be a WMS version problem! Modified: core/trunk/src/language/jump_it.properties =================================================================== --- core/trunk/src/language/jump_it.properties 2020-01-14 16:36:38 UTC (rev 6223) +++ core/trunk/src/language/jump_it.properties 2020-01-26 18:34:32 UTC (rev 6224) @@ -2932,4 +2932,13 @@ ui.plugin.raster.VectorizeToPolygonsPlugIn.Name=Crea poligoni dal raster ui.plugin.raster.VectorizeToPolygonsPlugIn.explode-multipolygons=Esplodi multipoligoni ui.plugin.raster.VectorizeToPolygonsPlugIn.algorithms=Algoritmi +org.openjump.core.ui.plugin.tools.geometrychange.PointsToPathsPlugIn=#T:Create LineStrings From Ordered Points +org.openjump.core.ui.plugin.tools.geometrychange.PointsToPathsPlugIn.group-by-attribute=#T:Attribute used to group points +org.openjump.core.ui.plugin.tools.geometrychange.PointsToPathsPlugIn.group-by-attribute-tooltip=#T:Create distinct paths for distinct attribute values +org.openjump.core.ui.plugin.tools.geometrychange.PointsToPathsPlugIn.group-by-option=#T:Group by option +org.openjump.core.ui.plugin.tools.geometrychange.PointsToPathsPlugIn.invalid-path=#T:Cannot build a path with less than 2 points +org.openjump.core.ui.plugin.tools.geometrychange.PointsToPathsPlugIn.layer=#T:Layer +org.openjump.core.ui.plugin.tools.geometrychange.PointsToPathsPlugIn.order-by-attribute=#T:Sorting attribute +org.openjump.core.ui.plugin.tools.geometrychange.PointsToPathsPlugIn.order-by-attribute-tooltip=#T:Attribute used to sort points belonging to a path +org.openjump.core.ui.plugin.tools.geometrychange.PointsToPathsPlugIn.use-selection=#T:Use selection only com.vividsolutions.wms.AbstractParser.wms-parser-not-found=#T:Mandatory element <{0}> not found in the GetCapabilities,\nThere may be a WMS version problem! Modified: core/trunk/src/language/jump_ja_JP.properties =================================================================== --- core/trunk/src/language/jump_ja_JP.properties 2020-01-14 16:36:38 UTC (rev 6223) +++ core/trunk/src/language/jump_ja_JP.properties 2020-01-26 18:34:32 UTC (rev 6224) @@ -2954,4 +2954,13 @@ ui.plugin.raster.VectorizeToPolygonsPlugIn.explode-multipolygons=\#T\:Explode multipolygons ui.plugin.raster.VectorizeToPolygonsPlugIn.algorithms=\#T\:Algorithms ui.AboutDialog.copy-clipboard=#T:Copy To Clipboard +org.openjump.core.ui.plugin.tools.geometrychange.PointsToPathsPlugIn=#T:Create LineStrings From Ordered Points +org.openjump.core.ui.plugin.tools.geometrychange.PointsToPathsPlugIn.group-by-attribute=#T:Attribute used to group points +org.openjump.core.ui.plugin.tools.geometrychange.PointsToPathsPlugIn.group-by-attribute-tooltip=#T:Create distinct paths for distinct attribute values +org.openjump.core.ui.plugin.tools.geometrychange.PointsToPathsPlugIn.group-by-option=#T:Group by option +org.openjump.core.ui.plugin.tools.geometrychange.PointsToPathsPlugIn.invalid-path=#T:Cannot build a path with less than 2 points +org.openjump.core.ui.plugin.tools.geometrychange.PointsToPathsPlugIn.layer=#T:Layer +org.openjump.core.ui.plugin.tools.geometrychange.PointsToPathsPlugIn.order-by-attribute=#T:Sorting attribute +org.openjump.core.ui.plugin.tools.geometrychange.PointsToPathsPlugIn.order-by-attribute-tooltip=#T:Attribute used to sort points belonging to a path +org.openjump.core.ui.plugin.tools.geometrychange.PointsToPathsPlugIn.use-selection=#T:Use selection only com.vividsolutions.wms.AbstractParser.wms-parser-not-found=#T:Mandatory element <{0}> not found in the GetCapabilities,\nThere may be a WMS version problem! Modified: core/trunk/src/language/jump_ml.properties =================================================================== --- core/trunk/src/language/jump_ml.properties 2020-01-14 16:36:38 UTC (rev 6223) +++ core/trunk/src/language/jump_ml.properties 2020-01-26 18:34:32 UTC (rev 6224) @@ -3729,4 +3729,13 @@ ui.plugin.raster.VectorizeToPolygonsPlugIn.explode-multipolygons=\#T\:Explode multipolygons ui.plugin.raster.VectorizeToPolygonsPlugIn.algorithms=\#T\:Algorithms ui.AboutDialog.copy-clipboard=#T:Copy To Clipboard +org.openjump.core.ui.plugin.tools.geometrychange.PointsToPathsPlugIn=#T:Create LineStrings From Ordered Points +org.openjump.core.ui.plugin.tools.geometrychange.PointsToPathsPlugIn.group-by-attribute=#T:Attribute used to group points +org.openjump.core.ui.plugin.tools.geometrychange.PointsToPathsPlugIn.group-by-attribute-tooltip=#T:Create distinct paths for distinct attribute values +org.openjump.core.ui.plugin.tools.geometrychange.PointsToPathsPlugIn.group-by-option=#T:Group by option +org.openjump.core.ui.plugin.tools.geometrychange.PointsToPathsPlugIn.invalid-path=#T:Cannot build a path with less than 2 points +org.openjump.core.ui.plugin.tools.geometrychange.PointsToPathsPlugIn.layer=#T:Layer +org.openjump.core.ui.plugin.tools.geometrychange.PointsToPathsPlugIn.order-by-attribute=#T:Sorting attribute +org.openjump.core.ui.plugin.tools.geometrychange.PointsToPathsPlugIn.order-by-attribute-tooltip=#T:Attribute used to sort points belonging to a path +org.openjump.core.ui.plugin.tools.geometrychange.PointsToPathsPlugIn.use-selection=#T:Use selection only com.vividsolutions.wms.AbstractParser.wms-parser-not-found=#T:Mandatory element <{0}> not found in the GetCapabilities,\nThere may be a WMS version problem! Modified: core/trunk/src/language/jump_pt.properties =================================================================== --- core/trunk/src/language/jump_pt.properties 2020-01-14 16:36:38 UTC (rev 6223) +++ core/trunk/src/language/jump_pt.properties 2020-01-26 18:34:32 UTC (rev 6224) @@ -2953,4 +2953,13 @@ ui.plugin.raster.VectorizeToPolygonsPlugIn.explode-multipolygons=\#T\:Explode multipolygons ui.plugin.raster.VectorizeToPolygonsPlugIn.algorithms=\#T\:Algorithms ui.AboutDialog.copy-clipboard=#T:Copy To Clipboard +org.openjump.core.ui.plugin.tools.geometrychange.PointsToPathsPlugIn=#T:Create LineStrings From Ordered Points +org.openjump.core.ui.plugin.tools.geometrychange.PointsToPathsPlugIn.group-by-attribute=#T:Attribute used to group points +org.openjump.core.ui.plugin.tools.geometrychange.PointsToPathsPlugIn.group-by-attribute-tooltip=#T:Create distinct paths for distinct attribute values +org.openjump.core.ui.plugin.tools.geometrychange.PointsToPathsPlugIn.group-by-option=#T:Group by option +org.openjump.core.ui.plugin.tools.geometrychange.PointsToPathsPlugIn.invalid-path=#T:Cannot build a path with less than 2 points +org.openjump.core.ui.plugin.tools.geometrychange.PointsToPathsPlugIn.layer=#T:Layer +org.openjump.core.ui.plugin.tools.geometrychange.PointsToPathsPlugIn.order-by-attribute=#T:Sorting attribute +org.openjump.core.ui.plugin.tools.geometrychange.PointsToPathsPlugIn.order-by-attribute-tooltip=#T:Attribute used to sort points belonging to a path +org.openjump.core.ui.plugin.tools.geometrychange.PointsToPathsPlugIn.use-selection=#T:Use selection only com.vividsolutions.wms.AbstractParser.wms-parser-not-found=#T:Mandatory element <{0}> not found in the GetCapabilities,\nThere may be a WMS version problem! Modified: core/trunk/src/language/jump_pt_BR.properties =================================================================== --- core/trunk/src/language/jump_pt_BR.properties 2020-01-14 16:36:38 UTC (rev 6223) +++ core/trunk/src/language/jump_pt_BR.properties 2020-01-26 18:34:32 UTC (rev 6224) @@ -2953,4 +2953,13 @@ ui.plugin.raster.VectorizeToPolygonsPlugIn.explode-multipolygons=\#T\:Explode multipolygons ui.plugin.raster.VectorizeToPolygonsPlugIn.algorithms=\#T\:Algorithms ui.AboutDialog.copy-clipboard=#T:Copy To Clipboard +org.openjump.core.ui.plugin.tools.geometrychange.PointsToPathsPlugIn=#T:Create LineStrings From Ordered Points +org.openjump.core.ui.plugin.tools.geometrychange.PointsToPathsPlugIn.group-by-attribute=#T:Attribute used to group points +org.openjump.core.ui.plugin.tools.geometrychange.PointsToPathsPlugIn.group-by-attribute-tooltip=#T:Create distinct paths for distinct attribute values +org.openjump.core.ui.plugin.tools.geometrychange.PointsToPathsPlugIn.group-by-option=#T:Group by option +org.openjump.core.ui.plugin.tools.geometrychange.PointsToPathsPlugIn.invalid-path=#T:Cannot build a path with less than 2 points +org.openjump.core.ui.plugin.tools.geometrychange.PointsToPathsPlugIn.layer=#T:Layer +org.openjump.core.ui.plugin.tools.geometrychange.PointsToPathsPlugIn.order-by-attribute=#T:Sorting attribute +org.openjump.core.ui.plugin.tools.geometrychange.PointsToPathsPlugIn.order-by-attribute-tooltip=#T:Attribute used to sort points belonging to a path +org.openjump.core.ui.plugin.tools.geometrychange.PointsToPathsPlugIn.use-selection=#T:Use selection only com.vividsolutions.wms.AbstractParser.wms-parser-not-found=#T:Mandatory element <{0}> not found in the GetCapabilities,\nThere may be a WMS version problem! Modified: core/trunk/src/language/jump_ta_IN.properties =================================================================== --- core/trunk/src/language/jump_ta_IN.properties 2020-01-14 16:36:38 UTC (rev 6223) +++ core/trunk/src/language/jump_ta_IN.properties 2020-01-26 18:34:32 UTC (rev 6224) @@ -2951,4 +2951,13 @@ ui.plugin.raster.VectorizeToPolygonsPlugIn.explode-multipolygons=\#T\:Explode multipolygons ui.plugin.raster.VectorizeToPolygonsPlugIn.algorithms=\#T\:Algorithms ui.AboutDialog.copy-clipboard=#T:Copy To Clipboard +org.openjump.core.ui.plugin.tools.geometrychange.PointsToPathsPlugIn=#T:Create LineStrings From Ordered Points +org.openjump.core.ui.plugin.tools.geometrychange.PointsToPathsPlugIn.group-by-attribute=#T:Attribute used to group points +org.openjump.core.ui.plugin.tools.geometrychange.PointsToPathsPlugIn.group-by-attribute-tooltip=#T:Create distinct paths for distinct attribute values +org.openjump.core.ui.plugin.tools.geometrychange.PointsToPathsPlugIn.group-by-option=#T:Group by option +org.openjump.core.ui.plugin.tools.geometrychange.PointsToPathsPlugIn.invalid-path=#T:Cannot build a path with less than 2 points +org.openjump.core.ui.plugin.tools.geometrychange.PointsToPathsPlugIn.layer=#T:Layer +org.openjump.core.ui.plugin.tools.geometrychange.PointsToPathsPlugIn.order-by-attribute=#T:Sorting attribute +org.openjump.core.ui.plugin.tools.geometrychange.PointsToPathsPlugIn.order-by-attribute-tooltip=#T:Attribute used to sort points belonging to a path +org.openjump.core.ui.plugin.tools.geometrychange.PointsToPathsPlugIn.use-selection=#T:Use selection only com.vividsolutions.wms.AbstractParser.wms-parser-not-found=#T:Mandatory element <{0}> not found in the GetCapabilities,\nThere may be a WMS version problem! Modified: core/trunk/src/language/jump_te.properties =================================================================== --- core/trunk/src/language/jump_te.properties 2020-01-14 16:36:38 UTC (rev 6223) +++ core/trunk/src/language/jump_te.properties 2020-01-26 18:34:32 UTC (rev 6224) @@ -3459,4 +3459,13 @@ ui.plugin.raster.VectorizeToPolygonsPlugIn.explode-multipolygons=\#T\:Explode multipolygons ui.plugin.raster.VectorizeToPolygonsPlugIn.algorithms=\#T\:Algorithms ui.AboutDialog.copy-clipboard=#T:Copy To Clipboard +org.openjump.core.ui.plugin.tools.geometrychange.PointsToPathsPlugIn=#T:Create LineStrings From Ordered Points +org.openjump.core.ui.plugin.tools.geometrychange.PointsToPathsPlugIn.group-by-attribute=#T:Attribute used to group points +org.openjump.core.ui.plugin.tools.geometrychange.PointsToPathsPlugIn.group-by-attribute-tooltip=#T:Create distinct paths for distinct attribute values +org.openjump.core.ui.plugin.tools.geometrychange.PointsToPathsPlugIn.group-by-option=#T:Group by option +org.openjump.core.ui.plugin.tools.geometrychange.PointsToPathsPlugIn.invalid-path=#T:Cannot build a path with less than 2 points +org.openjump.core.ui.plugin.tools.geometrychange.PointsToPathsPlugIn.layer=#T:Layer +org.openjump.core.ui.plugin.tools.geometrychange.PointsToPathsPlugIn.order-by-attribute=#T:Sorting attribute +org.openjump.core.ui.plugin.tools.geometrychange.PointsToPathsPlugIn.order-by-attribute-tooltip=#T:Attribute used to sort points belonging to a path +org.openjump.core.ui.plugin.tools.geometrychange.PointsToPathsPlugIn.use-selection=#T:Use selection only com.vividsolutions.wms.AbstractParser.wms-parser-not-found=#T:Mandatory element <{0}> not found in the GetCapabilities,\nThere may be a WMS version problem! Modified: core/trunk/src/language/jump_zh_CN.properties =================================================================== --- core/trunk/src/language/jump_zh_CN.properties 2020-01-14 16:36:38 UTC (rev 6223) +++ core/trunk/src/language/jump_zh_CN.properties 2020-01-26 18:34:32 UTC (rev 6224) @@ -3116,4 +3116,13 @@ ui.plugin.raster.VectorizeToPolygonsPlugIn.explode-multipolygons=\#T\:Explode multipolygons ui.plugin.raster.VectorizeToPolygonsPlugIn.algorithms=\#T\:Algorithms ui.AboutDialog.copy-clipboard=#T:Copy To Clipboard +org.openjump.core.ui.plugin.tools.geometrychange.PointsToPathsPlugIn=#T:Create LineStrings From Ordered Points +org.openjump.core.ui.plugin.tools.geometrychange.PointsToPathsPlugIn.group-by-attribute=#T:Attribute used to group points +org.openjump.core.ui.plugin.tools.geometrychange.PointsToPathsPlugIn.group-by-attribute-tooltip=#T:Create distinct paths for distinct attribute values +org.openjump.core.ui.plugin.tools.geometrychange.PointsToPathsPlugIn.group-by-option=#T:Group by option +org.openjump.core.ui.plugin.tools.geometrychange.PointsToPathsPlugIn.invalid-path=#T:Cannot build a path with less than 2 points +org.openjump.core.ui.plugin.tools.geometrychange.PointsToPathsPlugIn.layer=#T:Layer +org.openjump.core.ui.plugin.tools.geometrychange.PointsToPathsPlugIn.order-by-attribute=#T:Sorting attribute +org.openjump.core.ui.plugin.tools.geometrychange.PointsToPathsPlugIn.order-by-attribute-tooltip=#T:Attribute used to sort points belonging to a path +org.openjump.core.ui.plugin.tools.geometrychange.PointsToPathsPlugIn.use-selection=#T:Use selection only com.vividsolutions.wms.AbstractParser.wms-parser-not-found=#T:Mandatory element <{0}> not found in the GetCapabilities,\nThere may be a WMS version problem! Modified: core/trunk/src/language/jump_zh_HK.properties =================================================================== --- core/trunk/src/language/jump_zh_HK.properties 2020-01-14 16:36:38 UTC (rev 6223) +++ core/trunk/src/language/jump_zh_HK.properties 2020-01-26 18:34:32 UTC (rev 6224) @@ -3115,4 +3115,13 @@ ui.plugin.raster.VectorizeToPolygonsPlugIn.explode-multipolygons=\#T\:Explode multipolygons ui.plugin.raster.VectorizeToPolygonsPlugIn.algorithms=\#T\:Algorithms ui.AboutDialog.copy-clipboard=#T:Copy To Clipboard +org.openjump.core.ui.plugin.tools.geometrychange.PointsToPathsPlugIn=#T:Create LineStrings From Ordered Points +org.openjump.core.ui.plugin.tools.geometrychange.PointsToPathsPlugIn.group-by-attribute=#T:Attribute used to group points +org.openjump.core.ui.plugin.tools.geometrychange.PointsToPathsPlugIn.group-by-attribute-tooltip=#T:Create distinct paths for distinct attribute values +org.openjump.core.ui.plugin.tools.geometrychange.PointsToPathsPlugIn.group-by-option=#T:Group by option +org.openjump.core.ui.plugin.tools.geometrychange.PointsToPathsPlugIn.invalid-path=#T:Cannot build a path with less than 2 points +org.openjump.core.ui.plugin.tools.geometrychange.PointsToPathsPlugIn.layer=#T:Layer +org.openjump.core.ui.plugin.tools.geometrychange.PointsToPathsPlugIn.order-by-attribute=#T:Sorting attribute +org.openjump.core.ui.plugin.tools.geometrychange.PointsToPathsPlugIn.order-by-attribute-tooltip=#T:Attribute used to sort points belonging to a path +org.openjump.core.ui.plugin.tools.geometrychange.PointsToPathsPlugIn.use-selection=#T:Use selection only com.vividsolutions.wms.AbstractParser.wms-parser-not-found=#T:Mandatory element <{0}> not found in the GetCapabilities,\nThere may be a WMS version problem! Added: core/trunk/src/org/openjump/core/ui/plugin/tools/geometrychange/PointsToPathsPlugIn.java =================================================================== --- core/trunk/src/org/openjump/core/ui/plugin/tools/geometrychange/PointsToPathsPlugIn.java (rev 0) +++ core/trunk/src/org/openjump/core/ui/plugin/tools/geometrychange/PointsToPathsPlugIn.java 2020-01-26 18:34:32 UTC (rev 6224) @@ -0,0 +1,179 @@ +package org.openjump.core.ui.plugin.tools.geometrychange; + +import com.vividsolutions.jts.geom.CoordinateList; +import com.vividsolutions.jump.I18N; +import com.vividsolutions.jump.feature.*; +import com.vividsolutions.jump.task.TaskMonitor; +import com.vividsolutions.jump.workbench.WorkbenchContext; +import com.vividsolutions.jump.workbench.model.Layer; +import com.vividsolutions.jump.workbench.model.StandardCategoryNames; +import com.vividsolutions.jump.workbench.plugin.*; +import com.vividsolutions.jump.workbench.ui.*; + +import javax.swing.*; +import java.awt.event.ActionEvent; +import java.awt.event.ActionListener; +import java.util.*; +import java.util.function.Function; + +import static com.vividsolutions.jump.workbench.ui.AttributeTypeFilter.*; + +public class PointsToPathsPlugIn extends AbstractPlugIn implements ThreadedPlugIn { + + private static final String KEY = PointsToPathsPlugIn.class.getName(); + + // Parameter names used for macro persistence + // Mandatory + private static final String P_LAYER_NAME = "LayerName"; + private static final String P_USE_SELECTION = "UseSelection"; + private static final String P_ORDER_BY_ATTRIBUTE = "OrderBy"; + // Optional (default value provided) + private static final String P_GROUP_BY_ATTRIBUTE = "GroupBy"; + + private static String UI_LAYER; + private static String UI_USE_SELECTION; + private static String UI_ORDER_BY_ATTRIBUTE; + private static String UI_ORDER_BY_ATTRIBUTE_TT; + private static String UI_GROUP_BY; + private static String UI_GROUP_BY_ATTRIBUTE; + private static String UI_GROUP_BY_ATTRIBUTE_TT; + + public void initialize(PlugInContext context) throws Exception { + context.getFeatureInstaller().addMainMenuPlugin(this, + new String[]{MenuNames.TOOLS,MenuNames.TOOLS_EDIT_GEOMETRY}, getName(), + false, null, createEnableCheck(context.getWorkbenchContext())); + } + + + public static MultiEnableCheck createEnableCheck(WorkbenchContext workbenchContext) { + EnableCheckFactory checkFactory = new EnableCheckFactory(workbenchContext); + + return new MultiEnableCheck() + .add(checkFactory.createWindowWithLayerNamePanelMustBeActiveCheck()) + .add(checkFactory.createAtLeastNLayersMustExistCheck(1)); + } + + public boolean execute(PlugInContext context) throws Exception { + UI_USE_SELECTION = I18N.get(KEY + ".use-selection"); + UI_LAYER = I18N.get(KEY + ".layer"); + UI_ORDER_BY_ATTRIBUTE = I18N.get(KEY + ".order-by-attribute"); + UI_ORDER_BY_ATTRIBUTE_TT = I18N.get(KEY + ".order-by-attribute-tooltip"); + UI_GROUP_BY = I18N.get(KEY + ".group-by-option"); + UI_GROUP_BY_ATTRIBUTE = I18N.get(KEY + ".group-by-attribute"); + UI_GROUP_BY_ATTRIBUTE_TT = I18N.get(KEY + ".group-by-attribute-tooltip"); + MultiInputDialog dialog = new MultiInputDialog(context.getWorkbenchFrame(), I18N.get(KEY), true); + setDialogValues(dialog, context); + GUIUtil.centreOnWindow(dialog); + dialog.setVisible(true); + if (!dialog.wasOKPressed()) { + return false; + } + getDialogValues(dialog); + return true; + } + + public void run(TaskMonitor monitor, PlugInContext context) throws Exception{ + try { + Layer layer = context.getLayerManager().getLayer((String)getParameter(P_LAYER_NAME)); + String orderByAttribute = getStringParam(P_ORDER_BY_ATTRIBUTE); + + FeatureSchema featureSchema = layer.getFeatureCollectionWrapper().getFeatureSchema(); + FeatureDataset dataset = new FeatureDataset(featureSchema); + Collection<Feature> input = getBooleanParam(P_USE_SELECTION) ? + new ArrayList<>( + context.getLayerViewPanel().getSelectionManager().getFeaturesWithSelectedItems(layer) + ): layer.getFeatureCollectionWrapper().getFeatures(); + Map<Object,List<Feature>> map = new HashMap<>(); + String keyName = getStringParam(P_GROUP_BY_ATTRIBUTE); + for (Feature feature : input) { + Object key = (keyName == null) ? "" : feature.getAttribute(keyName); + System.out.println("Get key for " + feature.getID() + " :" + key); + List<Feature> list = map.get(key); + if (list == null) { + list = new ArrayList<>(); + map.put(key, list); + } + list.add(feature); + } + Comparator<Feature> comparator = Comparator.comparing(new Function<Feature,Comparable>() { + public Comparable apply(Feature f) { return (Comparable)f.getAttribute(orderByAttribute); } + }); + for (Map.Entry<Object,List<Feature>> entry : map.entrySet()) { + List<Feature> list = entry.getValue(); + list.sort(comparator); + Feature f = list.get(0).clone(false); + CoordinateList coords = new CoordinateList(); + for (Feature p : list) coords.add(p.getGeometry().getCoordinate(), false); + if (coords.size() > 1) { + f.setGeometry(list.get(0).getGeometry().getFactory().createLineString(coords.toCoordinateArray())); + } else { + context.getWorkbenchFrame().warnUser(I18N.get(KEY + ".invalid-path")); + f.setGeometry(list.get(0).getGeometry().getFactory().createPoint(coords.getCoordinate(0))); + } + dataset.add(f); + } + + if (dataset.isEmpty()) { + context.getWorkbenchFrame() + .warnUser(I18N.get("ui.plugin.analysis.BufferPlugIn.empty-result-set")); + return; + } + context.addLayer(StandardCategoryNames.RESULT, layer.getName() + "-paths", dataset); + + } catch(Exception e) { + throw e; + } + if (context.getWorkbenchContext().getBlackboard().get(MacroManager.MACRO_STARTED, false)) { + ((Macro)context.getWorkbenchContext().getBlackboard().get("Macro")).addProcess(this); + } + } + + private void setDialogValues(final MultiInputDialog dialog, final PlugInContext context) { + + final JComboBox layerComboBox = dialog.addLayerComboBox(UI_LAYER, context.getCandidateLayer(0), context.getLayerManager()); + boolean hasSelection = !context.getLayerViewPanel().getSelectionManager().getSelectedItems(context.getCandidateLayer(0)).isEmpty(); + final JCheckBox useSelectionCheckBox = dialog.addCheckBox(UI_USE_SELECTION, hasSelection); + useSelectionCheckBox.setEnabled(hasSelection); + + dialog.addSeparator(); + final JComboBox orderByAttributeComboBox = dialog.addAttributeComboBox(UI_ORDER_BY_ATTRIBUTE, UI_LAYER, + new AttributeTypeFilter(INTEGER + LONG + DOUBLE + STRING + DATE), UI_ORDER_BY_ATTRIBUTE_TT); + + dialog.addSeparator(); + final JCheckBox groupByCheckBox = dialog.addCheckBox(UI_GROUP_BY, false); + final JComboBox groupByAttributeComboBox = dialog.addAttributeComboBox(UI_GROUP_BY_ATTRIBUTE, UI_LAYER, + new AttributeTypeFilter(INTEGER + LONG + STRING), UI_GROUP_BY_ATTRIBUTE_TT); + groupByAttributeComboBox.setEnabled(groupByCheckBox.isSelected()); + + layerComboBox.addActionListener(new ActionListener() { + @Override + public void actionPerformed(ActionEvent e) { + final boolean hasSelection = !context.getLayerViewPanel().getSelectionManager().getSelectedItems(dialog.getLayer(UI_LAYER)).isEmpty(); + useSelectionCheckBox.setEnabled(hasSelection); + if (!hasSelection) useSelectionCheckBox.setSelected(hasSelection); + groupByCheckBox.setEnabled(AttributeTypeFilter.NO_GEOMETRY_FILTER.filter(dialog.getLayer(UI_LAYER)).size()>1); + groupByAttributeComboBox.setEnabled(AttributeTypeFilter.NO_GEOMETRY_FILTER.filter(dialog.getLayer(UI_LAYER)).size()>1); + dialog.getLayer(UI_LAYER).getFeatureCollectionWrapper().getFeatureSchema(); + } + }); + + groupByCheckBox.addActionListener(new ActionListener() { + @Override + public void actionPerformed(ActionEvent e) { + groupByAttributeComboBox.setEnabled(groupByCheckBox.isSelected()); + } + }); + } + + private void getDialogValues(final MultiInputDialog dialog) { + addParameter(P_USE_SELECTION, dialog.getBoolean(UI_USE_SELECTION)); + addParameter(P_LAYER_NAME, dialog.getLayer(UI_LAYER).getName()); + addParameter(P_ORDER_BY_ATTRIBUTE, dialog.getValue(UI_ORDER_BY_ATTRIBUTE)); + if (dialog.getBoolean(UI_GROUP_BY)) { + addParameter(P_GROUP_BY_ATTRIBUTE, dialog.getValue(UI_GROUP_BY_ATTRIBUTE)); + } else { + addParameter(P_GROUP_BY_ATTRIBUTE, null); + } + } + +} _______________________________________________ Jump-pilot-devel mailing list Jump-pilot-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel