On 04.11.2016 14:43, Rahkonen Jukka (MML) wrote:
> Yes, when reading GeoJSON it is OK to create a column as the first met 
> not-null datatype and populate the column with a mixture of proper values and 
> null values.

ok, i'll patch the GeoJSON reader accordingly.

> JSON allows also that "att_1" is string for one feature but integer for 
> another.  I do not know if we should care about this. If such data comes it 
> is obviously not created with traditional GIS. However, casting such fields 
> to strings should work and make a usable result. Feels ineffective and 
> requires multiple scans of GeoJSON data if I understand right.

luckily i've foreseen this. essentially the reader monitors what comes along in 
a column during loading and if there are conflicting types, declares the whole 
column as string.

i am pretty proud about the flexible Feature/FeatureSchema classes i hacked 
specifically for this purpose.

> I am using this site for checking the validity of GeoJSON 
> http://geojsonlint.com/
> With that tool I just found that OpenJUMP writes date fields wrong, like
> "datex":2012-04-23T18:25:43.511Z
> For making it valid, use string as in "datex":"2012-04-23T18:25:43.511Z"

hmm, weird that should be done by json-simple. but ok, i can explicitely 
stringify dates before saving them. done in r5149, please test.

also i removed saving of NULL values as suggested by Michael.
 
> More about dates in JSON
> http://stackoverflow.com/questions/10286204/the-right-json-date-format
> 

hmm.. it says there "JSON itself does not specify how dates should be 
represented" which is my state of knowledge as well. essentially it is treated 
as a string.

also i couldn't find any mention of a DATE type on 
http://geojson.org/geojson-spec.html .

..ede


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