id,summary,reporter,owner,description,type,status,priority,milestone,component,version,severity,resolution,keywords,cc 6517,GeoJSON: improper type detection (String) when first value of a field is null,Even Rouault,Even Rouault,"Reported as https://lists.osgeo.org/pipermail/gdal-dev/2016-May/044435.html {{{ At the moment the geojson reader automatically converts an attribute where the first feature is null to string. Is it possible to check values also from the next features and based on that to set the type of the column? For example for the following geojson the type of int_prop2 and dbl_prop1 will be string: { ""features"": [ { ""geometry"": { ""coordinates"": [ 1.0, 0.0 ], ""type"": ""Point"" }, ""properties"": { ""name"": ""point2"", ""int_prop1"": 2, ""int_prop2"": null, ""dbl_prop1"": 2.1, ""dbl_prop2"": null }, ""type"": ""Feature"" }, { ""geometry"": { ""coordinates"": [ 0.0, 0.0 ], ""type"": ""Point"" }, ""properties"": { ""name"": ""point1"", ""int_prop1"": 1, ""int_prop2"": 1, ""dbl_prop1"": 1.1, ""dbl_prop2"": 1.1 }, ""type"": ""Feature"" } ], ""type"": ""FeatureCollection"" } Result in the console when using ogrinfo with gdal version 2.1.0, released 2016/04/25: name: String (0.0) int_prop1: Integer (0.0) int_prop2: String (0.0) dbl_prop1: Real (0.0) dbl_prop2: String (0.0) OGRFeature(OGRGeoJSON):0 name (String) = point2 int_prop1 (Integer) = 2 int_prop2 (String) = (null) dbl_prop1 (Real) = 2.1 dbl_prop2 (String) = (null) POINT (1 0) OGRFeature(OGRGeoJSON):1 name (String) = point1 int_prop1 (Integer) = 1 int_prop2 (String) = 1 dbl_prop1 (Real) = 1.1 dbl_prop2 (String) = 1.1000 POINT (0 0) }}}",defect,closed,normal,2.1.1,OGR_SF,unspecified,normal,fixed,geojson null,