i see the issue. there is one "keskikorkeus" being NULL forcing the whole attribute column to become String.
of course this is a bug in the GeoJSON reader and i'll fix it. ..ede On 03.11.2016 12:24, Rahkonen Jukka (MML) wrote: > By taking the big dataset that I had originally in JML format and converting > a subset of it with ogr2ogr into GeoJSON. Test data contains 100 first > features selected with SQL "limit 100 offset 0". I believe that the error > comes from the latter half because I can edit the schema of json file that I > captured with "limit 50 offset 0". I would look for gml_id=jarvi.106 which > has NULL where other features have data. > > -Jukka- > > -----Alkuperäinen viesti----- > Lähettäjä: [email protected] [mailto:[email protected]] > Lähetetty: 3. marraskuuta 2016 13:16 > Vastaanottaja: OpenJump develop and use > <[email protected]> > Aihe: Re: [JPP-Devel] Can't edit the schema of some layers > > how did you create it? manually by editing the geoJson file with a text > editor? ..ede > > On 03.11.2016 12:09, Rahkonen Jukka (MML) wrote: >> Hi, >> >> I managed to create test data with only 100 features >> http://latuviitta.org/downloads/100.json >> >> For testing just open and try to edit and save the schema. >> >> -Jukka- >> >> Re: [JPP-Devel] Can't edit the schema of some layers >> >>> Hi Ede, >> >>> Sorry, I have problems with creating a small GeoJSON that leads to this >>> issue. I got the problematic layer by opening a big GeoJSON file but if I >>> copy a few features from that layer to a new layer with Replicate features, >>> then the problem disappears. I have also tried to make a short GeoJSON file >>> with just one feature with GDAL but that does not show any problem. The >>> big GeoJSON is 2.6 GB. I will continue trials with creating a small and >>> failing data. >> >> >> -Jukka- >> >> >> -----Alkuperäinen viesti----- >> Lähettäjä: [email protected] [mailto:[email protected]] >> Lähetetty: 2. marraskuuta 2016 18:17 >> Vastaanottaja: OpenJump develop and use >> <[email protected]> >> Aihe: Re: [JPP-Devel] Can't edit the schema of some layers >> >> Jukka, >> >> can you send me a small GeoJSON example file to replicate your issue? >> ..ede >> >> On 02.11.2016 17:12, Rahkonen Jukka (MML) wrote: >>> Hi, >>> >>> >>> >>> I opened some data from GeoJSON and I can't edit the schema. Apply >>> changes yields just an error message. However, if I save the data >>> into JML or GeoJSON and open it from the disk, then I can edit the schema. >>> So unfortunately I can't provide with test data. Here is the error, >>> though >>> >>> >>> >>> >>> >>> >>> >>> java.lang.ClassCastException: java.lang.Long cannot be cast to >>> java.lang.String >>> >>> at >>> com.vividsolutions.jump.workbench.ui.plugin.ViewSchemaPlugIn.convert( >>> V >>> iewSchemaPlugIn.java:346) >>> >>> at >>> com.vividsolutions.jump.workbench.ui.plugin.ViewSchemaPlugIn.convert( >>> V >>> iewSchemaPlugIn.java:287) >>> >>> at >>> com.vividsolutions.jump.workbench.ui.plugin.ViewSchemaPlugIn.applyCha >>> n >>> ges(ViewSchemaPlugIn.java:165) >>> >>> at >>> com.vividsolutions.jump.workbench.ui.plugin.ViewSchemaPlugIn.access$3 >>> 0 >>> 0(ViewSchemaPlugIn.java:77) >>> >>> at >>> com.vividsolutions.jump.workbench.ui.plugin.ViewSchemaPlugIn$EditSche >>> m >>> aFrame$3.actionPerformed(ViewSchemaPlugIn.java:746) >>> >>> at >>> com.vividsolutions.jump.workbench.ui.SchemaPanel.fireActionPerformed( >>> S >>> chemaPanel.java:687) >>> >>> at >>> com.vividsolutions.jump.workbench.ui.SchemaPanel.applyButton_actionPe >>> r >>> formed(SchemaPanel.java:677) >>> >>> at >>> com.vividsolutions.jump.workbench.ui.SchemaPanel$14.actionPerformed(S >>> c >>> hemaPanel.java:448) >>> >>> at >>> javax.swing.AbstractButton.fireActionPerformed(Unknown Source) >>> >>> at >>> javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source) >>> >>> at >>> javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source) >>> >>> at >>> javax.swing.DefaultButtonModel.setPressed(Unknown Source) >>> >>> at >>> javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown >>> Source) >>> >>> at >>> java.awt.Component.processMouseEvent(Unknown Source) >>> >>> at >>> javax.swing.JComponent.processMouseEvent(Unknown Source) >>> >>> at >>> java.awt.Component.processEvent(Unknown Source) >>> >>> at >>> java.awt.Container.processEvent(Unknown Source) >>> >>> at >>> java.awt.Component.dispatchEventImpl(Unknown Source) >>> >>> at >>> java.awt.Container.dispatchEventImpl(Unknown Source) >>> >>> at >>> java.awt.Component.dispatchEvent(Unknown Source) >>> >>> at >>> java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source) >>> >>> at >>> java.awt.LightweightDispatcher.processMouseEvent(Unknown Source) >>> >>> at >>> java.awt.LightweightDispatcher.dispatchEvent(Unknown Source) >>> >>> at >>> java.awt.Container.dispatchEventImpl(Unknown Source) >>> >>> at >>> java.awt.Window.dispatchEventImpl(Unknown Source) >>> >>> at >>> java.awt.Component.dispatchEvent(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.doIntersectionP >>> r >>> ivilege(Unknown Source) >>> >>> at >>> java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionP >>> r >>> ivilege(Unknown Source) >>> >>> at java.awt.EventQueue$4.run(Unknown >>> Source) >>> >>> at java.awt.EventQueue$4.run(Unknown >>> Source) >>> >>> at >>> java.security.AccessController.doPrivileged(Native Method) >>> >>> at >>> java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionP >>> r >>> ivilege(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) >>> >>> >>> >>> This is what I get with Copy schema from the failing layer >>> >>> >>> >>> GEOMETRY GEOMETRY >>> >>> gml_id STRING >>> >>> mtk_id LONG >>> >>> gidm STRING >>> >>> dimension LONG >>> >>> sijaintitarkkuus LONG >>> >>> aineistolahde LONG >>> >>> alkupvm STRING >>> >>> kohderyhma LONG >>> >>> kohdeluokka LONG >>> >>> keskikorkeus STRING >>> >>> saannostelynalaraja STRING >>> >>> saannostelynylaraja STRING >>> >>> vedenpinnankorkeusluvutviittaus STRING >>> >>> versio LONG >>> >>> R_G_B STRING >>> >>> >>> >>> If I use Paste style to a new layer only "gml_id" gets created. >>> >>> >>> >>> -Jukka Rahkonen. >>> >>> >>> >>> --------------------------------------------------------------------- >>> - >>> -------- Developer Access Program for Intel Xeon Phi Processors >>> Access to Intel Xeon Phi processor-based developer platforms. >>> With one year of Intel Parallel Studio XE. >>> Training and support from Colfax. >>> Order your platform today. http://sdm.link/xeonphi >>> >>> >>> >>> _______________________________________________ >>> Jump-pilot-devel mailing list >>> [email protected] >>> https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel >>> >> >> ---------------------------------------------------------------------- >> -------- Developer Access Program for Intel Xeon Phi Processors Access >> to Intel Xeon Phi processor-based developer platforms. >> With one year of Intel Parallel Studio XE. >> Training and support from Colfax. >> Order your platform today. http://sdm.link/xeonphi >> _______________________________________________ >> Jump-pilot-devel mailing list >> [email protected] >> https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel >> >> ---------------------------------------------------------------------- >> -------- Developer Access Program for Intel Xeon Phi Processors Access >> to Intel Xeon Phi processor-based developer platforms. >> With one year of Intel Parallel Studio XE. >> Training and support from Colfax. >> Order your platform today. http://sdm.link/xeonphi >> _______________________________________________ >> Jump-pilot-devel mailing list >> [email protected] >> https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel >> >> ---------------------------------------------------------------------- >> -------- Developer Access Program for Intel Xeon Phi Processors Access >> to Intel Xeon Phi processor-based developer platforms. >> With one year of Intel Parallel Studio XE. >> Training and support from Colfax. >> Order your platform today. http://sdm.link/xeonphi >> _______________________________________________ >> Jump-pilot-devel mailing list >> [email protected] >> https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel >> > > ------------------------------------------------------------------------------ > Developer Access Program for Intel Xeon Phi Processors Access to Intel Xeon > Phi processor-based developer platforms. > With one year of Intel Parallel Studio XE. > Training and support from Colfax. > Order your platform today. http://sdm.link/xeonphi > _______________________________________________ > Jump-pilot-devel mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel > > ------------------------------------------------------------------------------ > Developer Access Program for Intel Xeon Phi Processors > Access to Intel Xeon Phi processor-based developer platforms. > With one year of Intel Parallel Studio XE. > Training and support from Colfax. > Order your platform today. http://sdm.link/xeonphi > _______________________________________________ > Jump-pilot-devel mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel > ------------------------------------------------------------------------------ Developer Access Program for Intel Xeon Phi Processors Access to Intel Xeon Phi processor-based developer platforms. With one year of Intel Parallel Studio XE. Training and support from Colfax. Order your platform today. http://sdm.link/xeonphi _______________________________________________ Jump-pilot-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel
