Commit 90d36366 authored by Markus Wanner's avatar Markus Wanner

Imported Upstream version 2.1.7+dfsg

parent f5f5b60e
2015-03-27 17:21 pramsey
* liblwgeom/lwin_geojson.c: Formatting
2015-03-27 16:26 pramsey
* liblwgeom/lwin_geojson.c: Fix z+ handling
2015-03-26 22:29 pramsey
* liblwgeom/lwin_geojson.c: GeoJSON maintenance
2015-03-24 13:39 dustymugs
* raster/rt_pg/rt_pg.c: invalid operator. Ticket #3090
2015-03-24 13:32 dustymugs
* NEWS, raster/rt_pg/rt_pg.c,
raster/test/regress/rt_dumpvalues.sql: Fix ST_DumpValues()
crasher when cleaning. Ticket #3086
2015-03-23 16:34 strk
* NEWS, configure.ac, liblwgeom/liblwgeom.h.in, liblwgeom/lwutil.c,
postgis/lwgeom_box.c: Do not (re)define strcasestr in a public
header (#3088)
2015-03-20 17:11 pramsey
* HOWTO_RELEASE: Add notes on updateing trunk too
2015-03-20 17:08 pramsey
* HOWTO_RELEASE, extensions/upgradeable_versions.mk,
java/jdbc_jtsparser/pom.xml: Push versions forward
2015-03-20 17:01 pramsey
* NEWS, Version.config: Set versions for 2.1.7dev
2015-03-20 17:00 pramsey
* NEWS, README.postgis, Version.config, doc/release_notes.xml:
Setup for 2.1.6 release
2015-03-20 16:45 pramsey
* ChangeLog: update changelog
2015-03-20 15:50 pramsey
* NEWS: Update NEWs
PostGIS 2.1.7
2015/03/30
* Bug Fixes *
- #3086, ST_DumpValues() crashes backend on cleanup with invalid
band indexes
- #3088, Do not (re)define strcasestr in a liblwgeom.h
- #3094, Malformed GeoJSON inputs crash backend
PostGIS 2.1.6
2015/03/20
......
PostGIS - Geographic Information Systems Extensions to PostgreSQL
=================================================================
:Version: 2.1.6
:Date: 2015-03-20
:Version: 2.1.7
:Date: 2015-03-30
:Website: http://postgis.net
This distribution contains a module which implements GIS simple features, ties
......
......@@ -5,5 +5,5 @@
POSTGIS_MAJOR_VERSION=2
POSTGIS_MINOR_VERSION=1
POSTGIS_MICRO_VERSION=6
POSTGIS_MICRO_VERSION=7
# generated automatically by aclocal 1.14.1 -*- Autoconf -*-
# generated automatically by aclocal 1.15 -*- Autoconf -*-
# Copyright (C) 1996-2013 Free Software Foundation, Inc.
# Copyright (C) 1996-2014 Free Software Foundation, Inc.
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
......@@ -12,7 +12,7 @@
# PARTICULAR PURPOSE.
m4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])])
# Copyright (C) 2003-2013 Free Software Foundation, Inc.
# Copyright (C) 2003-2014 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
......
......@@ -16278,12 +16278,6 @@ fi
$as_echo "#define HAVE_ASPRINTF 1" >>confdefs.h
ac_fn_c_check_func "$LINENO" "strcasestr" "ac_cv_func_strcasestr"
if test "x$ac_cv_func_strcasestr" = xyes; then :
$as_echo "#define HAVE_STRCASESTR 1" >>confdefs.h
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGEFILE_SOURCE value needed for large files" >&5
$as_echo_n "checking for _LARGEFILE_SOURCE value needed for large files... " >&6; }
if ${ac_cv_sys_largefile_source+:} false; then :
......
......@@ -116,7 +116,6 @@ AC_CHECK_FUNC(vasprintf, [HAVE_VASPRINTF=1], [HAVE_VASPRINTF=0])
AC_DEFINE([HAVE_VASPRINTF])
AC_CHECK_FUNC(asprintf, [HAVE_ASPRINTF=1], [HAVE_ASPRINTF=0])
AC_DEFINE([HAVE_ASPRINTF])
AC_CHECK_FUNC(strcasestr, AC_DEFINE([HAVE_STRCASESTR]))
AC_FUNC_FSEEKO()
dnl
......
......@@ -4,8 +4,20 @@
<subtitle>Release Notes</subtitle>
<sect1>
<title>Release 2.1.5</title>
<para>Release date: 2014-12-18</para>
<title>Release 2.1.7</title>
<para>Release date: 2015-03-30</para>
<para>This is a critical bug fix release.</para>
<simplesect>
<title>Bug Fixes</title>
<para>#3086, ST_DumpValues() crashes backend on cleanup with invalid band indexes</para>
<para>#3088, Do not (re)define strcasestr in a liblwgeom.h</para>
<para>#3094, Malformed GeoJSON inputs crash backend</para>
</simplesect>
</sect1>
<sect1>
<title>Release 2.1.6</title>
<para>Release date: 2015-03-20</para>
<para>This is a bug fix and performance improvement release.</para>
<simplesect>
<title>Enhancements</title>
......
# postgis extension
comment = 'PostGIS geometry, geography, and raster spatial types and functions'
default_version = '2.1.6'
default_version = '2.1.7'
module_pathname = '$libdir/postgis-2.1'
relocatable = true
# postgis tiger geocoder extension
comment = 'PostGIS tiger geocoder and reverse geocoder'
default_version = '2.1.6'
default_version = '2.1.7'
relocatable = false
schema = tiger
requires = 'postgis,fuzzystrmatch'
# postgis topology extension
comment = 'PostGIS topology spatial types and functions'
default_version = '2.1.6'
default_version = '2.1.7'
relocatable = false
schema = topology
requires = postgis
......@@ -14,7 +14,8 @@ UPGRADEABLE_VERSIONS = \
2.1.2 \
2.1.3 \
2.1.4 \
2.1.5
2.1.5 \
2.1.6
UPGRADEABLE_VERSIONS_MINOR = \
2.0.0 \
......@@ -34,4 +35,5 @@ UPGRADEABLE_VERSIONS_PATCH = \
2.1.2 \
2.1.3 \
2.1.4 \
2.1.5
2.1.5 \
2.1.6
/**********************************************************************
* $Id: liblwgeom.h.in 13367 2015-03-20 13:53:44Z pramsey $
* $Id: liblwgeom.h.in 13391 2015-03-23 16:34:30Z strk $
*
* PostGIS - Spatial Types for PostgreSQL
*
......@@ -1842,10 +1842,6 @@ extern void lwfree(void *mem);
/* Utilities */
extern char *lwmessage_truncate(char *str, int startpos, int endpos, int maxlength, int truncdirection);
#ifndef HAVE_STRCASESTR
extern char *strcasestr(const char *s, const char *find);
#endif
/*******************************************************************************
* SQLMM internal functions - TODO: Move into separate header files
******************************************************************************/
......
......@@ -59,7 +59,11 @@ findMemberByName(json_object* poObj, const char* pszName )
if( NULL != json_object_get_object(poTmp) )
{
assert( NULL != json_object_get_object(poTmp)->head );
if( NULL == json_object_get_object(poTmp)->head )
{
geojson_lwerror("invalid GeoJSON representation", 2);
return NULL;
}
for( it.entry = json_object_get_object(poTmp)->head;
( it.entry ?
......@@ -90,7 +94,12 @@ parse_geojson_coord(json_object *poObj, int *hasz, POINTARRAY *pa)
const int nSize = json_object_array_length( poObj );
LWDEBUGF(3, "parse_geojson_coord called for array size %d.", nSize );
if ( nSize < 2 )
{
geojson_lwerror("Too few ordinates in GeoJSON", 4);
return LW_FAILURE;
}
// Read X coordinate
poObjCoord = json_object_array_get_idx( poObj, 0 );
pt.x = json_object_get_double( poObjCoord );
......@@ -101,7 +110,7 @@ parse_geojson_coord(json_object *poObj, int *hasz, POINTARRAY *pa)
pt.y = json_object_get_double( poObjCoord );
LWDEBUGF(3, "parse_geojson_coord pt.y = %f.", pt.y );
if( nSize == 3 ) /* should this be >= 3 ? */
if( nSize > 2 ) /* should this be >= 3 ? */
{
// Read Z coordinate
poObjCoord = json_object_array_get_idx( poObj, 2 );
......@@ -109,19 +118,27 @@ parse_geojson_coord(json_object *poObj, int *hasz, POINTARRAY *pa)
LWDEBUGF(3, "parse_geojson_coord pt.z = %f.", pt.z );
*hasz = LW_TRUE;
}
else
else if ( nSize == 2 )
{
*hasz = LW_FALSE;
/* Initialize Z coordinate, if required */
if ( FLAGS_GET_Z(pa->flags) ) pt.z = 0.0;
}
/* TODO: should we account for nSize > 3 ? */
else
{
/* TODO: should we account for nSize > 3 ? */
/* more than 3 coordinates, we're just dropping dimensions here... */
}
/* Initialize M coordinate, if required */
if ( FLAGS_GET_M(pa->flags) ) pt.m = 0.0;
}
else
{
/* If it's not an array, just don't handle it */
return LW_FAILURE;
}
return ptarray_append_point(pa, &pt, LW_TRUE);
}
......@@ -136,10 +153,11 @@ parse_geojson_point(json_object *geojson, int *hasz, int root_srid)
LWDEBUGF(3, "parse_geojson_point called with root_srid = %d.", root_srid );
coords = findMemberByName( geojson, "coordinates" );
if ( ! coords ) {
if ( ! coords )
{
geojson_lwerror("Unable to find 'coordinates' in GeoJSON string", 4);
return NULL;
}
return NULL;
}
pa = ptarray_construct_empty(1, 0, 1);
parse_geojson_coord(coords, hasz, pa);
......@@ -162,8 +180,8 @@ parse_geojson_linestring(json_object *geojson, int *hasz, int root_srid)
points = findMemberByName( geojson, "coordinates" );
if ( ! points ) {
geojson_lwerror("Unable to find 'coordinates' in GeoJSON string", 4);
return NULL;
}
return NULL;
}
pa = ptarray_construct_empty(1, 0, 1);
......@@ -356,10 +374,11 @@ parse_geojson_multipolygon(json_object *geojson, int *hasz, int root_srid)
}
poObjPolys = findMemberByName( geojson, "coordinates" );
if ( ! poObjPolys ) {
if ( ! poObjPolys )
{
geojson_lwerror("Unable to find 'coordinates' in GeoJSON string", 4);
return NULL;
}
return NULL;
}
if( json_type_array == json_object_get_type( poObjPolys ) )
{
......@@ -432,10 +451,11 @@ parse_geojson_geometrycollection(json_object *geojson, int *hasz, int root_srid
}
poObjGeoms = findMemberByName( geojson, "geometries" );
if ( ! poObjGeoms ) {
if ( ! poObjGeoms )
{
geojson_lwerror("Unable to find 'geometries' in GeoJSON string", 4);
return NULL;
}
return NULL;
}
if( json_type_array == json_object_get_type( poObjGeoms ) )
{
......@@ -458,16 +478,18 @@ parse_geojson(json_object *geojson, int *hasz, int root_srid)
json_object* type = NULL;
const char* name;
if( NULL == geojson ) {
if( NULL == geojson )
{
geojson_lwerror("invalid GeoJSON representation", 2);
return NULL;
}
return NULL;
}
type = findMemberByName( geojson, "type" );
if( NULL == type ) {
if( NULL == type )
{
geojson_lwerror("unknown GeoJSON type", 3);
return NULL;
}
return NULL;
}
name = json_object_get_string( type );
......
......@@ -343,23 +343,3 @@ clamp_srid(int srid)
return newsrid;
}
#ifndef HAVE_STRCASESTR
char *strcasestr(const char *s, const char *find)
{
char c, sc;
size_t len;
if ((c = *find++) != 0) {
c = tolower((unsigned char)c);
len = strlen(find);
do {
do {
if ((sc = *s++) == 0)
return (NULL);
} while ((char)tolower((unsigned char)sc) != c);
} while (strncasecmp(s, find, len) != 0);
s--;
}
return ((char *)s);
}
#endif
#! /bin/sh
# Generated automatically by config.status ()
# Libtool was configured on host Butterfly.local:
# Libtool was configured on host Crane.local:
# NOTE: Changes made to this file will be lost: look at ltmain.sh.
# Provide generalized library-building support services.
......@@ -88,7 +88,7 @@ EGREP="/usr/bin/grep -E"
FGREP="/usr/bin/grep -F"
# A BSD- or MS-compatible name lister.
NM="/usr/bin/nm"
NM="/opt/local/bin/nm"
# Whether we need soft or hard links.
LN_S="ln -s"
......
/**********************************************************************
* $Id: lwgeom_box.c 13134 2014-12-01 08:47:21Z strk $
* $Id: lwgeom_box.c 13391 2015-03-23 16:34:30Z strk $
*
* PostGIS - Spatial Types for PostgreSQL
* http://postgis.net
......@@ -52,12 +52,6 @@ Datum BOX2D_in(PG_FUNCTION_ARGS)
gbox_init(&box);
if (strcasestr(str,"BOX(") != str )
{
elog(ERROR,"box2d parser - doesnt start with BOX(");
PG_RETURN_NULL();
}
for(i = 0; str[i]; i++) {
str[i] = tolower(str[i]);
}
......
......@@ -9,7 +9,7 @@
#define POSTGIS_PGSQL_VERSION 93
#define POSTGIS_GEOS_VERSION 35
#define POSTGIS_PROJ_VERSION 48
#define POSTGIS_LIB_VERSION '2.1.6'
#define POSTGIS_LIB_VERSION '2.1.7'
#define POSTGIS_LIBXML2_VERSION 2.9.2
/*
......@@ -18,12 +18,12 @@
* won't substitute within apostrophes)
*/
#define _POSTGIS_SQL_SELECT_POSTGIS_VERSION 'SELECT ''2.1 USE_GEOS=1 USE_PROJ=1 USE_STATS=1''::text AS version'
#define _POSTGIS_SQL_SELECT_POSTGIS_BUILD_DATE 'SELECT ''2015-03-20 17:18:30''::text AS version'
#define _POSTGIS_SQL_SELECT_POSTGIS_BUILD_DATE 'SELECT ''2015-03-30 12:54:40''::text AS version'
#if POSTGIS_SVN_REVISION
#define _POSTGIS_SQL_SELECT_POSTGIS_SCRIPTS_VERSION $$ SELECT '2.1.6'::text || ' r' || POSTGIS_SVN_REVISION::text AS version $$
#define _POSTGIS_SQL_SELECT_POSTGIS_SCRIPTS_VERSION $$ SELECT '2.1.7'::text || ' r' || POSTGIS_SVN_REVISION::text AS version $$
#else
#define _POSTGIS_SQL_SELECT_POSTGIS_SCRIPTS_VERSION $$ SELECT '2.1.6'::text AS version $$
#define _POSTGIS_SQL_SELECT_POSTGIS_SCRIPTS_VERSION $$ SELECT '2.1.7'::text AS version $$
#endif
#define SRID_USR_MAX 998999
......
#define POSTGIS_SVN_REVISION 13384
#define POSTGIS_SVN_REVISION 13414
/*
* $Id: rt_pg.c 13199 2015-01-24 17:33:34Z dustymugs $
* $Id: rt_pg.c 13394 2015-03-24 13:39:49Z dustymugs $
*
* WKTRaster - Raster Types for PostGIS
* http://trac.osgeo.org/postgis/wiki/WKTRaster
......@@ -2754,16 +2754,20 @@ static void rtpg_dumpvalues_arg_destroy(rtpg_dumpvalues_arg arg) {
if (arg->nbands != NULL)
pfree(arg->nbands);
for (i = 0; i < arg->numbands; i++) {
if (arg->values[i] != NULL)
pfree(arg->values[i]);
if (arg->values != NULL) {
for (i = 0; i < arg->numbands; i++) {
if (arg->nodata[i] != NULL)
pfree(arg->nodata[i]);
}
if (arg->values[i] != NULL)
pfree(arg->values[i]);
if (arg->nodata[i] != NULL)
pfree(arg->nodata[i]);
}
if (arg->values != NULL)
pfree(arg->values);
}
if (arg->nodata != NULL)
pfree(arg->nodata);
}
......@@ -3535,7 +3539,7 @@ Datum RASTER_setPixelValuesArray(PG_FUNCTION_ARGS)
pfree(nulls);
}
/* hasnosetvalue and nosetvalue */
else if (!PG_ARGISNULL(6) & PG_GETARG_BOOL(6)) {
else if (!PG_ARGISNULL(6) && PG_GETARG_BOOL(6)) {
hasnosetval = TRUE;
if (PG_ARGISNULL(7))
nosetvalisnull = TRUE;
......
......@@ -100,4 +100,15 @@ DROP TABLE IF EXISTS raster_dumpvalues;
-- ticket #2493
SELECT (ST_DumpValues(ST_AddBand(ST_MakeEmptyRaster(0, 0, 0, 0, 1), ARRAY[ROW(NULL, '8BUI', 255, 0),ROW(NULL, '16BUI', 1, 2)]::addbandarg[]))).*
SELECT (ST_DumpValues(ST_AddBand(ST_MakeEmptyRaster(0, 0, 0, 0, 1), ARRAY[ROW(NULL, '8BUI', 255, 0),ROW(NULL, '16BUI', 1, 2)]::addbandarg[]))).*;
-- #3086
DROP TABLE IF EXISTS raster_tile;
CREATE TABLE raster_tile AS
WITH foo AS (
SELECT ST_AddBand(ST_AddBand(ST_MakeEmptyRaster(3, 3, 0, 0, 1, -1, 0, 0, 0), 1, '8BUI', 1, 0), 2, '8BUI', 10, 0) AS rast UNION ALL
SELECT ST_AddBand(ST_AddBand(ST_MakeEmptyRaster(3, 3, 3, 0, 1, -1, 0, 0, 0), 1, '8BUI', 2, 0), 2, '8BUI', 20, 0) AS rast
)
SELECT ST_Union(rast) AS rast FROM foo;
WITH foo AS (SELECT ST_Tile(rast, 3, 3, TRUE) AS rast FROM raster_tile) SELECT (ST_DumpValues(rast, array[1,2,3])).* FROM foo;
DROP TABLE IF EXISTS raster_tile;
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment