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) <jukka.rahko...@maanmittauslaitos.fi>
*Lähetetty:* torstai 16. tammikuuta 2020 2.02
*Vastaanottaja:* OpenJump develop and use (jump-pilot-devel@lists.sourceforge.net)
<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.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.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.JLayeredPane.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.JComponent.paintChildren(Unknown Source)
at javax.swing.JComponent.paint(Unknown Source)
at javax.swing.JLayeredPane.paint(Unknown Source)
at javax.swing.JComponent.paintToOffscreen(Unknown Source)
at javax.swing.RepaintManager$PaintManager.paintDoubleBuffered(Unknown
Source)
at javax.swing.RepaintManager$PaintManager.paint(Unknown Source)
at javax.swing.RepaintManager.paint(Unknown Source)
at javax.swing.JComponent._paintImmediately(Unknown Source)
at javax.swing.JComponent.paintImmediately(Unknown Source)
at javax.swing.RepaintManager$4.run(Unknown Source)
at javax.swing.RepaintManager$4.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at
java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown
Source)
at javax.swing.RepaintManager.paintDirtyRegions(Unknown Source)
at javax.swing.RepaintManager.paintDirtyRegions(Unknown Source)
at javax.swing.RepaintManager.prePaintDirtyRegions(Unknown Source)
at javax.swing.RepaintManager.access$1200(Unknown Source)
at javax.swing.RepaintManager$ProcessingRunnable.run(Unknown Source)
at java.awt.event.InvocationEvent.dispatch(Unknown Source)
at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
at java.awt.EventQueue.access$500(Unknown Source)
at java.awt.EventQueue$3.run(Unknown Source)
at java.awt.EventQueue$3.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at
java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown
Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)
-Jukka-
_______________________________________________
Jump-pilot-devel mailing list
Jump-pilot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel
_______________________________________________
Jump-pilot-devel mailing list
Jump-pilot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel
_______________________________________________
Jump-pilot-devel mailing list
Jump-pilot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel
_______________________________________________
Jump-pilot-devel mailing list
Jump-pilot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel