Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • gioele/postgis
  • debian-gis-team/postgis
2 results
Show changes
Commits on Source (6)
Showing with 1656 additions and 239 deletions
image: debian:stretch
test:
script:
- apt-get update -qq && apt-get install -y
......
......@@ -7,13 +7,9 @@ env:
addons:
postgresql: "9.6"
apt:
packages:
- eatmydata
before_install:
- eval "${MATRIX_EVAL}"
- sudo sh -c "echo /usr/lib/libeatmydata/libeatmydata.so >> /etc/ld.so.preload"
- curl -sSfL https://github.com/mapbox/logbt/archive/v2.0.3.tar.gz | sudo tar --gunzip --extract --strip-components=1 --exclude="*md" --exclude="test*" --directory=/usr/local
- curl -sSfL https://raw.githubusercontent.com/mapbox/logbt/30c554dd37b6c96c23fc424f75910fc6d6696f00/bin/logbt | sudo tee /usr/local/bin/logbt > /dev/null
- sudo logbt --setup
......@@ -27,7 +23,7 @@ before_install:
- sudo apt-get update -qq
- mkdir -p /home/travis/deb && touch /home/travis/deb/__ && sudo cp -n /home/travis/deb/* /var/cache/apt/archives || true
- sudo apt-get install -y --allow-unauthenticated --no-install-recommends --no-install-suggests libsfcgal1 libsfcgal-dev postgresql-server-dev-9.6 libxml2-utils libcunit1-dev xsltproc docbook-xsl docbook-mathml dblatex libgeos-dev libjson0-dev libgdal-dev gdb libc6-dbg
- sudo sh -c "echo deb http://archive.ubuntu.com/ubuntu/ artful main restricted universe multiverse >> /etc/apt/sources.list"
- sudo sh -c "echo deb http://archive.ubuntu.com/ubuntu/ bionic main restricted universe multiverse >> /etc/apt/sources.list"
- sudo apt-get update -qq
- sudo apt-get install -y --allow-unauthenticated --no-install-recommends --no-install-suggests binutils libproj-dev libprotobuf-c-dev protobuf-c-compiler
- cp -n /var/cache/apt/archives/* /home/travis/deb || true
......@@ -45,7 +41,7 @@ language: c
compiler: gcc
dist: trusty
dist: xenial
cache:
ccache: true
......
This diff is collapsed.
PostGIS 2.5.3
2019/08/11
* Bug fixes *
- #4348, ST_AsMVTGeom (GEOS): Enforce validation at all times (Raúl Marín)
- #4361, Fix postgis_type_name with (GEOMETRYM,3) (Matt Bretl)
- #4326, Fix circular arc distance calculation (Paul Ramsey)
- #4380, Simple TIN support to allow viz in QGIS (Paul Ramsey)
- #4388, AddRasterConstraints: Ignore NULLs when generating constraints (Raúl Marín)
- #4327, Avoid pfree'ing the result of getenv (Raúl Marín)
- #4406, Throw on invalid characters when decoding geohash (Raúl Marín)
- #4440, Internal type lookups fail over FDW (Paul Ramsey)
- #4445, Fix bug in lwgeom_le (Raúl Marín)
- #4466, Fix undefined behaviour in _postgis_gserialized_stats (Raúl Marín)
- #4209, Handle NULL geometry values in pgsql2shp (Paul Ramsey)
- #4419, Use protobuf version to enable/disable mvt/geobuf (Paul Ramsey)
- #4437, Handle POINT EMPTY in shape loader/dumper (Paul Ramsey)
- #4461, ST_AsTWKB doesn't always remove duplicate points (Nicklas Avén)
- #4459, Fix ST_Subdivide crash on intermediate EMPTY (Darafei Praliaskouski)
- #4470, ST_GeomFromGeoJSON crash on empty rings (Darafei Praliaskouski)
- #4420, update path does not exists for address_standardizer extension (Regina Obe)
PostGIS 2.5.2
2019/03/11
......
......@@ -5,7 +5,7 @@
POSTGIS_MAJOR_VERSION=2
POSTGIS_MINOR_VERSION=5
POSTGIS_MICRO_VERSION=2
POSTGIS_MICRO_VERSION=3
# Liblwgeom interface versioning, reset to 0:0:0 (cur:age:rev)
# when changing POSTGIS_MINOR_VERSION
......
......@@ -15,6 +15,7 @@ jorgearevalo = Jorge Arévalo <jorge.arevalo@deimos-space.com>
kneufeld = Kevin Neufeld <kneufeld.ca@gmail.com>
komzpa = Darafei Praliaskouski <me@komzpa.net>
mcayland = Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk>
mdavis = Martin Davis <mtnclimb@gmail.com>
mleslie = Mark Leslie <mark.s.leslie@gmail.com>
mloskot = Mateusz Loskot <mateusz@loskot.net>
mschaber = Markus Schaber <markus@schabi.de>
......
......@@ -15,6 +15,7 @@ jorgearevalo:Jorge Arévalo <jorge.arevalo@deimos-space.com>
kneufeld:Kevin Neufeld <kneufeld.ca@gmail.com>
komzpa:Darafei Praliaskouski <me@komzpa.net>
mcayland:Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk>
mdavis:Martin Davis <mtnclimb@gmail.com>
mleslie:Mark Leslie <mark.s.leslie@gmail.com>
mloskot:Mateusz Loskot <mateusz@loskot.net>
mschaber:Markus Schaber <markus@schabi.de>
......
......@@ -674,6 +674,7 @@ GTK_CFLAGS
HAVE_PROTOBUF
PROTOBUF_LDFLAGS
PROTOBUF_CPPFLAGS
PROTOCC_VERSION
PROTOCC
PROTOBUFC_LIBS
PROTOBUFC_CFLAGS
......@@ -16758,12 +16759,12 @@ if test -n "$PROTOBUFC_CFLAGS"; then
pkg_cv_PROTOBUFC_CFLAGS="$PROTOBUFC_CFLAGS"
elif test -n "$PKG_CONFIG"; then
if test -n "$PKG_CONFIG" && \
{ { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libprotobuf-c >= 1.1.0\""; } >&5
($PKG_CONFIG --exists --print-errors "libprotobuf-c >= 1.1.0") 2>&5
{ { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libprotobuf-c\""; } >&5
($PKG_CONFIG --exists --print-errors "libprotobuf-c") 2>&5
ac_status=$?
$as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; }; then
pkg_cv_PROTOBUFC_CFLAGS=`$PKG_CONFIG --cflags "libprotobuf-c >= 1.1.0" 2>/dev/null`
pkg_cv_PROTOBUFC_CFLAGS=`$PKG_CONFIG --cflags "libprotobuf-c" 2>/dev/null`
test "x$?" != "x0" && pkg_failed=yes
else
pkg_failed=yes
......@@ -16775,12 +16776,12 @@ if test -n "$PROTOBUFC_LIBS"; then
pkg_cv_PROTOBUFC_LIBS="$PROTOBUFC_LIBS"
elif test -n "$PKG_CONFIG"; then
if test -n "$PKG_CONFIG" && \
{ { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libprotobuf-c >= 1.1.0\""; } >&5
($PKG_CONFIG --exists --print-errors "libprotobuf-c >= 1.1.0") 2>&5
{ { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libprotobuf-c\""; } >&5
($PKG_CONFIG --exists --print-errors "libprotobuf-c") 2>&5
ac_status=$?
$as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; }; then
pkg_cv_PROTOBUFC_LIBS=`$PKG_CONFIG --libs "libprotobuf-c >= 1.1.0" 2>/dev/null`
pkg_cv_PROTOBUFC_LIBS=`$PKG_CONFIG --libs "libprotobuf-c" 2>/dev/null`
test "x$?" != "x0" && pkg_failed=yes
else
pkg_failed=yes
......@@ -16801,9 +16802,9 @@ else
_pkg_short_errors_supported=no
fi
if test $_pkg_short_errors_supported = yes; then
PROTOBUFC_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libprotobuf-c >= 1.1.0" 2>&1`
PROTOBUFC_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libprotobuf-c" 2>&1`
else
PROTOBUFC_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libprotobuf-c >= 1.1.0" 2>&1`
PROTOBUFC_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libprotobuf-c" 2>&1`
fi
# Put the nasty error message in config.log where it belongs
echo "$PROTOBUFC_PKG_ERRORS" >&5
......@@ -16869,8 +16870,8 @@ fi
 
 
if test "x$PROTOCC" = "x"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Protobuf compiler missing, disabling protobuf support." >&5
$as_echo "$as_me: WARNING: Protobuf compiler missing, disabling protobuf support." >&2;}
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Protobuf compiler not in path, disabling protobuf support." >&5
$as_echo "$as_me: WARNING: Protobuf compiler not in path, disabling protobuf support." >&2;}
HAVE_PROTOBUF=no
else
 
......@@ -16879,6 +16880,62 @@ $as_echo "#define HAVE_LIBPROTOBUF 1" >>confdefs.h
fi
fi
 
if test "$HAVE_PROTOBUF" = "yes"; then
# Extract the first word of "protoc-c", so it can be a program name with args.
set dummy protoc-c; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if ${ac_cv_path_PROTOCC+:} false; then :
$as_echo_n "(cached) " >&6
else
case $PROTOCC in
[\\/]* | ?:[\\/]*)
ac_cv_path_PROTOCC="$PROTOCC" # Let the user override the test with a path.
;;
*)
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_path_PROTOCC="$as_dir/$ac_word$ac_exec_ext"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
done
IFS=$as_save_IFS
;;
esac
fi
PROTOCC=$ac_cv_path_PROTOCC
if test -n "$PROTOCC"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROTOCC" >&5
$as_echo "$PROTOCC" >&6; }
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi
PROTOCC_SEMVER=$($PROTOCC --version | grep protobuf-c | awk '{print $2}')
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: checking protoc-c version... $PROTOCC_SEMVER" >&5
$as_echo "checking protoc-c version... $PROTOCC_SEMVER" >&6; }
PROTOCC_VERSION_MAJOR=$(echo "$PROTOCC_SEMVER" | tr '.' ' ' | awk '{print $1}')
PROTOCC_VERSION_MINOR=$(echo "$PROTOCC_SEMVER" | tr '.' ' ' | awk '{print $2}')
PROTOCC_VERSION_PATCH=$(echo "$PROTOCC_SEMVER" | tr '.' ' ' | awk '{print $3}')
PROTOCC_VERSION=$(expr 10000 \* $PROTOCC_VERSION_MAJOR + 100 \* $PROTOCC_VERSION_MINOR + $PROTOCC_VERSION_PATCH)
if test $PROTOCC_VERSION -ge 10100; then
$as_echo "#define HAVE_GEOBUF 1" >>confdefs.h
fi
fi
 
 
 
......@@ -20138,8 +20195,14 @@ $as_echo " Libxml2 config: ${XML2CONFIG}" >&6; }
$as_echo " Libxml2 version: ${POSTGIS_LIBXML2_VERSION}" >&6; }
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: JSON-C support: ${HAVE_JSON}" >&5
$as_echo " JSON-C support: ${HAVE_JSON}" >&6; }
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: protobuf-c support: ${HAVE_PROTOBUF}" >&5
$as_echo " protobuf-c support: ${HAVE_PROTOBUF}" >&6; }
if test "x$HAVE_PROTOBUF" = "xyes"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: protobuf-c version: ${PROTOCC_SEMVER}" >&5
$as_echo " protobuf-c version: ${PROTOCC_SEMVER}" >&6; }
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: PCRE support: ${HAVE_PCRE}" >&5
$as_echo " PCRE support: ${HAVE_PCRE}" >&6; }
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: Perl: ${PERL}" >&5
......
......@@ -991,7 +991,7 @@ if test "$CHECK_PROTOBUF" != "no"; then
HAVE_PROTOBUF=no
else
dnl Ensure libprotobuf-c is of minimum required version
PKG_CHECK_MODULES([PROTOBUFC], [libprotobuf-c >= 1.1.0], [
PKG_CHECK_MODULES([PROTOBUFC], [libprotobuf-c], [
HAVE_PROTOBUF=yes;
PROTOBUF_CPPFLAGS=$PROTOBUFC_CFLAGS;
PROTOBUF_LDFLAGS=$PROTOBUFC_LIBS
......@@ -1003,13 +1003,28 @@ if test "$CHECK_PROTOBUF" != "no"; then
if test "$HAVE_PROTOBUF" = "yes"; then
AC_PATH_PROG(PROTOCC, protoc-c)
if test "x$PROTOCC" = "x"; then
AC_MSG_WARN([Protobuf compiler missing, disabling protobuf support.])
AC_MSG_WARN([Protobuf compiler not in path, disabling protobuf support.])
HAVE_PROTOBUF=no
else
AC_DEFINE([HAVE_LIBPROTOBUF], [1], [Define to 1 if libprotobuf-c is present])
fi
fi
dnl Get version number for protoc-c
if test "$HAVE_PROTOBUF" = "yes"; then
AC_PATH_PROG(PROTOCC, protoc-c)
PROTOCC_SEMVER=$($PROTOCC --version | grep protobuf-c | awk '{print $2}')
AC_MSG_RESULT([checking protoc-c version... $PROTOCC_SEMVER])
PROTOCC_VERSION_MAJOR=$(echo "$PROTOCC_SEMVER" | tr '.' ' ' | awk '{print $1}')
PROTOCC_VERSION_MINOR=$(echo "$PROTOCC_SEMVER" | tr '.' ' ' | awk '{print $2}')
PROTOCC_VERSION_PATCH=$(echo "$PROTOCC_SEMVER" | tr '.' ' ' | awk '{print $3}')
PROTOCC_VERSION=$(expr 10000 \* $PROTOCC_VERSION_MAJOR + 100 \* $PROTOCC_VERSION_MINOR + $PROTOCC_VERSION_PATCH)
if test $PROTOCC_VERSION -ge 10100; then
AC_DEFINE([HAVE_GEOBUF], [1], [Define to 1 if libprotobuf-c is >= 1.1])
fi
fi
AC_SUBST([PROTOCC_VERSION])
AC_SUBST([PROTOBUF_CPPFLAGS])
AC_SUBST([PROTOBUF_LDFLAGS])
AC_SUBST([HAVE_PROTOBUF])
......@@ -1506,7 +1521,12 @@ AC_MSG_RESULT([ PROJ4 version: ${POSTGIS_PROJ_VERSION}])
AC_MSG_RESULT([ Libxml2 config: ${XML2CONFIG}])
AC_MSG_RESULT([ Libxml2 version: ${POSTGIS_LIBXML2_VERSION}])
AC_MSG_RESULT([ JSON-C support: ${HAVE_JSON}])
AC_MSG_RESULT([ protobuf-c support: ${HAVE_PROTOBUF}])
if test "x$HAVE_PROTOBUF" = "xyes"; then
AC_MSG_RESULT([ protobuf-c version: ${PROTOCC_SEMVER}])
fi
AC_MSG_RESULT([ PCRE support: ${HAVE_PCRE}])
AC_MSG_RESULT([ Perl: ${PERL}])
AC_MSG_RESULT()
......
postgis (2.5.3+dfsg-1) unstable; urgency=medium
* New upstream release.
* Refresh patches.
-- Bas Couwenberg <sebastic@debian.org> Sun, 11 Aug 2019 09:18:54 +0200
postgis (2.5.2+dfsg-2) unstable; urgency=medium
* Merge -arch & -indep targets.
......
......@@ -2,7 +2,7 @@
# The default name for the upstream branch is "upstream".
# Change it if the name is different (for instance, "master").
upstream-branch = upstream
upstream-branch = upstream-2.5
# The default name for the Debian branch is "master".
# Change it if the name is different (for instance, "debian/unstable").
......
......@@ -6,7 +6,7 @@ Forwarded: https://trac.osgeo.org/postgis/ticket/3290
--- a/postgis/Makefile.in
+++ b/postgis/Makefile.in
@@ -118,14 +118,8 @@ PG_OBJS= \
@@ -121,14 +121,8 @@ PG_OBJS= \
OBJS=$(PG_OBJS)
# Libraries to link into the module (proj, geos)
......
This diff is collapsed.
......@@ -2,6 +2,35 @@
<appendix id="release_notes">
<title>Appendix</title>
<subtitle>Release Notes</subtitle>
<sect1>
<title>Release 2.5.3</title>
<para>Release date: 2019/08/11</para>
<para>If compiling with PostgreSQL+JIT, LLVM >= 6 is required</para>
<para>Supported PostgreSQL versions for this release are:
PostgreSQL 9.4 - PostgreSQL 11, GEOS &gt;= 3.5</para>
<simplesect>
<title>Bug Fixes</title>
<para>4348, ST_AsMVTGeom (GEOS): Enforce validation at all times (Raúl Marín)</para>
<para>4361, Fix postgis_type_name with (GEOMETRYM,3) (Matt Bretl)</para>
<para>4326, Fix circular arc distance calculation (Paul Ramsey)</para>
<para>4380, Simple TIN support to allow viz in QGIS (Paul Ramsey)</para>
<para>4388, AddRasterConstraints: Ignore NULLs when generating constraints (Raúl Marín)</para>
<para>4327, Avoid pfree'ing the result of getenv (Raúl Marín)</para>
<para>4406, Throw on invalid characters when decoding geohash (Raúl Marín)</para>
<para>4440, Internal type lookups fail over FDW (Paul Ramsey)</para>
<para>4445, Fix bug in lwgeom_le (Raúl Marín)</para>
<para>4466, Fix undefined behaviour in _postgis_gserialized_stats (Raúl Marín)</para>
<para>4209, Handle NULL geometry values in pgsql2shp (Paul Ramsey)</para>
<para>4419, Use protobuf version to enable/disable mvt/geobuf (Paul Ramsey)</para>
<para>4437, Handle POINT EMPTY in shape loader/dumper (Paul Ramsey)</para>
<para>4461, ST_AsTWKB doesn't always remove duplicate points (Nicklas Avén)</para>
<para>4459, Fix ST_Subdivide crash on intermediate EMPTY (Darafei Praliaskouski)</para>
<para>4470, ST_GeomFromGeoJSON crash on empty rings (Darafei Praliaskouski)</para>
<para>4420, update path does not exists for address_standardizer extension (Regina Obe)</para>
</simplesect>
</sect1>
<sect1>
<title>Release 2.5.2</title>
<para>Release date: 2019/03/11</para>
......
include ../upgradeable_versions.mk
OBJS = \
address_parser.o \
address_standardizer.o \
std_pg_hash.o \
analyze.o \
err_param.o \
export.o \
gamma.o \
hash.o \
lexicon.o \
pagc_tools.o \
parseaddress-api.o \
standard.o \
tokenize.o
OBJS_test_main = \
test_main.o \
analyze.o \
err_param.o \
export.o \
gamma.o \
hash.o \
lexicon.o \
pagc_tools.o \
standard.o \
tokenize.o
POSTGIS_PGSQL_VERSION=96
# SQL preprocessor
SQLPP = /usr/bin/cpp -traditional-cpp -w -P
GREP=/bin/grep
PERL=/usr/bin/perl
EXTVERSION = 2.5.3
MINORVERSION = 2.5
MODULE_big = address_standardizer
EXTENSION = address_standardizer
DATA = sql/$(EXTENSION).sql sql/$(EXTENSION)_data_us.sql
DATA_built = \
$(EXTENSION).control \
$(EXTENSION)_data_us.control \
$(NULL)
all: sql/address_standardizer.sql sql/address_standardizer--1.0--$(EXTVERSION).sql sql/address_standardizer--$(EXTVERSION).sql sql/$(EXTENSION)--ANY--$(EXTVERSION).sql \
sql/$(EXTENSION)_data_us.sql sql/address_standardizer--2.5.3.sql sql/$(EXTENSION)_data_us--2.5.3.sql sql/$(EXTENSION)_data_us--$(EXTVERSION)--$(EXTVERSION)next.sql \
sql/$(EXTENSION)_data_us--$(EXTVERSION)next--$(EXTVERSION).sql \
sql/test-init-extensions.sql sql/test-parseaddress.sql sql/test-standardize_address_1.sql sql/test-standardize_address_2.sql
EXTRA_CLEAN += sql/*.sql
DOCS = README.address_standardizer
PG_CPPFLAGS = -g -O2 -I/var/lib/jenkins/workspace/geos/rel-3.6w64/include -I/usr/include/libxml2 -I/usr/include -DHAVE_SFCGAL
SHLIB_LINK = -L/var/lib/jenkins/workspace/geos/rel-3.6w64/lib -lgeos_c -lproj -ljson-c -lprotobuf-c -lxml2 -L/usr/lib/x86_64-linux-gnu -lSFCGAL -Wl,--exclude-libs,ALL -lpcre
EXTRA_CLEAN = usps-st-city-name.txt mk-st-regexp mk-city-regex test_main
REGRESS = test-init-extensions test-parseaddress test-standardize_address_1 test-standardize_address_2
# PGXS information
PG_CONFIG = /var/lib/jenkins/workspace/pg/rel/pg9.6w64/bin/pg_config
PGVER := $(shell $(PG_CONFIG) --version)
# Set PERL _after_ the include of PGXS
PERL=/usr/bin/perl
# Borrow the $libdir substitution from PGXS but customise by running the preprocessor
# and adding the version number
sql/%.sql: %.sql.in
mkdir -p sql
$(SQLPP) -I../libpgcommon $< | grep -v '^#' | \
$(PERL) -lpe "s'MODULE_PATHNAME'\$$libdir/${EXTENSION}'g" > $@
%.control: %.control.in Makefile
cat $< \
| sed -e 's|@EXTVERSION@|$(EXTVERSION)|g' \
> $@
sql/address_standardizer--2.5.3.sql: sql/address_standardizer_types.sql \
sql/address_standardizer_functions.sql
mkdir -p sql
cat $^ > $@
sql/address_standardizer.sql: sql/address_standardizer_types.sql \
sql/address_standardizer_functions.sql
mkdir -p sql
cat $^ > $@
sql/address_standardizer--1.0--$(EXTVERSION).sql: sql/address_standardizer_functions.sql
mkdir -p sql
cat $^ > $@
# Scripts making up the extension minor upgrade file
# NOTE: order matters
EXTENSION_UPGRADE_SCRIPTS = \
sql/address_standardizer_functions.sql
sql/$(EXTENSION)--ANY--$(EXTVERSION).sql: $(EXTENSION_UPGRADE_SCRIPTS)
cat $(EXTENSION_UPGRADE_SCRIPTS) > $@
include ../upgrade-paths-rules.mk
# build us data extension
sql/$(EXTENSION)_data_us--$(EXTVERSION).sql: us_lex.sql us_gaz.sql us_rules.sql sql_bits/address_standardizer_data_us_mark_editable_objects.sql.in
mkdir -p sql
cat $^ > $@
sql/$(EXTENSION)_data_us.sql: us_lex.sql us_gaz.sql us_rules.sql sql_bits/address_standardizer_data_us_mark_editable_objects.sql.in
mkdir -p sql
cat $^ > $@
# upgrade logic for us data extension (to go to next cludge for dev upgrading)
sql/$(EXTENSION)_data_us--$(EXTVERSION)--$(EXTVERSION)next.sql: sql/$(EXTENSION)_data_us--$(EXTVERSION).sql
mkdir -p sql
cat $^ > $@
# upgrade logic for us data extension (to go to original round-robin yoyo cludge for dev upgrading)
sql/$(EXTENSION)_data_us--$(EXTVERSION)next--$(EXTVERSION).sql: sql/$(EXTENSION)_data_us--$(EXTVERSION).sql
mkdir -p sql
cat $^ > $@
mk-st-regexp: mk-st-regexp.pl
$(PERL) -c mk-st-regexp.pl
rm -f mk-st-regexp
echo "#! " $(PERL) > mk-st-regexp
cat mk-st-regexp.pl >> mk-st-regexp
chmod ugo+x mk-st-regexp
mk-city-regex: mk-city-regex.pl usps-st-city-name.txt
$(PERL) -c mk-city-regex.pl
rm -f mk-city-regex
echo "#! " $(PERL) > mk-city-regex
cat mk-city-regex.pl >> mk-city-regex
chmod ugo+x mk-city-regex
usps-st-city-name.txt: usps-st-city-orig.txt usps-st-city-adds.txt
cat usps-st-city-orig.txt usps-st-city-adds.txt | sort -u >usps-st-city-name.txt
#parseaddress-stcities.h: mk-city-regex
# ./mk-city-regex > parseaddress-stcities.h
#parseaddress-regex.h: mk-st-regexp
# ./mk-st-regexp > parseaddress-regex.h
dist-clean:
rm -f mk-st-regexp mk-city-regex usps-st-city-name.txt test_main Makefile
test_main: $(OBJS_test_main)
gcc -o test_main $(OBJS_test_main) $(LDFLAGS) $(LIBS)
test_main.o: test_main.c pagc_api.h pagc_std_api.h
address_parser.o: address_parser.c parseaddress-api.h
address_standardizer.o: address_standardizer.c std_pg_hash.h pagc_api.h pagc_std_api.h
analyze.o: analyze.c pagc_api.h
err_param.o: err_param.c pagc_api.h
export.o: export.c pagc_api.h pagc_tools.h
gamma.o: gamma.c pagc_api.h pagc_std_api.h gamma.h
hash.o: hash.c hash.h khash.h
lexicon.o: lexicon.c pagc_api.h pagc_std_api.h
pagc_tools.o: pagc_tools.c pagc_tools.h pagc_common.h
parseaddress-api.o: parseaddress-api.c parseaddress-api.h parseaddress-stcities.h parseaddress-regex.h
standard.o: standard.c pagc_api.h
tokenize.o: tokenize.c pagc_api.h
std_pg_hash.o: std_pg_hash.c std_pg_hash.h pagc_api.h pagc_std_api.h
#only extension files
DATA += $(wildcard sql/*--*.sql)
EXTRA_CLEAN += sql/*.sql
EXTRA_CLEAN += $(wildcard expected/*--*.out)
EXTRA_CLEAN += sql/$(EXTENSION)--$(EXTVERSION).sql sql/$(EXTENSION)--unpackaged--$(EXTVERSION).sql
EXTRA_CLEAN += sql/$(EXTENSION)--$(EXTVERSION).sql sql/$(EXTENSION)--unpackaged--$(EXTVERSION).sql *.a *.so *.dll
distclean: clean
rm Makefile
PGXS := /var/lib/jenkins/workspace/pg/rel/pg9.6w64/lib/postgresql/pgxs/src/makefiles/pgxs.mk
include $(PGXS)
PERL = /usr/bin/perl
include ../upgradeable_versions.mk
OBJS = \
address_parser.o \
address_standardizer.o \
......@@ -41,15 +42,13 @@ DATA_built = \
$(EXTENSION)_data_us.control \
$(NULL)
all: sql/address_standardizer.sql sql/address_standardizer--1.0--$(EXTVERSION).sql sql/address_standardizer--$(EXTVERSION).sql sql/address_standardizer--$(EXTVERSION)--$(EXTVERSION)next.sql sql/address_standardizer--$(EXTVERSION)next--$(EXTVERSION).sql \
all: sql/address_standardizer.sql sql/address_standardizer--1.0--$(EXTVERSION).sql sql/address_standardizer--$(EXTVERSION).sql sql/$(EXTENSION)--ANY--$(EXTVERSION).sql \
sql/$(EXTENSION)_data_us.sql sql/address_standardizer--@POSTGIS_LIB_VERSION@.sql sql/$(EXTENSION)_data_us--@POSTGIS_LIB_VERSION@.sql sql/$(EXTENSION)_data_us--$(EXTVERSION)--$(EXTVERSION)next.sql \
sql/$(EXTENSION)_data_us--$(EXTVERSION)next--$(EXTVERSION).sql \
sql/test-init-extensions.sql sql/test-parseaddress.sql sql/test-standardize_address_1.sql sql/test-standardize_address_2.sql
EXTRA_CLEAN += sql/*.sql
DOCS = README.address_standardizer
PG_CPPFLAGS = @CFLAGS@ @CPPFLAGS@
......@@ -92,15 +91,16 @@ sql/address_standardizer--1.0--$(EXTVERSION).sql: sql/address_standardizer_func
mkdir -p sql
cat $^ > $@
# upgrade logic for us data extension (to go to next cludge for dev upgrading)
sql/$(EXTENSION)--$(EXTVERSION)--$(EXTVERSION)next.sql: sql/address_standardizer_functions.sql
mkdir -p sql
cat $^ > $@
# Scripts making up the extension minor upgrade file
# NOTE: order matters
EXTENSION_UPGRADE_SCRIPTS = \
sql/address_standardizer_functions.sql
# upgrade logic for us data extension (to go to original round-robin yoyo cludge for dev upgrading)
sql/$(EXTENSION)--$(EXTVERSION)next--$(EXTVERSION).sql: sql/address_standardizer_functions.sql
mkdir -p sql
cat $^ > $@
sql/$(EXTENSION)--ANY--$(EXTVERSION).sql: $(EXTENSION_UPGRADE_SCRIPTS)
cat $(EXTENSION_UPGRADE_SCRIPTS) > $@
include ../upgrade-paths-rules.mk
# build us data extension
sql/$(EXTENSION)_data_us--$(EXTVERSION).sql: us_lex.sql us_gaz.sql us_rules.sql sql_bits/address_standardizer_data_us_mark_editable_objects.sql.in
......
......@@ -36,6 +36,7 @@ UPGRADEABLE_VERSIONS = \
2.3.7 \
2.3.8 \
2.3.9 \
2.3.10 \
2.4.0 \
2.4.1 \
2.4.2 \
......@@ -44,6 +45,7 @@ UPGRADEABLE_VERSIONS = \
2.4.5 \
2.4.6 \
2.4.7 \
2.4.8 \
2.5.0 \
2.5.1 \
2.5.2dev
2.5.2
......@@ -1038,6 +1038,23 @@ static void test_lwgeom_remove_repeated_points(void)
lwfree(ewkt);
}
static void
test_geohash_bbox(void)
{
double lat[2], lon[2];
/* SELECT ST_GeoHash(ST_SetSRID(ST_MakePoint(-126,48),4326)) */
decode_geohash_bbox("c0w3hf1s70w3hf1s70w3", lat, lon, 100);
CU_ASSERT_DOUBLE_EQUAL(lat[0], 48, 1e-11);
CU_ASSERT_DOUBLE_EQUAL(lat[1], 48, 1e-11);
CU_ASSERT_DOUBLE_EQUAL(lon[0], -126, 1e-11);
CU_ASSERT_DOUBLE_EQUAL(lon[1], -126, 1e-11);
cu_error_msg_reset();
decode_geohash_bbox("@@@@@@", lat, lon, 100);
ASSERT_STRING_EQUAL(cu_error_msg, "decode_geohash_bbox: Invalid character '@'");
}
static void test_lwgeom_simplify(void)
{
LWGEOM *l;
......@@ -1503,6 +1520,7 @@ void algorithms_suite_setup(void)
PG_ADD_TEST(suite,test_geohash_precision);
PG_ADD_TEST(suite,test_geohash);
PG_ADD_TEST(suite,test_geohash_point_as_int);
PG_ADD_TEST(suite, test_geohash_bbox);
PG_ADD_TEST(suite,test_isclosed);
PG_ADD_TEST(suite,test_lwgeom_simplify);
PG_ADD_TEST(suite,test_lw_arc_center);
......
......@@ -31,7 +31,8 @@ static LWGEOM* lwgeom_from_text(const char *str)
}
#define DIST2DTEST(str1, str2, res) \
do_test_mindistance_tolerance(str1, str2, res, __LINE__, lwgeom_mindistance2d_tolerance)
do_test_mindistance_tolerance(str1, str2, res, __LINE__, lwgeom_mindistance2d_tolerance);\
do_test_mindistance_tolerance(str2, str1, res, __LINE__, lwgeom_mindistance2d_tolerance)
#define DIST3DTEST(str1, str2, res) \
do_test_mindistance_tolerance(str1, str2, res, __LINE__, lwgeom_mindistance3d_tolerance)
......@@ -794,6 +795,18 @@ test_lw_dist2d_arc_arc(void)
POINT2D A1, A2, A3, B1, B2, B3;
int rv;
/* Ticket #4326 */
lw_dist2d_distpts_init(&dl, DIST_MIN);
A1.x = -1.0; A1.y = 4.0;
A2.x = 0.0; A2.y = 5.0;
A3.x = 1.0; A3.y = 4.0;
B1.x = 1.0; B1.y = 6.0;
B2.x = 6.0; B2.y = 1.0;
B3.x = 9.0; B3.y = 7.0;
rv = lw_dist2d_arc_arc(&A1, &A2, &A3, &B1, &B2, &B3, &dl);
CU_ASSERT_EQUAL( rv, LW_SUCCESS );
CU_ASSERT_DOUBLE_EQUAL(dl.distance, 0.0475666, 0.000001);
/* Unit semicircle at 0,0 */
B1.x = -1; B1.y = 0;
B2.x = 0 ; B2.y = 1;
......@@ -958,7 +971,6 @@ test_lw_dist2d_arc_arc(void)
CU_ASSERT_EQUAL( rv, LW_SUCCESS );
CU_ASSERT_DOUBLE_EQUAL(dl.distance, 5.0, 0.000001);
}
static void
......
......@@ -709,6 +709,7 @@ unsigned int geohash_point_as_int(POINT2D *pt)
** set in them will be the southwest and northeast coordinates of the bounding
** box accordingly. A precision less than 0 indicates that the entire length
** of the GeoHash should be used.
** It will call `lwerror` if an invalid character is found
*/
void decode_geohash_bbox(char *geohash, double *lat, double *lon, int precision)
{
......@@ -731,6 +732,13 @@ void decode_geohash_bbox(char *geohash, double *lat, double *lon, int precision)
for (i = 0; i < precision; i++)
{
c = tolower(geohash[i]);
/* Valid characters are all digits and letters except a, i, l and o */
if (!(((c >= '0') && (c <= '9')) ||
((c >= 'b') && (c <= 'z') && (c != 'i') && (c != 'l') && (c != 'o'))))
{
lwerror("%s: Invalid character '%c'", __func__, geohash[i]);
return;
}
cd = strchr(base32, c) - base32;
for (j = 0; j < 5; j++)
......