only for these two types or for Boolean as well?

..ede

On 03.11.2016 15:53, Rahkonen Jukka (MML) wrote:
> Hi,
> 
> JML reader accepts nulls in strings and longs (try with the attached file), I 
> would say that GeoJSON driver should do the same.       
> 
> -Jukka-
> 
> [email protected] wrote:
> 
> Aihe: Re: [JPP-Devel] Can't edit the schema of some layers
> 
>> Mike, Jukka,
> 
>> so what do you guys say. should the GeoJSON reader
>   accept Long/null mixed columns as Long and do the same for the other 
> attribute types or
>   enforce these columns to be of type String as it is implemented now.
> 
> ..ede
> 
> On 03.11.2016 13:20, Rahkonen Jukka (MML) wrote:
>>> OpenJUMP can even set any attribute into NULL but only I and Michaël 
>> know how until now *)
>>
>>> It looks like numeric attributes without any value are null while strings 
>>> and dates can have a value, be empty, or be NULL.  Michaël can explain 
>>> better but at least in shapefiles or actually in dbf string born as NULL 
>>> but it is saved into a file as an empty string which is actually not empty 
>>> but filled with asterisks. So if you open an existing shapefile you do not 
>>> see NULLs because they are empty strings at that stage.
>>
>> -Jukka-
>>
>> *) with some attribute types (date, string) you must double click and 
>> hold  the left button pressed and little NULL appears beside the 
>> cursor)
>>
>> -----Alkuperäinen viesti-----
>> Lähettäjä: [email protected] [mailto:[email protected]]
>> Lähetetty: 3. marraskuuta 2016 13:56
>> Vastaanottaja: OpenJump develop and use 
>> <[email protected]>
>> Aihe: Re: [JPP-Devel] Can't edit the schema of some layers
>>
>> Jukka, please try the latest snapshot from a minute ago.
>>
>> generally the reader assumes that NULL is a specific type. it looks like OJ 
>> tolerates numerical columns with NULL values. is that standard, should i 
>> modify the reader accordingly? is it a general rule for all attribute types?
>>
>> ..ede
>>
>>
>> On 03.11.2016 12:34, [email protected] wrote:
>>> 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.conve
>>>>>> r
>>>>>> t(
>>>>>> V
>>>>>> iewSchemaPlugIn.java:346)
>>>>>>
>>>>>>                              at
>>>>>> com.vividsolutions.jump.workbench.ui.plugin.ViewSchemaPlugIn.conve
>>>>>> r
>>>>>> t(
>>>>>> V
>>>>>> iewSchemaPlugIn.java:287)
>>>>>>
>>>>>>                              at
>>>>>> com.vividsolutions.jump.workbench.ui.plugin.ViewSchemaPlugIn.apply
>>>>>> C
>>>>>> ha
>>>>>> n
>>>>>> ges(ViewSchemaPlugIn.java:165)
>>>>>>
>>>>>>                              at
>>>>>> com.vividsolutions.jump.workbench.ui.plugin.ViewSchemaPlugIn.acces
>>>>>> s
>>>>>> $3
>>>>>> 0
>>>>>> 0(ViewSchemaPlugIn.java:77)
>>>>>>
>>>>>>                              at
>>>>>> com.vividsolutions.jump.workbench.ui.plugin.ViewSchemaPlugIn$EditS
>>>>>> c
>>>>>> he
>>>>>> m
>>>>>> aFrame$3.actionPerformed(ViewSchemaPlugIn.java:746)
>>>>>>
>>>>>>                              at
>>>>>> com.vividsolutions.jump.workbench.ui.SchemaPanel.fireActionPerform
>>>>>> e
>>>>>> d(
>>>>>> S
>>>>>> chemaPanel.java:687)
>>>>>>
>>>>>>                              at
>>>>>> com.vividsolutions.jump.workbench.ui.SchemaPanel.applyButton_actio
>>>>>> n
>>>>>> Pe
>>>>>> r
>>>>>> formed(SchemaPanel.java:677)
>>>>>>
>>>>>>                              at
>>>>>> com.vividsolutions.jump.workbench.ui.SchemaPanel$14.actionPerforme
>>>>>> d
>>>>>> (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.doIntersecti
>>>>>> o
>>>>>> nP
>>>>>> r
>>>>>> ivilege(Unknown Source)
>>>>>>
>>>>>>                              at
>>>>>> java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersecti
>>>>>> o
>>>>>> nP
>>>>>> 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.doIntersecti
>>>>>> o
>>>>>> nP
>>>>>> 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
>>>
>>
>> ----------------------------------------------------------------------
>> -------- 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

Reply via email to