Merge pull request #225 from CartoDB/develop

Release 1.1.5
This commit is contained in:
Mario de Frutos
2016-11-29 17:58:08 +01:00
committed by GitHub
7 changed files with 2635 additions and 6 deletions

View File

@@ -1,3 +1,10 @@
1.1.5 (2016-11-29)
__Bugfixes__
* Return `NULL` instead of raising an exception when a measure is requested for
a geometry where it does not exist ([#220](https://github.com/CartoDB/observatory-extension/issues/220)).
1.1.4 (2016-11-21)
__Bugfixes__

File diff suppressed because one or more lines are too long

View File

@@ -1,5 +1,5 @@
comment = 'CartoDB Observatory backend extension'
default_version = '1.1.4'
default_version = '1.1.5'
requires = 'postgis, postgres_fdw'
superuser = true
schema = cdb_observatory

View File

@@ -1,5 +1,5 @@
comment = 'CartoDB Observatory backend extension'
default_version = '1.1.4'
default_version = '1.1.5'
requires = 'postgis, postgres_fdw'
superuser = true
schema = cdb_observatory

View File

@@ -410,7 +410,12 @@ BEGIN
ELSE geom
END;
raise notice 'Using boundary %', geom_id;
IF geom_id IS NULL THEN
RAISE NOTICE 'No boundary found for geom';
RETURN NULL;
ELSE
RAISE NOTICE 'Using boundary %', geom_id;
END IF;
IF normalize ILIKE 'area' AND numer_aggregate ILIKE 'sum' THEN
map_type := 'areaNormalized';

View File

@@ -66,7 +66,10 @@ t
obs_getmeasure_bad_geometry
t
(1 row)
obs_getmeasure_null
obs_getmeasure_null_geometry
t
(1 row)
obs_getmeasure_out_of_bounds_geometry
t
(1 row)
obs_getcategory_point

View File

@@ -203,10 +203,15 @@ SELECT abs(cdb_observatory.OBS_GetMeasure(
cdb_observatory._ProblemTestArea(),
'us.census.acs.B01003001') - 96230.2929825897) / 96230.2929825897 < 0.001 As OBS_GetMeasure_bad_geometry;
-- OBS_GetMeasure with NULL Input
-- OBS_GetMeasure with NULL Input geometry
SELECT cdb_observatory.OBS_GetMeasure(
NULL,
'us.census.acs.B01003001') IS NULL As OBS_GetMeasure_null;
'us.census.acs.B01003001') IS NULL As OBS_GetMeasure_null_geometry;
-- OBS_GetMeasure where there is no data
SELECT cdb_observatory.OBS_GetMeasure(
ST_SetSRID(st_point(0, 0), 4326),
'us.census.acs.B01003001') IS NULL As OBS_GetMeasure_out_of_bounds_geometry;
-- Point-based OBS_GetCategory
SELECT cdb_observatory.OBS_GetCategory(