[JPP-Devel] SVN: [6224] core/trunk

2020-01-26 Thread jump-pilot-svn--- via Jump-pilot-devel
Revision: 6224
  http://sourceforge.net/p/jump-pilot/code/6224
Author:   michaudm
Date: 2020-01-26 18:34:32 + (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/ChangeLog2020-01-14 16:36:38 UTC (rev 6223)
+++ core/trunk/ChangeLog2020-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 
+  * FR#265 : add a plugin to make line from ordered points
+
 2020-01-14 mmichaud 
   * 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
 
 
+org.openjump.core.ui.plugin.tools.geometrychange.PointsToPathsPlugIn
+
+
 
org.openjump.core.ui.plugin.tools.geometrychange.ExtractCommonBoundaryBetweenPolysPlugIn
 
 

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.VectorizeToPolygo

[JPP-Devel] [jump-pilot:feature-requests] #265 Create a "make line" tool

2020-01-26 Thread michael michaud via Jump-pilot-devel
Implemented a new plugin in
Tools > Editing geometry
Please Jukka, test if it makes the job and report any problem


---

** [feature-requests:#265] Create a "make line" tool**

**Status:** open
**Created:** Tue Jan 14, 2020 06:00 PM UTC by Jukka Rahkonen
**Last Updated:** Wed Jan 15, 2020 08:02 PM UTC
**Owner:** nobody
**Attachments:**

- 
[OpenJUMP_makeline.jml.txt](https://sourceforge.net/p/jump-pilot/feature-requests/265/attachment/OpenJUMP_makeline.jml.txt)
 (2.6 kB; text/plain)
- 
[OpenJUMP_makeline_definition.odt](https://sourceforge.net/p/jump-pilot/feature-requests/265/attachment/OpenJUMP_makeline_definition.odt)
 (39.3 kB; application/vnd.oasis.opendocument.text)


The new tool should build a linestring from the points from a layer. Points 
should be added as vertices to the linestring in the same order than they 
appear in data, or sorted by a selected attribute. More details in the 
attachments.


---

Sent from sourceforge.net because jump-pilot-devel@lists.sourceforge.net is 
subscribed to https://sourceforge.net/p/jump-pilot/feature-requests/

To unsubscribe from further messages, a project admin can change settings at 
https://sourceforge.net/p/jump-pilot/admin/feature-requests/options.  Or, if 
this is a mailing list, you can unsubscribe from the mailing list.___
Jump-pilot-devel mailing list
Jump-pilot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel


Re: [JPP-Devel] Why attribute panel goes to ghost mode?

2020-01-26 Thread Michaël Michaud

Ede,

I tried to fix the problem without success. I can't remember exactly 
what the flexible schema resolves.

Probably related to the semi-structured nature of json.
Is this because an attribute may have different types for different 
features ? Or because different features may have different schemas in 
the same FeatureCollection ?


I think we must have a way (an option ?) to import geojson in a standard 
schema.

If an attribute type is ambiguous  it could be imported as a String.

What do you think ?

Anyway, I think fixing it is not so easy and I don't mind releasing OJ 
1.15 before or after that.


Michaël

Le 17/01/2020 à 13:02, edgar.sol...@web.de a écrit :

rings a bell. dimly recall an issue, where the "enhanced" FeatureSchema was not 
properly editable. will have a look - after the release, nobody complained until now.

what should work as a workaround for now is - load GeoJSON, save as JML, reopen 
and edit away.

..ede


On 17.01.2020 08:24, Michaël Michaud wrote:

Hi Ede,

Seems related to the special way OJ handles GeoJSON features and FeatureSchema.

I explored the feature attributes and schema of the GeoJSON feature with 
beanshell,
but could not find what goes wrong :
- the feature seems to have a normal schema with two attributes (GEOMETRY and 
attribute1)
- but GeoJSONFeatureCollectionWrapper$1.getAttribute(1) throw the exception

It looks like if feature has a normal schema modified by the FeatureSchema 
editing tool
and the original schema from GeoJSONFeatureCollectionWrapper which miss the new 
attribute

Michaël

Le 16/01/2020 à 02:00, Rahkonen Jukka (MML) a écrit :

Now with the images I promised to attach.

-Jukka-

*Lähettäjä:*Rahkonen Jukka (MML) 
*Lähetetty:* torstai 16. tammikuuta 2020 2.02
*Vastaanottaja:* OpenJump develop and use (jump-pilot-devel@lists.sourceforge.net) 

*Aihe:* [JPP-Devel] Why attribute panel goes to ghost mode?

Hi,

I have been wondering what happens when OpenJUMP encounters some error and 
after that it responds slowly and some panels show only partially. I try to 
explain how to make that happen.

  1. Start OpenJUMP
  2. Add a new layer
  3. Add one feature as WKT: POINT (0 0)
  4. Save the layer as GeoJSON “point.json”
  5. Open that GeoJSON file
  6. Open attribute table and see that everything seems normal
  7. Make layer editable
  8. Edit schema and add a new attribute as “attribute1; String”
  9. Apply changes
10. Open the attribute table

The table opens for me as in the attached image #1. If I move the mouse around 
where I suppose that the table is I can get some more details visible (image 
#2).

I believe there are two issues involved:

  1. for some reason the schema of a GeoJSON layer is not properly editable
  2. something happens due to 1) that sets the the attribute table into
     a spooky state

I have experienced that the ghost window behavior can appear also after some 
after unsuccessful operations but I can’t remember any other examples. Anyway 
it means that fixing the issue with GeoJSON will not fix the ghost table issue 
generally.

Here is the log from the unsuccessful schema edit.

[INFO] 01:56:15.476 Done. Current committed 
memory:plugin.AbstractPlugIn.executing = Executing51 MB

Exception in thread "AWT-EventQueue-0" java.lang.IndexOutOfBoundsException: 
Index: 1, Size: 1

     at java.util.ArrayList.rangeCheck(Unknown Source)

     at java.util.ArrayList.get(Unknown Source)

     at 
com.vividsolutions.jump.feature.FeatureSchema.getAttributeType(FeatureSchema.java:144)

     at 
com.vividsolutions.jump.io.geojson.GeoJSONFeatureCollectionWrapper$1.getAttribute(GeoJSONFeatureCollectionWrapper.java:85)

     at 
com.vividsolutions.jump.workbench.ui.LayerTableModel$4.getValue(LayerTableModel.java:166)

     at 
com.vividsolutions.jump.workbench.ui.LayerTableModel$MyColumn.getValueAt(LayerTableModel.java:70)

     at 
com.vividsolutions.jump.workbench.ui.ColumnBasedTableModel.getValueAt(ColumnBasedTableModel.java:141)

     at javax.swing.JTable.getValueAt(Unknown Source)

     at javax.swing.JTable.prepareRenderer(Unknown Source)

     at javax.swing.plaf.basic.BasicTableUI.paintCell(Unknown Source)

     at javax.swing.plaf.basic.BasicTableUI.paintCells(Unknown Source)

     at javax.swing.plaf.basic.BasicTableUI.paint(Unknown Source)

     at javax.swing.plaf.ComponentUI.update(Unknown Source)

     at javax.swing.JComponent.paintComponent(Unknown Source)

     at javax.swing.JComponent.paint(Unknown Source)

     at javax.swing.JComponent.paintChildren(Unknown Source)

     at javax.swing.JComponent.paint(Unknown Source)

     at javax.swing.JViewport.paint(Unknown Source)

     at javax.swing.JComponent.paintChildren(Unknown Source)

     at javax.swing.JComponent.paint(Unknown Source)

     at javax.swing.JComponent.paintChildren(Unknown Source)

     at javax.swing.JComponent.paint(Unknown Source)

     at javax.swing.JCompo

[JPP-Devel] SVN: [6225] core/trunk

2020-01-26 Thread jump-pilot-svn--- via Jump-pilot-devel
Revision: 6225
  http://sourceforge.net/p/jump-pilot/code/6225
Author:   michaudm
Date: 2020-01-27 00:24:47 + (Mon, 27 Jan 2020)
Log Message:
---
fix bug in MakeValidOp

Modified Paths:
--
core/trunk/ChangeLog
core/trunk/src/com/vividsolutions/jump/geom/MakeValidOp.java

Modified: core/trunk/ChangeLog
===
--- core/trunk/ChangeLog2020-01-26 18:34:32 UTC (rev 6224)
+++ core/trunk/ChangeLog2020-01-27 00:24:47 UTC (rev 6225)
@@ -5,6 +5,7 @@
 
 2020-01-26 mmichaud 
   * FR#265 : add a plugin to make line from ordered points
+  * fix bug in MakeValidOp
 
 2020-01-14 mmichaud 
   * Display a message instead of throwing an exception if a WMS

Modified: core/trunk/src/com/vividsolutions/jump/geom/MakeValidOp.java
===
--- core/trunk/src/com/vividsolutions/jump/geom/MakeValidOp.java
2020-01-26 18:34:32 UTC (rev 6224)
+++ core/trunk/src/com/vividsolutions/jump/geom/MakeValidOp.java
2020-01-27 00:24:47 UTC (rev 6225)
@@ -499,6 +499,7 @@
 if (location == Location.INTERIOR) geoms.add(polygon);
 }
 Geometry unionPoly = UnaryUnionOp.union(geoms);
+if (unionPoly == null) unionPoly = 
ring.getFactory().createPolygon(new Coordinate[0]);
 Geometry unionLines = 
UnaryUnionOp.union(lines).difference(unionPoly.getBoundary());
 geoms.clear();
 decompose(unionPoly, geoms);



___
Jump-pilot-devel mailing list
Jump-pilot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel