- #2534, st_distance is returning incorrect results for large geographies
- #2540, Change GUC name for GDAL_DATA to postgis.gdal_datapath
- #2543, invalid join selectivity error from simple query
+ - #2546, GeoJSON with string coordinates parses incorrectly
- #2552, Fix handling of NULL raster in ST_AsTIFF, ST_AsPNG
and ST_AsJPEG
- #2555, Fix parsing issue of range arguments of ST_Reclass
// Read X coordinate
poObjCoord = json_object_array_get_idx( poObj, 0 );
- iType = json_object_get_type(poObjCoord);
- if (iType == json_type_double)
- pt.x = json_object_get_double( poObjCoord );
- else
- pt.x = json_object_get_int( poObjCoord );
+ pt.x = json_object_get_double( poObjCoord );
LWDEBUGF(3, "parse_geojson_coord pt.x = %f.", pt.x );
- // Read Y coordiante
+ // Read Y coordinate
poObjCoord = json_object_array_get_idx( poObj, 1 );
- if (iType == json_type_double)
- pt.y = json_object_get_double( poObjCoord );
- else
- pt.y = json_object_get_int( poObjCoord );
+ pt.y = json_object_get_double( poObjCoord );
LWDEBUGF(3, "parse_geojson_coord pt.y = %f.", pt.y );
if( nSize == 3 ) /* should this be >= 3 ? */
{
- // Read Z coordiante
+ // Read Z coordinate
poObjCoord = json_object_array_get_idx( poObj, 2 );
- if (iType == 3)
- pt.z = json_object_get_double( poObjCoord );
- else
- pt.z = json_object_get_int( poObjCoord );
+ pt.z = json_object_get_double( poObjCoord );
LWDEBUGF(3, "parse_geojson_coord pt.z = %f.", pt.z );
*hasz = LW_TRUE;
}