id,summary,reporter,owner,description,type,status,priority,milestone,component,version,severity,resolution,keywords,cc 4082,GeoJSON driver detects type on first feature,barryrowlingson,Even Rouault,"Numbers in OGR can be Integer or Real. If the numeric property of the first feature in a GeoJSON file looks like an Integer, then OGR treats that property as Integer, and numerically truncates any Real values in further features. Example snippet of two features: {{{ { ""type"": ""Feature"", ""properties"": { ""z1"": 4, ""z2"": 2.100000 } [...] { ""type"": ""Feature"", ""properties"": { ""z1"": 3.2, ""z2"": 3.100000 } [...] }}} like that, ogrinfo reports {{{ z1: Integer (0.0) z2: Real (0.0) }}} and then drops .2 from 3.2 in the second feature: {{{ OGRFeature(OGRGeoJSON):1 z1 (Integer) = 3 z2 (Real) = 3.1 POINT (2 2) }}} Changing the first feature to: {{{ { ""type"": ""Feature"", ""properties"": { ""z1"": 4.0, ""z2"": 2.100000 } }}} (ie adding the "".0"" to the ""4"") causes both fields to be Real. The JSON spec only has 'number' class, and no differential between integers and reals, so maybe anything numeric should be an OGR Real. [This was spotted in some GeoJSON generated by Geoserver]",defect,closed,normal,1.8.1,OGR_SF,1.8.0,normal,fixed,geojson,