hey Jukka, just found out what the issue with the data types is. you ogr2ogr samples were improper, at least for (Long & Boolean) ;(. see
{ "type": "Feature", "properties": { "City": "South Dakota", "A_Date": "2016\/06\/23 17:02:25.138+03", "B_Integer": 71520, "C_Double": 79522.019838, "D_Long": "207345226552", "E_Boolean": "true", "F_Code": null, ... } should be { "type": "Feature", "properties": { "City": "South Dakota", "A_Date": "2016\/06\/23 17:02:25.138+03", "B_Integer": 71520, "C_Double": 79522.019838, "D_Long": 207345226552, "E_Boolean": true, "F_Code": null, ... } note the missing " for both data types. generally " indicates a string in json. good news though in general - generic attribute type support (String, Long, Double, Boolean)for OJs GeoJSON reader is coming up. ..ede On 03.07.2016 14:11, Rahkonen Jukka (MML) wrote: > Hi Ede, > > I made a very short test which was successful. I can't do more tests before > July 11. Meanwhile I encourage everybody else to test with all kind of > GeoJSON files from various places. Especially different web services > delivering data as GeoJSON are interesting because we could later make > OpenJUMP as a client for such services. > > -Jukka Rahkonen- > > edgar soldin wrote > >> hey Jukka, > >> please try r4945 or later. > > ..ede > > On 27.06.2016 11:47, Rahkonen Jukka (MML) wrote: >> Yes, sure, having all as strings is a good start. >> >> >> -Jukka- >> >> edgar soldin wrote: >> >>> Jukka, >> >>> could you live with all attributes being read as Strings for now? >>> ..ede >> >> On 27.06.2016 08:35, Jukka Rahkonen wrote: >>>> Hi, >>>> >>>> Json datatypes http://www.tutorialspoint.com/json/json_data_types.htm do >>>> not map perfectly with OJ datatypes. Strings can be separated from >>>> numbers, though, but there is another problem in missing schema. Each >>>> feature can have different attributes. >>>> >>>> I believe that GDAL is scanning the GeoJSON file twice for finding all the >>>> attributes which appear in the data and analyzing their datatypes. Rather >>>> often GeoJSON is converted from GIS data and then schema is fixed so that >>>> all features have same set of attributes and empty ones are marked as >>>> NULL. Still it is hard to know the type of attribute if it is NULL. >>>> >>>> Code for reading GeoJSON with GeoTools is at >>>> https://github.com/geotools/geotools/tree/master/modules/unsupported >>>> /g >>>> eojson >>>> >>>> An easy start could be to read the first one feature and build >>>> schema with attribute types double, string, boolean. But what to do >>>> if there are null values? Read first hundred? Read until first not >>>> null? Or let user make a header line with schema into a separate >>>> file "basename.jsont" like with the GDAL CSV driver >>>> http://www.gdal.org/drv_csv.html >>>> >>>> attr_1:string;attr_2:integer;attr_3:double >>>> >>>> Sorry that I can't give simple answers, I thought it would be easier and >>>> handled by JTS already. >>>> >>>> -Jukka- >>>> >>>> edgar.sol...@web.de kirjoitti 2016-06-26 17:19: >>>>> hey Jukka, >>>>> >>>>> attributes do not seem to carry a type in GeoJSON.. any idea how >>>>> this is supposed to be parsed? >>>>> >>>>> ..ede >>>>> >>>>> On 23.06.2016 16:20, Jukka Rahkonen wrote: >>>>>> Hi Ede, >>>>>> >>>>>> Please find attached. I included some small samples in both JML and >>>>>> GeoJSON. For the conversion I used ogr2ogr: >>>>>> >>>>>> ogr2ogr -f geojson output.json input.jml >>>>>> >>>>>> Test data is not perfect: >>>>>> >>>>>> - I just digitized some features and they may be outside the real >>>>>> area of the EPSG:4326 which is default in GeoJSON >>>>>> (-90,-180,90,180) >>>>>> - GDAL warned that DateTime type is not natively supported >>>>>> >>>>>> For handling projections with ogr2ogr use source and target srs >>>>>> parameters as >>>>>> >>>>>> ogr2ogr -f geojson -s_srs epsg:3067 -t_srs epsg:4326 output.json >>>>>> input.jml >>>>>> >>>>>> -Jukka- >>>>>> >>>>>> edgar.sol...@web.de kirjoitti 2016-06-23 15:56: >>>>>>> Jukka, >>>>>>> >>>>>>> do you have an example dataset to tiner with for me? >>>>>>> >>>>>>> ..ede >> >> ---------------------------------------------------------------------- >> -------- Attend Shape: An AT&T Tech Expo July 15-16. Meet us at AT&T >> Park in San Francisco, CA to explore cutting-edge tech and listen to tech >> luminaries present their vision of the future. This family event has >> something for everyone, including kids. Get more information and register >> today. >> http://sdm.link/attshape >> _______________________________________________ >> Jump-pilot-devel mailing list >> Jump-pilot-devel@lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel >> >> ---------------------------------------------------------------------- >> -------- Attend Shape: An AT&T Tech Expo July 15-16. Meet us at AT&T >> Park in San Francisco, CA to explore cutting-edge tech and listen to >> tech luminaries present their vision of the future. This family event >> has something for everyone, including kids. Get more information and >> register today. >> http://sdm.link/attshape >> _______________________________________________ >> Jump-pilot-devel mailing list >> Jump-pilot-devel@lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel >> > > ------------------------------------------------------------------------------ > Attend Shape: An AT&T Tech Expo July 15-16. Meet us at AT&T Park in San > Francisco, CA to explore cutting-edge tech and listen to tech luminaries > present their vision of the future. This family event has something for > everyone, including kids. Get more information and register today. > http://sdm.link/attshape > _______________________________________________ > Jump-pilot-devel mailing list > Jump-pilot-devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel > > ------------------------------------------------------------------------------ > Attend Shape: An AT&T Tech Expo July 15-16. Meet us at AT&T Park in San > Francisco, CA to explore cutting-edge tech and listen to tech luminaries > present their vision of the future. This family event has something for > everyone, including kids. Get more information and register today. > http://sdm.link/attshape > _______________________________________________ > Jump-pilot-devel mailing list > Jump-pilot-devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel > ------------------------------------------------------------------------------ Attend Shape: An AT&T Tech Expo July 15-16. Meet us at AT&T Park in San Francisco, CA to explore cutting-edge tech and listen to tech luminaries present their vision of the future. This family event has something for everyone, including kids. Get more information and register today. http://sdm.link/attshape _______________________________________________ Jump-pilot-devel mailing list Jump-pilot-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel