Compare commits
6 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
cbe7b6dd15 | ||
|
|
603d26c674 | ||
|
|
355f6281e5 | ||
|
|
70f4807139 | ||
|
|
84794124fd | ||
|
|
6c08681446 |
7
NEWS.md
7
NEWS.md
@@ -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__
|
||||
|
||||
2609
release/observatory--1.1.5.sql
Normal file
2609
release/observatory--1.1.5.sql
Normal file
File diff suppressed because one or more lines are too long
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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';
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user