From 8f161c1e688875e1f7513939328877bc2786aece Mon Sep 17 00:00:00 2001 From: Andy Eschbacher Date: Wed, 20 Apr 2016 15:13:22 -0400 Subject: [PATCH 01/41] debugged getgeometry and getgeometryid --- src/pg/sql/42_observatory_exploration.sql | 29 ++++ src/pg/sql/44_observatory_geometries.sql | 159 ++++++++++++++++++++++ 2 files changed, 188 insertions(+) create mode 100644 src/pg/sql/42_observatory_exploration.sql create mode 100644 src/pg/sql/44_observatory_geometries.sql diff --git a/src/pg/sql/42_observatory_exploration.sql b/src/pg/sql/42_observatory_exploration.sql new file mode 100644 index 0000000..12d3492 --- /dev/null +++ b/src/pg/sql/42_observatory_exploration.sql @@ -0,0 +1,29 @@ + +-- return a table that contains a string match based on input +-- TODO: implement search for timespan + +CREATE OR REPLACE FUNCTION OBS_SearchTables( + search_term text, + time_span text DEFAULT '2009 - 2013' +) +RETURNS text[] +As $$ +DECLARE + out_var text[]; +BEGIN + + EXECUTE + 'SELECT array_agg(tablename) +FROM observatory.obs_table t JOIN observatory.obs_column_table ct + ON ct.table_id = t.id +JOIN observatory.obs_column c + ON ct.column_id = c.id +WHERE c.type ILIKE ''geometry'' +AND c.id = $1' + INTO out_var + USING search_term; + + RETURN out_var; + +END; +$$ LANGUAGE plpgsql; diff --git a/src/pg/sql/44_observatory_geometries.sql b/src/pg/sql/44_observatory_geometries.sql new file mode 100644 index 0000000..38c725d --- /dev/null +++ b/src/pg/sql/44_observatory_geometries.sql @@ -0,0 +1,159 @@ +-- Returns the polygon(s) that overlap with the input geometry. +-- Input: +-- :param geom geometry: input geometry +-- :param geometry_level text: table to get polygon from (can be approximate name) +-- :param use_literal boolean: use the literal table name (defaults to true) + +-- From an input point geometry, find the boundary which intersects with the centroid of the input geometry + +CREATE OR REPLACE FUNCTION Andy_OBS_GetGeometry( + geom geometry(Geometry, 4326), + geometry_level text DEFAULT '"us.census.tiger".census_tract', -- TODO: from a specified column id list (e.g., list of available catalog, see OBS_List) + time_span text DEFAULT '2009 - 2013') + RETURNS geometry(Geometry, 4326) +AS $$ +DECLARE + boundary geometry(Geometry, 4326); + target_table text; + target_table_list text[]; +BEGIN + + -- TODO: Check if SRID = 4326, if not transform? + + -- if not a point, raise error + IF ST_GeometryType(geom) != 'ST_Point' + THEN + RAISE EXCEPTION 'Invalid geometry type (%), expecting ''ST_Point''', ST_GeometryType(geom); + END IF; + + target_table_list := OBS_SearchTables(geometry_level, time_span); + + -- if no tables are found, raise notice and return null + IF array_length(target_table_list, 1) IS NULL + THEN + RAISE NOTICE 'No boundaries found for ''%'' in ''%''', ST_AsText(geom), geometry_level; + RETURN NULL::geometry; + ELSE + -- else, choose first result + target_table = target_table_list[1]; + END IF; + + RAISE NOTICE 'target_table: %', target_table; + + -- return the first boundary in intersections + EXECUTE format( + 'SELECT t.the_geom + FROM observatory.%s As t + WHERE ST_Intersects($1, t.the_geom) + LIMIT 1', target_table) + INTO boundary + USING geom; + + RETURN boundary; + +END; +$$ LANGUAGE plpgsql; + +CREATE OR REPLACE FUNCTION ANDY_OBS_GetGeometryId( + geom geometry(Geometry, 4326), + geometry_level text DEFAULT '"us.census.tiger".census_tract', + time_span text DEFAULT '2009 - 2013' +) +RETURNS text +AS $$ +DECLARE + output_id text; + target_table text; + target_table_list text[]; +BEGIN + + -- If not point, raise error + IF ST_GeometryType(geom) != 'ST_Point' + THEN + RAISE EXCEPTION 'Error: Invalid geometry type (%), expecting ''ST_Point''', ST_GeometryType(geom); + END IF; + + target_table_list := OBS_SearchTables(geometry_level, time_span); + + -- if no tables are found, raise error + IF array_length(target_table_list, 1) IS NULL + THEN + RAISE NOTICE 'Error: No boundaries found for ''%''', geometry_level; + RETURN NULL::text; + ELSE + target_table = target_table_list[1]; + END IF; + + RAISE NOTICE 'target_table: %', target_table; + + -- return name of geometry id column + EXECUTE format( + 'SELECT t.geoid + FROM observatory.%s As t + WHERE ST_Intersects($1, t.the_geom) + LIMIT 1', target_table) + INTO output_id + USING geom; + + RETURN output_id; + +END; +$$ LANGUAGE plpgsql; + +-- + +CREATE OR REPLACE FUNCTION OBS_GetGeometryById( + geom_ref text, -- ex: '36047' + geometry_level text -- ex: '"us.census.tiger".county' +) +RETURNS geometry(geometry, 4326) +AS $$ +DECLARE + boundary geometry; + target_table text; + geoid_colname text; + geom_colname text; +BEGIN + + EXECUTE + format( + $string$ + SELECT geoid_ct.colname As geoid_colname, + tablename, + geom_ct.colname As geom_colname + FROM observatory.obs_column_table As geoid_ct, + observatory.obs_table As geom_t, + observatory.obs_column_table As geom_ct, + observatory.obs_column As geom_c + WHERE geoid_ct.column_id + IN ( + SELECT source_id + FROM observatory.obs_column_to_column + WHERE reltype = 'geom_ref' + AND target_id = '%s' + ) + AND geoid_ct.table_id = geom_t.id and + geom_t.id = geom_ct.table_id and + geom_ct.column_id = geom_c.id and + geom_c.type ilike 'geometry' + $string$, geometry_level + ) INTO geoid_colname, target_table, geom_colname; + + IF target_table IS NULL + THEN + RAISE NOTICE 'No geometries found'; + RETURN NULL::geometry; + END IF; + + -- retrieve boundary + EXECUTE format( + 'SELECT t.%s + FROM observatory.%s As t + WHERE t.%s = ''%s'' + LIMIT 1', geom_colname, target_table, geoid_colname, geom_ref) + INTO boundary; + + RETURN boundary; + +END; +$$ LANGUAGE plpgsql; From 16d65d01f3d536b5b1c89e6e648d8b8a37d5f01e Mon Sep 17 00:00:00 2001 From: Andy Eschbacher Date: Thu, 21 Apr 2016 09:48:20 -0400 Subject: [PATCH 02/41] finishing getgeometrybyid --- src/pg/sql/44_observatory_geometries.sql | 36 +++++++++++++----------- 1 file changed, 20 insertions(+), 16 deletions(-) diff --git a/src/pg/sql/44_observatory_geometries.sql b/src/pg/sql/44_observatory_geometries.sql index 38c725d..f2d1c20 100644 --- a/src/pg/sql/44_observatory_geometries.sql +++ b/src/pg/sql/44_observatory_geometries.sql @@ -1,14 +1,14 @@ -- Returns the polygon(s) that overlap with the input geometry. -- Input: -- :param geom geometry: input geometry --- :param geometry_level text: table to get polygon from (can be approximate name) +-- :param boundary_id text: table to get polygon from (can be approximate name) -- :param use_literal boolean: use the literal table name (defaults to true) -- From an input point geometry, find the boundary which intersects with the centroid of the input geometry CREATE OR REPLACE FUNCTION Andy_OBS_GetGeometry( geom geometry(Geometry, 4326), - geometry_level text DEFAULT '"us.census.tiger".census_tract', -- TODO: from a specified column id list (e.g., list of available catalog, see OBS_List) + boundary_id text DEFAULT '"us.census.tiger".census_tract', -- TODO: from a specified column id list (e.g., list of available catalog, see OBS_List) time_span text DEFAULT '2009 - 2013') RETURNS geometry(Geometry, 4326) AS $$ @@ -26,12 +26,12 @@ BEGIN RAISE EXCEPTION 'Invalid geometry type (%), expecting ''ST_Point''', ST_GeometryType(geom); END IF; - target_table_list := OBS_SearchTables(geometry_level, time_span); + target_table_list := OBS_SearchTables(boundary_id, time_span); -- if no tables are found, raise notice and return null IF array_length(target_table_list, 1) IS NULL THEN - RAISE NOTICE 'No boundaries found for ''%'' in ''%''', ST_AsText(geom), geometry_level; + RAISE NOTICE 'No boundaries found for ''%'' in ''%''', ST_AsText(geom), boundary_id; RETURN NULL::geometry; ELSE -- else, choose first result @@ -56,7 +56,7 @@ $$ LANGUAGE plpgsql; CREATE OR REPLACE FUNCTION ANDY_OBS_GetGeometryId( geom geometry(Geometry, 4326), - geometry_level text DEFAULT '"us.census.tiger".census_tract', + boundary_id text DEFAULT '"us.census.tiger".census_tract', time_span text DEFAULT '2009 - 2013' ) RETURNS text @@ -73,12 +73,12 @@ BEGIN RAISE EXCEPTION 'Error: Invalid geometry type (%), expecting ''ST_Point''', ST_GeometryType(geom); END IF; - target_table_list := OBS_SearchTables(geometry_level, time_span); + target_table_list := OBS_SearchTables(boundary_id, time_span); -- if no tables are found, raise error IF array_length(target_table_list, 1) IS NULL THEN - RAISE NOTICE 'Error: No boundaries found for ''%''', geometry_level; + RAISE NOTICE 'Error: No boundaries found for ''%''', boundary_id; RETURN NULL::text; ELSE target_table = target_table_list[1]; @@ -100,11 +100,14 @@ BEGIN END; $$ LANGUAGE plpgsql; --- +-- Given a geometry reference (e.g., geoid for US Census), and it's geometry level (see OBS_ListGeomColumns() for all available boundary ids), give back the boundary that corresponds to that reference and level. + +-- @param geom_ref text: identifier for boundary geometry corresponding to a boundary id `boundary_id`. E.g., '36047' is a geoid for US Census Tiger boundaries corresponding to a county (047) in New York State (36) +-- @param boundary_id: CREATE OR REPLACE FUNCTION OBS_GetGeometryById( geom_ref text, -- ex: '36047' - geometry_level text -- ex: '"us.census.tiger".county' + boundary_id text -- ex: '"us.census.tiger".county' ) RETURNS geometry(geometry, 4326) AS $$ @@ -136,7 +139,7 @@ BEGIN geom_t.id = geom_ct.table_id and geom_ct.column_id = geom_c.id and geom_c.type ilike 'geometry' - $string$, geometry_level + $string$, boundary_id ) INTO geoid_colname, target_table, geom_colname; IF target_table IS NULL @@ -146,12 +149,13 @@ BEGIN END IF; -- retrieve boundary - EXECUTE format( - 'SELECT t.%s - FROM observatory.%s As t - WHERE t.%s = ''%s'' - LIMIT 1', geom_colname, target_table, geoid_colname, geom_ref) - INTO boundary; + EXECUTE + 'SELECT t.$1 + FROM observatory.$2 As t + WHERE t.$1 = ''$3'' + LIMIT 1' + INTO boundary + USING geom_colname, target_table, geom_ref; RETURN boundary; From e72583e15cc7e54f25bef524085a3a616ad3df18 Mon Sep 17 00:00:00 2001 From: Andy Eschbacher Date: Thu, 21 Apr 2016 09:48:43 -0400 Subject: [PATCH 03/41] formatting --- src/pg/sql/42_observatory_exploration.sql | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/src/pg/sql/42_observatory_exploration.sql b/src/pg/sql/42_observatory_exploration.sql index 12d3492..c4f0853 100644 --- a/src/pg/sql/42_observatory_exploration.sql +++ b/src/pg/sql/42_observatory_exploration.sql @@ -14,12 +14,13 @@ BEGIN EXECUTE 'SELECT array_agg(tablename) -FROM observatory.obs_table t JOIN observatory.obs_column_table ct - ON ct.table_id = t.id -JOIN observatory.obs_column c - ON ct.column_id = c.id -WHERE c.type ILIKE ''geometry'' -AND c.id = $1' + FROM observatory.obs_table t + JOIN observatory.obs_column_table ct + ON ct.table_id = t.id + JOIN observatory.obs_column c + ON ct.column_id = c.id + WHERE c.type ILIKE ''geometry'' + AND c.id = $1' INTO out_var USING search_term; From e119e0dddabaab084650a68ee5ecbd57b86d12f5 Mon Sep 17 00:00:00 2001 From: Andy Eschbacher Date: Thu, 21 Apr 2016 15:13:02 -0400 Subject: [PATCH 04/41] make search_tables a table returning function --- src/pg/sql/42_observatory_exploration.sql | 48 +++++++++++++++-------- 1 file changed, 31 insertions(+), 17 deletions(-) diff --git a/src/pg/sql/42_observatory_exploration.sql b/src/pg/sql/42_observatory_exploration.sql index c4f0853..d95662a 100644 --- a/src/pg/sql/42_observatory_exploration.sql +++ b/src/pg/sql/42_observatory_exploration.sql @@ -2,29 +2,43 @@ -- return a table that contains a string match based on input -- TODO: implement search for timespan -CREATE OR REPLACE FUNCTION OBS_SearchTables( +CREATE OR REPLACE FUNCTION _OBS_SearchTables( search_term text, - time_span text DEFAULT '2009 - 2013' + time_span text DEFAULT NULL ) -RETURNS text[] +RETURNS table(tablename text, timespan text) As $$ DECLARE out_var text[]; BEGIN - EXECUTE - 'SELECT array_agg(tablename) - FROM observatory.obs_table t - JOIN observatory.obs_column_table ct - ON ct.table_id = t.id - JOIN observatory.obs_column c - ON ct.column_id = c.id - WHERE c.type ILIKE ''geometry'' - AND c.id = $1' - INTO out_var - USING search_term; - - RETURN out_var; + IF time_span IS NULL + THEN + RETURN QUERY + EXECUTE + 'SELECT tablename, timespan + FROM observatory.obs_table t + JOIN observatory.obs_column_table ct + ON ct.table_id = t.id + JOIN observatory.obs_column c + ON ct.column_id = c.id + WHERE c.type ILIKE ''geometry'' + AND c.id = $1' + USING search_term; + ELSE + RETURN QUERY + EXECUTE + 'SELECT tablename, timespan + FROM observatory.obs_table t + JOIN observatory.obs_column_table ct + ON ct.table_id = t.id + JOIN observatory.obs_column c + ON ct.column_id = c.id + WHERE c.type ILIKE ''geometry'' + AND c.id = $1 + AND t.timespan = $2' + USING search_term, time_span; + END IF; END; -$$ LANGUAGE plpgsql; +$$ LANGUAGE plpgsql IMMUTABLE; From 00d43a78120b47b0dbc93cff1d021bf5ca6e7445 Mon Sep 17 00:00:00 2001 From: Stuart Lynn Date: Thu, 21 Apr 2016 15:16:04 -0400 Subject: [PATCH 05/41] Updating OBS_ColumnData to support more info --- src/pg/sql/40_observatory_utility.sql | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/pg/sql/40_observatory_utility.sql b/src/pg/sql/40_observatory_utility.sql index 6eb22c1..429c385 100644 --- a/src/pg/sql/40_observatory_utility.sql +++ b/src/pg/sql/40_observatory_utility.sql @@ -34,7 +34,12 @@ END; $$ LANGUAGE plpgsql; -- A type for use with the OBS_GetColumnData function -CREATE TYPE cdb_observatory.OBS_ColumnData AS (colname text, tablename text, aggregate text); +CREATE TYPE cdb_observatory.OBS_ColumnData AS ( + colname text, + tablename text, + aggregate text, + name text, + type text); -- A function that gets the column data for multiple columns @@ -60,7 +65,7 @@ BEGIN column_ids as ( select row_number() over () as no, a.column_id as column_id from (select unnest($2) as column_id) a ) - SELECT array_agg(ROW(colname, tablename, aggregate)::cdb_observatory.OBS_ColumnData order by column_ids.no) + SELECT array_agg(ROW(colname, tablename, aggregate, name, type)::cdb_observatory.OBS_ColumnData order by column_ids.no) FROM column_ids, observatory.OBS_column c, observatory.OBS_column_table ct, observatory.OBS_table t WHERE column_ids.column_id = c.id AND c.id = ct.column_id From 1e625ce3efff2dc6f7034c0ddc1a167b0bc79596 Mon Sep 17 00:00:00 2001 From: Stuart Lynn Date: Thu, 21 Apr 2016 15:18:39 -0400 Subject: [PATCH 06/41] Updated version of OBS_Get to support json returning --- src/pg/sql/41_observatory_augmentation.sql | 23 ++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) diff --git a/src/pg/sql/41_observatory_augmentation.sql b/src/pg/sql/41_observatory_augmentation.sql index f5b9c8b..7966bb8 100644 --- a/src/pg/sql/41_observatory_augmentation.sql +++ b/src/pg/sql/41_observatory_augmentation.sql @@ -269,10 +269,10 @@ CREATE OR REPLACE FUNCTION cdb_observatory._OBS_Get( time_span text, geometry_level text ) -RETURNS TABLE(names text[], vals NUMERIC[]) +RETURNS SETOF JSON AS $$ DECLARE - results NUMERIC[]; + results numeric[]; geom_table_name text; names text[]; query text; @@ -290,10 +290,6 @@ BEGIN data_table_info := cdb_observatory._OBS_GetColumnData(geometry_level, column_ids, time_span); - - names := (SELECT array_agg((d).colname) - FROM unnest(data_table_info) As d); - IF ST_GeometryType(geom) = 'ST_Point' THEN results := cdb_observatory._OBS_GetPoints(geom, @@ -311,8 +307,19 @@ BEGIN THEN results := Array[]::numeric[]; END IF; - - RETURN QUERY SELECT names, results; + + RAISE NOTICE '%', results; + + RETURN QUERY + SELECT row_to_json(d) + FROM ( + SELECT (meta).aggregate as aggregate, + (meta).name as name, + (meta).type as type, + val as value + FROM (select unnest(data_table_info) as meta, + unnest(results) as val) b + ) d; END; $$ LANGUAGE plpgsql; From a2a0a6f3b7f0c92eb2d0721549a5727c7dc18b9a Mon Sep 17 00:00:00 2001 From: Andy Eschbacher Date: Thu, 21 Apr 2016 16:19:51 -0400 Subject: [PATCH 07/41] harmonizing functions with timespan --- src/pg/sql/44_observatory_geometries.sql | 91 ++++++++++++++++-------- 1 file changed, 60 insertions(+), 31 deletions(-) diff --git a/src/pg/sql/44_observatory_geometries.sql b/src/pg/sql/44_observatory_geometries.sql index f2d1c20..75c4beb 100644 --- a/src/pg/sql/44_observatory_geometries.sql +++ b/src/pg/sql/44_observatory_geometries.sql @@ -6,16 +6,15 @@ -- From an input point geometry, find the boundary which intersects with the centroid of the input geometry -CREATE OR REPLACE FUNCTION Andy_OBS_GetGeometry( - geom geometry(Geometry, 4326), - boundary_id text DEFAULT '"us.census.tiger".census_tract', -- TODO: from a specified column id list (e.g., list of available catalog, see OBS_List) - time_span text DEFAULT '2009 - 2013') - RETURNS geometry(Geometry, 4326) +CREATE OR REPLACE FUNCTION OBS_GetGeometry( + geom geometry(geometry, 4326), + boundary_id text, + time_span text DEFAULT NULL) +RETURNS geometry(geometry, 4326) AS $$ DECLARE - boundary geometry(Geometry, 4326); + boundary geometry(geometry, 4326); target_table text; - target_table_list text[]; BEGIN -- TODO: Check if SRID = 4326, if not transform? @@ -26,16 +25,29 @@ BEGIN RAISE EXCEPTION 'Invalid geometry type (%), expecting ''ST_Point''', ST_GeometryType(geom); END IF; - target_table_list := OBS_SearchTables(boundary_id, time_span); + -- choose appropriate table based on time_span + IF time_span IS NULL + THEN + SELECT x.target_tables INTO target_table + FROM _OBS_SearchTables(boundary_id, + time_span) As x(target_tables, + time_spans) + ORDER BY x.time_spans DESC + LIMIT 1; + ELSE + SELECT x.target_tables INTO target_table + FROM _OBS_SearchTables(boundary_id, + time_span) As x(target_tables, + time_spans) + WHERE x.time_spans = time_span + LIMIT 1; + END IF; -- if no tables are found, raise notice and return null - IF array_length(target_table_list, 1) IS NULL + IF target_table IS NULL THEN RAISE NOTICE 'No boundaries found for ''%'' in ''%''', ST_AsText(geom), boundary_id; RETURN NULL::geometry; - ELSE - -- else, choose first result - target_table = target_table_list[1]; END IF; RAISE NOTICE 'target_table: %', target_table; @@ -54,17 +66,16 @@ BEGIN END; $$ LANGUAGE plpgsql; -CREATE OR REPLACE FUNCTION ANDY_OBS_GetGeometryId( +CREATE OR REPLACE FUNCTION OBS_GetGeometryId( geom geometry(Geometry, 4326), - boundary_id text DEFAULT '"us.census.tiger".census_tract', - time_span text DEFAULT '2009 - 2013' + boundary_id text, + time_span text DEFAULT NULL ) RETURNS text AS $$ DECLARE output_id text; target_table text; - target_table_list text[]; BEGIN -- If not point, raise error @@ -73,15 +84,29 @@ BEGIN RAISE EXCEPTION 'Error: Invalid geometry type (%), expecting ''ST_Point''', ST_GeometryType(geom); END IF; - target_table_list := OBS_SearchTables(boundary_id, time_span); + -- choose appropriate table based on time_span + IF time_span IS NULL + THEN + SELECT x.target_tables INTO target_table + FROM cdb_observatory._OBS_SearchTables(boundary_id, + time_span) As x(target_tables, + time_spans) + ORDER BY x.time_spans DESC + LIMIT 1; + ELSE + SELECT x.target_tables INTO target_table + FROM cdb_observatory._OBS_SearchTables(boundary_id, + time_span) As x(target_tables, + time_spans) + WHERE x.time_spans = time_span + LIMIT 1; + END IF; -- if no tables are found, raise error - IF array_length(target_table_list, 1) IS NULL + IF target_table IS NULL THEN RAISE NOTICE 'Error: No boundaries found for ''%''', boundary_id; RETURN NULL::text; - ELSE - target_table = target_table_list[1]; END IF; RAISE NOTICE 'target_table: %', target_table; @@ -102,17 +127,18 @@ $$ LANGUAGE plpgsql; -- Given a geometry reference (e.g., geoid for US Census), and it's geometry level (see OBS_ListGeomColumns() for all available boundary ids), give back the boundary that corresponds to that reference and level. --- @param geom_ref text: identifier for boundary geometry corresponding to a boundary id `boundary_id`. E.g., '36047' is a geoid for US Census Tiger boundaries corresponding to a county (047) in New York State (36) +-- @param geometry_id text: identifier for boundary geometry corresponding to a boundary id `boundary_id`. E.g., '36047' is a geoid for US Census Tiger boundaries corresponding to a county (047) in New York State (36) -- @param boundary_id: -CREATE OR REPLACE FUNCTION OBS_GetGeometryById( - geom_ref text, -- ex: '36047' - boundary_id text -- ex: '"us.census.tiger".county' +CREATE OR REPLACE FUNCTION ANDY_OBS_GetGeometryById( + geometry_id text, -- ex: '36047' + boundary_id text, -- ex: '"us.census.tiger".county' + time_span text DEFAULT NULL --ex: '2009' ) RETURNS geometry(geometry, 4326) AS $$ DECLARE - boundary geometry; + boundary geometry(geometry, 4326); target_table text; geoid_colname text; geom_colname text; @@ -138,10 +164,12 @@ BEGIN AND geoid_ct.table_id = geom_t.id and geom_t.id = geom_ct.table_id and geom_ct.column_id = geom_c.id and - geom_c.type ilike 'geometry' + geom_c.type ILIKE 'geometry' $string$, boundary_id ) INTO geoid_colname, target_table, geom_colname; + RAISE NOTICE '%', target_table; + IF target_table IS NULL THEN RAISE NOTICE 'No geometries found'; @@ -150,12 +178,13 @@ BEGIN -- retrieve boundary EXECUTE - 'SELECT t.$1 - FROM observatory.$2 As t - WHERE t.$1 = ''$3'' - LIMIT 1' + format( + 'SELECT t.%s + FROM observatory.%I As t + WHERE t.%s = $1 + LIMIT 1', geom_colname, target_table, geoid_colname) INTO boundary - USING geom_colname, target_table, geom_ref; + USING geometry_id; RETURN boundary; From 17267c58944894e73b3f948dc2f62cedb69ca8c9 Mon Sep 17 00:00:00 2001 From: Andy Eschbacher Date: Thu, 21 Apr 2016 16:22:32 -0400 Subject: [PATCH 08/41] adding schema hard-coded to function names --- src/pg/sql/44_observatory_geometries.sql | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/src/pg/sql/44_observatory_geometries.sql b/src/pg/sql/44_observatory_geometries.sql index 75c4beb..a7f8523 100644 --- a/src/pg/sql/44_observatory_geometries.sql +++ b/src/pg/sql/44_observatory_geometries.sql @@ -6,7 +6,7 @@ -- From an input point geometry, find the boundary which intersects with the centroid of the input geometry -CREATE OR REPLACE FUNCTION OBS_GetGeometry( +CREATE OR REPLACE FUNCTION cdb_observatory.OBS_GetGeometry( geom geometry(geometry, 4326), boundary_id text, time_span text DEFAULT NULL) @@ -29,14 +29,14 @@ BEGIN IF time_span IS NULL THEN SELECT x.target_tables INTO target_table - FROM _OBS_SearchTables(boundary_id, - time_span) As x(target_tables, - time_spans) + FROM cdb_observatory._OBS_SearchTables(boundary_id, + time_span) As x(target_tables, + time_spans) ORDER BY x.time_spans DESC LIMIT 1; ELSE SELECT x.target_tables INTO target_table - FROM _OBS_SearchTables(boundary_id, + FROM cdb_observatory._OBS_SearchTables(boundary_id, time_span) As x(target_tables, time_spans) WHERE x.time_spans = time_span @@ -66,7 +66,7 @@ BEGIN END; $$ LANGUAGE plpgsql; -CREATE OR REPLACE FUNCTION OBS_GetGeometryId( +CREATE OR REPLACE FUNCTION cdb_observatory.OBS_GetGeometryId( geom geometry(Geometry, 4326), boundary_id text, time_span text DEFAULT NULL @@ -88,14 +88,14 @@ BEGIN IF time_span IS NULL THEN SELECT x.target_tables INTO target_table - FROM cdb_observatory._OBS_SearchTables(boundary_id, - time_span) As x(target_tables, + FROM cdb_observatory.cdb_observatory._OBS_SearchTables(boundary_id, + time_span) As x(target_tables, time_spans) ORDER BY x.time_spans DESC LIMIT 1; ELSE SELECT x.target_tables INTO target_table - FROM cdb_observatory._OBS_SearchTables(boundary_id, + FROM cdb_observatory.cdb_observatory._OBS_SearchTables(boundary_id, time_span) As x(target_tables, time_spans) WHERE x.time_spans = time_span @@ -130,7 +130,7 @@ $$ LANGUAGE plpgsql; -- @param geometry_id text: identifier for boundary geometry corresponding to a boundary id `boundary_id`. E.g., '36047' is a geoid for US Census Tiger boundaries corresponding to a county (047) in New York State (36) -- @param boundary_id: -CREATE OR REPLACE FUNCTION ANDY_OBS_GetGeometryById( +CREATE OR REPLACE FUNCTION cdb_observatory.OBS_GetGeometryById( geometry_id text, -- ex: '36047' boundary_id text, -- ex: '"us.census.tiger".county' time_span text DEFAULT NULL --ex: '2009' From 6d30ee352c7bee9e5f7d7cd3c1508e9bda8c7535 Mon Sep 17 00:00:00 2001 From: Andy Eschbacher Date: Thu, 21 Apr 2016 16:29:27 -0400 Subject: [PATCH 09/41] adding schema --- src/pg/sql/42_observatory_exploration.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pg/sql/42_observatory_exploration.sql b/src/pg/sql/42_observatory_exploration.sql index d95662a..4439eff 100644 --- a/src/pg/sql/42_observatory_exploration.sql +++ b/src/pg/sql/42_observatory_exploration.sql @@ -2,7 +2,7 @@ -- return a table that contains a string match based on input -- TODO: implement search for timespan -CREATE OR REPLACE FUNCTION _OBS_SearchTables( +CREATE OR REPLACE FUNCTION cdb_observatory._OBS_SearchTables( search_term text, time_span text DEFAULT NULL ) From 7659ededaab337c554885dcadc0479501061065f Mon Sep 17 00:00:00 2001 From: Stuart Lynn Date: Fri, 22 Apr 2016 14:43:56 -0400 Subject: [PATCH 10/41] Changing OBS_GetColumnData to return json and more metadata --- src/pg/sql/40_observatory_utility.sql | 37 +++++++++++++-------------- 1 file changed, 18 insertions(+), 19 deletions(-) diff --git a/src/pg/sql/40_observatory_utility.sql b/src/pg/sql/40_observatory_utility.sql index 429c385..4314e17 100644 --- a/src/pg/sql/40_observatory_utility.sql +++ b/src/pg/sql/40_observatory_utility.sql @@ -33,13 +33,6 @@ BEGIN END; $$ LANGUAGE plpgsql; --- A type for use with the OBS_GetColumnData function -CREATE TYPE cdb_observatory.OBS_ColumnData AS ( - colname text, - tablename text, - aggregate text, - name text, - type text); -- A function that gets the column data for multiple columns @@ -49,11 +42,10 @@ CREATE OR REPLACE FUNCTION cdb_observatory._OBS_GetColumnData( column_ids text[], timespan text ) -RETURNS cdb_observatory.OBS_ColumnData[] +RETURNS SETOF JSON AS $$ -DECLARE - result cdb_observatory.OBS_ColumnData[]; BEGIN + RETURN QUERY EXECUTE ' WITH geomref AS ( SELECT t.table_id id @@ -65,17 +57,24 @@ BEGIN column_ids as ( select row_number() over () as no, a.column_id as column_id from (select unnest($2) as column_id) a ) - SELECT array_agg(ROW(colname, tablename, aggregate, name, type)::cdb_observatory.OBS_ColumnData order by column_ids.no) - FROM column_ids, observatory.OBS_column c, observatory.OBS_column_table ct, observatory.OBS_table t - WHERE column_ids.column_id = c.id - AND c.id = ct.column_id - AND t.id = ct.table_id - AND t.timespan = $3 - AND t.id in (SELECT id FROM geomref) + SELECT row_to_json(a) from ( + select colname, + tablename, + aggregate, + name, + type, + c.description + FROM column_ids, observatory.OBS_column c, observatory.OBS_column_table ct, observatory.OBS_table t + WHERE column_ids.column_id = c.id + AND c.id = ct.column_id + AND t.id = ct.table_id + AND t.timespan = $3 + AND t.id in (SELECT id FROM geomref) + order by column_ids.no + ) a ' USING geometry_id, column_ids, timespan - INTO result; - RETURN result; + RETURN; END; $$ LANGUAGE plpgsql; From 3394483a45119be5498479db946aef628fb651ed Mon Sep 17 00:00:00 2001 From: Stuart Lynn Date: Fri, 22 Apr 2016 14:45:22 -0400 Subject: [PATCH 11/41] migrating OBS_GET, OBS_GetPoints, OBS_GetPolygons and OBS_GetMeasure to all use json internals --- src/pg/sql/41_observatory_augmentation.sql | 123 +++++++++++++-------- 1 file changed, 74 insertions(+), 49 deletions(-) diff --git a/src/pg/sql/41_observatory_augmentation.sql b/src/pg/sql/41_observatory_augmentation.sql index 7966bb8..cdf707c 100644 --- a/src/pg/sql/41_observatory_augmentation.sql +++ b/src/pg/sql/41_observatory_augmentation.sql @@ -272,11 +272,11 @@ CREATE OR REPLACE FUNCTION cdb_observatory._OBS_Get( RETURNS SETOF JSON AS $$ DECLARE - results numeric[]; + results json[]; geom_table_name text; names text[]; query text; - data_table_info cdb_observatory.OBS_ColumnData[]; + data_table_info json[]; BEGIN geom_table_name := cdb_observatory._OBS_GeomTable(geom, geometry_level); @@ -287,9 +287,13 @@ BEGIN RETURN QUERY SELECT '{}'::text[], '{}'::NUMERIC[]; END IF; - data_table_info := cdb_observatory._OBS_GetColumnData(geometry_level, - column_ids, - time_span); + execute' + select array_agg( _obs_getcolumndata) from cdb_observatory._OBS_GetColumnData($1, + $2, + $3);' + INTO data_table_info + using geometry_level, column_ids, time_span; + IF ST_GeometryType(geom) = 'ST_Point' THEN results := cdb_observatory._OBS_GetPoints(geom, @@ -298,28 +302,19 @@ BEGIN ELSIF ST_GeometryType(geom) IN ('ST_Polygon', 'ST_MultiPolygon') THEN + -- RAISE EXCEPTION 'polygons not supported for now'; results := cdb_observatory._OBS_GetPolygons(geom, geom_table_name, data_table_info); END IF; - - IF results IS NULL - THEN - results := Array[]::numeric[]; - END IF; - - RAISE NOTICE '%', results; RETURN QUERY - SELECT row_to_json(d) - FROM ( - SELECT (meta).aggregate as aggregate, - (meta).name as name, - (meta).type as type, - val as value - FROM (select unnest(data_table_info) as meta, - unnest(results) as val) b - ) d; + EXECUTE + $query$ + SELECT unnest($1) + $query$ + USING results; + END; $$ LANGUAGE plpgsql; @@ -329,12 +324,13 @@ $$ LANGUAGE plpgsql; CREATE OR REPLACE FUNCTION cdb_observatory._OBS_GetPoints( geom geometry, geom_table_name text, - data_table_info cdb_observatory.OBS_ColumnData[] + data_table_info json[] ) -RETURNS NUMERIC[] +RETURNS json[] AS $$ DECLARE result NUMERIC[]; + json_result json[]; query text; i int; geoid text; @@ -372,14 +368,14 @@ BEGIN THEN -- give back null values query := query || format('NULL::numeric '); - ELSIF ((data_table_info)[i]).aggregate != 'sum' + ELSIF ((data_table_info)[i])->>'aggregate' != 'sum' THEN -- give back full variable - query := query || format('%I ', ((data_table_info)[i]).colname); + query := query || format('%I ', ((data_table_info)[i])->>'colname'); ELSE -- give back variable normalized by area of geography query := query || format('%I/%s ', - ((data_table_info)[i]).colname, + ((data_table_info)[i])->>'colname', area); END IF; @@ -393,17 +389,32 @@ BEGIN FROM observatory.%I WHERE %I.geoid = %L ', - ((data_table_info)[1]).tablename, - ((data_table_info)[1]).tablename, + ((data_table_info)[1])->>'tablename', + ((data_table_info)[1])->>'tablename', geoid ); - + EXECUTE query INTO result USING geom; - - RETURN result; + + EXECUTE + $query$ + select array_agg(row_to_json(t)) from( + select values as value, + meta->>'name' as name, + meta->>'tablename' as tablename, + meta->>'aggregate' as aggregate, + meta->>'type' as type, + meta->>'description' as description + from (select unnest($1) as values, unnest($2) as meta) b + ) t + $query$ + INTO json_result + USING result, data_table_info; + + RETURN json_result; END; $$ LANGUAGE plpgsql; @@ -418,8 +429,7 @@ CREATE OR REPLACE FUNCTION cdb_observatory.OBS_GetMeasure( RETURNS JSON AS $$ DECLARE - names TEXT[]; - vals NUMERIC[]; + result json; BEGIN IF boundary_id IS NULL THEN @@ -432,14 +442,14 @@ BEGIN time_span := '2009 - 2013'; END IF; - EXECUTE ' - SELECT names, vals FROM cdb_observatory._OBS_Get($1, ARRAY[$2], $3, $4) LIMIT 1 + + EXECUTE ' + SELECT * FROM cdb_observatory._OBS_Get($1, ARRAY[$2], $3, $4) LIMIT 1 ' - INTO names, vals + INTO result USING geom, measure_id, time_span, boundary_id; - RETURN json_build_object('name', (names)[1], 'value', (vals)[1]); - + RETURN result; END; $$ LANGUAGE plpgsql; @@ -447,12 +457,13 @@ $$ LANGUAGE plpgsql; CREATE OR REPLACE FUNCTION cdb_observatory._OBS_GetPolygons( geom geometry, geom_table_name text, - data_table_info cdb_observatory.OBS_ColumnData[] + data_table_info json[] ) -RETURNS NUMERIC[] +RETURNS json[] AS $$ DECLARE - result NUMERIC[]; + result numeric[]; + json_result json[]; q_select text; q_sum text; q text; @@ -464,11 +475,11 @@ BEGIN FOR i IN 1..array_upper(data_table_info, 1) LOOP - q_select := q_select || format( '%I ', ((data_table_info)[i]).colname); + q_select := q_select || format( '%I ', ((data_table_info)[i])->>'colname'); - IF ((data_table_info)[i]).aggregate ='sum' + IF ((data_table_info)[i])->>'aggregate' ='sum' THEN - q_sum := q_sum || format('sum(overlap_fraction * COALESCE(%I, 0)) ',((data_table_info)[i]).colname,((data_table_info)[i]).colname); + q_sum := q_sum || format('sum(overlap_fraction * COALESCE(%I, 0)) ',((data_table_info)[i])->>'colname',((data_table_info)[i])->>'colname'); ELSE q_sum := q_sum || ' NULL::numeric '; END IF; @@ -492,17 +503,32 @@ BEGIN values As ( ', geom_table_name); - q := q || q_select || format('FROM observatory.%I ', ((data_table_info)[1].tablename)); + q := q || q_select || format('FROM observatory.%I ', ((data_table_info)[1]->>'tablename')); q := q || ' ) ' || q_sum || ' ]::numeric[] FROM _overlaps, values WHERE values.geoid = _overlaps.geoid'; - + EXECUTE q INTO result USING geom; - - RETURN result; + + EXECUTE + $query$ + select array_agg(row_to_json(t)) from( + select values as value, + meta->>'name' as name, + meta->>'tablename' as tablename, + meta->>'aggregate' as aggregate, + meta->>'type' as type, + meta->>'description' as description + from (select unnest($1) as values, unnest($2) as meta) b + ) t + $query$ + INTO json_result + USING result, data_table_info; + + RETURN json_result; END; $$ LANGUAGE plpgsql; @@ -730,4 +756,3 @@ BEGIN END; $$ LANGUAGE plpgsql; - From 6fa7bcd8718dc0dfed125ca6078ffe86606275aa Mon Sep 17 00:00:00 2001 From: Andy Eschbacher Date: Fri, 22 Apr 2016 15:08:34 -0400 Subject: [PATCH 12/41] adding expected for getgeom functions --- .../expected/44_observatory_geometries.out | 112 ++++++++++++++++++ 1 file changed, 112 insertions(+) create mode 100644 src/pg/test/expected/44_observatory_geometries.out diff --git a/src/pg/test/expected/44_observatory_geometries.out b/src/pg/test/expected/44_observatory_geometries.out new file mode 100644 index 0000000..a6a69cc --- /dev/null +++ b/src/pg/test/expected/44_observatory_geometries.out @@ -0,0 +1,112 @@ +\i test/sql/load_fixtures.sql +SET client_min_messages TO WARNING; +\set ECHO none +Loading obs_table.sql fixture file... +Done. +Loading obs_column.sql fixture file... +Done. +Loading obs_column_table.sql fixture file... +Done. +Loading obs_column_to_column.sql fixture file... +Done. +Loading obs_85328201013baa14e8e8a4a57a01e6f6fbc5f9b1.sql fixture file... +Done. +Loading obs_3e7cc9cfd403b912c57b42d5f9195af9ce2f3cdb.sql fixture file... +Done. +Loading obs_ab038198aaab3f3cb055758638ee4de28ad70146.sql fixture file... +Done. +Loading obs_a92e1111ad3177676471d66bb8036e6d057f271b.sql fixture file... +Done. +Loading obs_11ee8b82c877c073438bc935a91d3dfccef875d1.sql fixture file... +Done. +Loading obs_d34555209878e8c4b37cf0b2b3d072ff129ec470.sql fixture file... +Done. +Loading obs_b0ef6dd68d5faddbf231fd7f02916b3d00ec43c4.sql fixture file... +Done. + test1 +---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + 0106000020E6100000010000000103000000010000003500000056EF703B347C52C054FF2092215B44401B9AB2D30F7C52C03FE1ECD6325B4440B14B546F0D7C52C0BBCE86FC335B4440730F09DFFB7B52C0B796C9703C5B4440108FC4CBD37B52C0B96C74CE4F5B444001C0B167CF7B52C0ED0BE8853B5B4440C843DFDDCA7B52C05DDDB1D8265B4440A73D25E7C47B52C0D53BDC0E0D5B4440BB5E9A22C07B52C0F8A3A833F75A4440355F251FBB7B52C0B64604E3E05A444008910C39B67B52C098BF42E6CA5A44405227A089B07B52C0F204C24EB15A444024F1F274AE7B52C069E4F38AA75A44402B4A09C1AA7B52C06B63EC84975A4440E199D024B17B52C0546F0D6C955A44403C873254C57B52C02EAC1BEF8E5A44402593533BC37B52C0588AE42B815A4440973AC8EBC17B52C087890629785A44407A6F0C01C07B52C0E1EB6B5D6A5A44401B9B1DA9BE7B52C03F6F2A52615A444088855AD3BC7B52C088669E5C535A4440E1EA0088BB7B52C0E6E95C514A5A44400CE6AF90B97B52C070D05E7D3C5A44401E85EB51B87B52C0B03A72A4335A4440BAF3C473B67B52C09929ADBF255A4440CD920035B57B52C0454AB3791C5A4440F78DAF3DB37B52C0E09BA6CF0E5A4440DBC2F352B17B52C0703FE081015A444015C440D7BE7B52C05E83BEF4F659444041446ADAC57B52C0EFDFBC38F15944405FB1868BDC7B52C0C03E3A75E559444034BC5983F77B52C0205ED72FD8594440EFFCA204FD7B52C07E384888F25944403ACAC16C027C52C00876FC17085A444056478E74067C52C00FECF82F105A44400FECF82F107C52C0876D8B321B5A4440BB438A01127C52C0DE1CAED51E5A4440B9C15087157C52C034643C4A255A444099F221A81A7C52C0D0EFFB372F5A44404AED45B41D7C52C0785DBF60375A4440373465A71F7C52C065A71FD4455A4440C558A65F227C52C0D80DDB16655A4440F92EA52E197C52C09BA73AE4665A4440DEE522BE137C52C00664AF777F5A44405698BED7107C52C04759BF99985A444012D90759167C52C09430D3F6AF5A444044679945287C52C01F680586AC5A444049F086342A7C52C09CC3B5DAC35A44401FF5D72B2C7C52C0CB811E6ADB5A4440247EC51A2E7C52C0548B8862F25A4440FF59F3E32F7C52C0CB290131095B4440F96871C6307C52C09605137F145B444056EF703B347C52C054FF2092215B4440 +(1 row) + + test2 +-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + 0106000020E6100000010000000103000000010000002C0200005051F52B9D8352C042B28009DC50444093C2BCC7998352C0E89E758D965144402EFD4B52998352C09A07B0C8AF514440E75086AA988352C022FAB5F5D351444027874F3A918352C0A46B26DF6C53444018E945ED7E8352C04D81CCCEA25344401346B3B27D8352C05D50DF32A753444068226C787A8352C08D25AC8DB153444015C8EC2C7A8352C004560E2DB2534440DF8618AF798352C00FD07D39B3534440FEB627486C8352C0DC9E20B1DD534440B98C9B1A688352C05D328E91EC5344408B8A389D648352C0929048DBF853444075CAA31B618352C0986A662D05544440EA758BC0588352C0D6C397892254444048DFA469508352C0151DC9E53F544440B67F65A5498352C0F73DEAAF575444401403249A408352C05E2A36E6755444402367614F3B8352C06DE2E47E8754444011FC6F253B8352C0431B800D885444403E7958A8358352C0DD0A6135965444401D739EB12F8352C093DFA293A5544440FB04508C2C8352C035289A07B05444401EA4A7C8218352C0347F4C6BD3544440D7C05609168352C05053CBD6FA544440AC8E1CE90C8352C0C9AA083719554440FC8D76DCF08252C0BD18CA897655444048895DDBDB8252C0C3B7B06EBC554440698995D1C88252C032207BBDFB55444004A73E90BC8252C0DB4C857824564440321F10E84C8252C08862F20698574440BB0853944B8252C09831056B9C57444080F0A1444B8252C0D32F116F9D574440C7629B54348252C0418177F2E9574440CEA44DD53D8152C04F1F813FFC564440A51133FB3C8152C0F607CA6DFB5644404D2EC6C03A8152C0DD43C2F7FE564440C5C6BC8E388152C0F3035779025744404B3E7617288152C0C1340C1F11574440C99063EB198152C0BB6070CD1D57444086E5CFB7058152C001D9EBDD1F574440DD770C8FFD8052C09F573CF548574440E69315C3D58052C0BCE47FF2775744404852D2C3D08052C0122C0E677E574440581EA4A7C88052C084F068E388574440187AC4E8B98052C0336C94F59B5744400E828E56B58052C0A80018CFA0574440B7B24467998052C0C8409E5DBE574440BEA085048C8052C032ACE28DCC5744401215AA9B8B8052C0A8A8FA95CE574440B9313D61898052C01F2A8D98D9574440C6DFF604898052C0A8C5E061DA574440AA622AFD848052C0B5F81400E3574440BD1B0B0A838052C012656F29E75744406C91B41B7D8052C0745AB741ED5744408C2C9963798052C0D2FA5B02F05744403315E291788052C079AF5A99F0574440412B3064758052C0128255F5F25744401329CDE6718052C0B7CEBF5DF6574440FEB3E6C75F8052C00876FC1708584440B70721205F8052C04374081C09584440A7CD380D518052C0C00303081F5844400133DFC14F8052C001BF469220584440EA211ADD418052C07570B03731584440CD3CB9A6408052C015342DB13258444020B1DD3D408052C0B03A72A433584440BA66F2CD368052C09F3D97A9495844400EDB1665368052C08C9E5BE84A584440F3AB3940308052C05376FA415D584440880FECF82F8052C0115322895E584440C6DD205A2B8052C0DC7F643A74584440FC389A232B8052C0F4A78DEA74584440990F0874268052C0FDD64E9484584440A5BDC117268052C02C27A1F4855844407218CC5F218052C0F9BB77D498584440F65E7CD11E8052C0E8A1B60DA3584440C1374D9F1D8052C0BC3E73D6A758444022DC6454198052C00629780AB95844406519E258178052C0FF03AC55BB584440FA5FAE450B8052C05704FF5BC9584440D7A3703D0A8052C0F25B74B2D458444036ACA92C0A8052C00A849D62D55844407FDAA84E078052C006BAF605F45844408B8862F2068052C017F19D98F558444006F1811DFF7F52C04DBD6E111859444048FAB48AFE7F52C0CF6740BD195944407A1A3048FA7F52C0E6AC4F3926594440382BA226FA7F52C08D614ED0265944407A34D593F97F52C0081B9E5E29594440F8A3A833F77F52C03A58FFE7305944402AAA7EA5F37F52C0643C4A253C594440A7E507AEF27F52C0321CCF674059444063EFC517ED7F52C0438D429259594440B1A6B228EC7F52C0185E49F25C5944400DC2DCEEE57F52C09BAA7B6473594440EA059FE6E47F52C0C3D50110775944403B8DB454DE7F52C059F5B9DA8A594440A06CCA15DE7F52C094F3C5DE8B5944408509A359D97F52C0910C39B69E594440244223D8B87F52C0FE7A8505F7594440EF004F5AB87F52C08DD31055F85944409CDA19A6B67F52C03F53AF5B045A4440F7730AF2B37F52C05A9C31CC095A444009C21550A87F52C0077C7E18215A44409E3F6D54A77F52C00C056C07235A4440C3499A3FA67F52C0586E6935245A44407020240B987F52C080B6D5AC335A4440DDD0949D7E7F52C07383A10E2B5A44404E417E36727F52C0207A5226355A4440F4A44C6A687F52C0A2410A9E425A4440E92ADD5D677F52C061527C7C425A44407905A227657F52C03D7C9928425A4440791C06F3577F52C0D9EA724A405A4440F2B4FCC0557F52C08690F3FE3F5A4440FE7C5BB0547F52C0209738F2405A444052F17F47547F52C014E97E4E415A4440350C1F11537F52C0AF230ED9405A444098158A743F7F52C08F519E79395A44401ABD1AA0347F52C0A3586E69355A4440EB5223F4337F52C0207A5226355A4440A8AAD0402C7F52C0D89942E7355A44407C5EF1D4237F52C0613596B0365A44400227DBC01D7F52C007EA9447375A4440567E198C117F52C084D72E6D385A44402C7DE882FA7E52C0249BABE6395A4440D72FD80DDB7E52C0955F0663445A44401F2A8D98D97E52C0CBA0DAE0445A4440ACC612D6C67E52C0771211FE455A444026FBE769C07E52C06B64575A465A44400B7BDAE1AF7E52C023D5777E515A44407E8AE3C0AB7E52C0EBC37AA3565A4440268DD13AAA7E52C04F55A181585A4440525F96766A7E52C02502D53F885A4440A69C2FF65E7E52C003B16CE6905A44403B342C465D7E52C0D8B5BDDD925A444002B859BC587E52C0B20FB22C985A4440B0912408577E52C0871403249A5A444039950C00557E52C021E7FD7F9C5A4440D3139678407E52C015731074B45A444080ED60C43E7E52C0BAF3C473B65A4440FB3BDBA3377E52C074CC79C6BE5A44401BB7989F1B7E52C042E73576895A4440B01A4B581B7E52C03D2AFEEF885A4440D68C0C72177E52C07C60C77F815A44407EA99F37157E52C0AE80423D7D5A444053910A630B7E52C04A2366F6795A4440B7EEE6A90E7E52C0670E492D945A44401A4CC3F0117E52C0D829560DC25A444064AE0CAA0D7E52C0D74CBED9E65A4440D3687231067E52C07405DB88275B4440158C4AEA047E52C08D7E349C325B4440AB5791D1017E52C048BF7D1D385B4440268C6665FB7D52C0548A1D8D435B44405C1B2AC6F97D52C065187783685B4440FA0B3D62F47D52C03FE08101845B4440E2E313B2F37D52C03196E997885B444038F4160FEF7D52C05D50DF32A75B4440109546CCEC7D52C07FDB1324B65B44401C261AA4E07D52C0BA641C23D95B44405A0EF450DB7D52C0081F4AB4E45B4440BBB20B06D77D52C06E693524EE5B4440CE6BEC12D57D52C0FB592C45F25B444073672618CE7D52C09A0645F3005C4440BB7B80EECB7D52C0C7BAB88D065C4440F5F411F8C37D52C057E9EE3A1B5C44407B8670CCB27D52C09AB4A9BA475C4440240B98C0AD7D52C0282A1BD6545C4440E4839ECDAA7D52C0FA5E43705C5C4440E4805D4D9E7D52C08AAA5FE97C5C44401B2AC6F99B7D52C01C2444F9825C4440D3122BA3917D52C059F8FA5A975C4440A7ACA6EB897D52C0FD2D01F8A75C444007B5DFDA897D52C04818062CB95C44401EF7ADD6897D52C0399A232BBF5C444036397CD2897D52C0904946CEC25C444001DE02098A7D52C08A58C4B0C35C4440CB68E4F38A7D52C0527B116DC75C4440AD4F39268B7D52C0AB92C83EC85C4440531EDD088B7D52C0EB19C231CB5C4440C5C551B9897D52C070EB6E9EEA5C444077F4BF5C8B7D52C090149161155D44409BE447FC8A7D52C0161406651A5D4440D13FC1C58A7D52C0F792C6681D5D4440E3DEFC86897D52C0836C59BE2E5D44407EFFE6C5897D52C087C1FC15325D444071033E3F8C7D52C0DBA6785C545D44407C6308008E7D52C03FA6B5696C5D4440F42F49658A7D52C054FEB5BC725D4440713788D68A7D52C0ED9C6681765D44403CDC0E0D8B7D52C0B036C64E785D44403B8E1F2A8D7D52C066A3737E8A5D4440D3F88557927D52C07D0569C6A25D44407D022846967D52C0E5D4CE30B55D4440BFF1B567967D52C07C0BEBC6BB5D44409B012EC8967D52C0DE1D19ABCD5D44400AF31E679A7D52C0081F4AB4E45D4440D47D00529B7D52C0EBE1CB44115E44403F00A94D9C7D52C068774831405E4440F7393E5A9C7D52C04339D1AE425E44409831056B9C7D52C090A2CEDC435E444003B4AD669D7D52C086CABF96575E44402670EB6E9E7D52C0048E041A6C5E44409C69C2F6937D52C03259DC7F645E4440DDED7A698A7D52C047C8409E5D5E44407842AF3F897D52C0EEB089CC5C5E4440B053AC1A847D52C0859675FF585E444033FCA71B287D52C04D4A41B7975E444042942F68217D52C03F00A94D9C5E44404885B185207D52C0E5B4A7E49C5E4440751C3F541A7D52C0E318C91EA15E4440C26856B60F7D52C03A94A12AA65E4440FA7953910A7D52C093DFA293A55E444057923CD7F77C52C0C63368E89F5E444003CE52B29C7C52C06C239EEC665E44409AB33EE5987C52C020EEEA55645E4440DFC0E446917C52C0CF6394675E5E4440A70183A44F7C52C0B60E0EF6265E44400E0F61FC347C52C0CE88D2DEE05D4440E1404816307C52C01FD95C35CF5D444091B6F1272A7C52C0A7069ACFB95D444014C95702297C52C0CC785BE9B55D4440807F4A95287C52C0567C43E1B35D4440CE3637A6277C52C047AD307DAF5D4440DAFE9595267C52C07D569929AD5D4440FB90B75CFD7B52C02159C0046E5D4440876EF607CA7B52C078B130444E5D4440438CD7BCAA7B52C0321CCF67405D44401DC9E53FA47B52C0938C9C853D5D4440BBED42739D7B52C0111615713A5D444026FF93BF7B7B52C02BBD361B2B5D444039ECBE63787B52C091B6F1272A5D4440F2599E07777B52C0D40D1478275D4440A3005130637B52C01DFF0582005D4440A3AF20CD587B52C08AC6DADFD95C4440EB8F300C587B52C050FC1873D75C444003ECA353577B52C0E6ADBA0ED55C444003AF963B337B52C04694F6065F5C4440D13AAA9A207B52C0F0A485CB2A5C4440486B0C3A217B52C0B9DE3653215C4440E814E467237B52C065C57075005C44404F73F222137B52C08EC70C54C65B4440020D36751E7B52C0367689EAAD5B4440669E5C53207B52C0EA7420EBA95B4440A92C0ABB287B52C0D6FF39CC975B4440C2BCC799267B52C0E9B5D958895B4440B3075A81217B52C04276DEC6665B44405DDA70581A7B52C0535C55F65D5B4440C70BE9F0107B52C03526C45C525B444093C7D3F2037B52C08B338639415B44407E8978EBFC7A52C0FC1BB4571F5B4440D4B32094F77A52C0D061BEBC005B444016BD5301F77A52C09C887E6DFD5A4440887E6DFDF47A52C07B82C476F75A4440ECA4BE2CED7A52C0AE0AD462F05A4440846055BDFC7A52C0EF3A1BF2CF5A4440C1E09A3BFA7A52C072FC5069C45A444068C9E369F97A52C0D95DA0A4C05A4440A94D9CDCEF7A52C050711C78B55A4440321AF9BCE27A52C0FD2D01F8A75A44400F0D8B51D77A52C0F566D47C955A4440A5F27684D37A52C0EB54F99E915A4440C843DFDDCA7A52C02BBF0CC6885A44402A36E675C47A52C0DB68006F815A44405C70067FBF7A52C03D4162BB7B5A44405DA45016BE7A52C05C8E57207A5A44408D25AC8DB17A52C0681F2BF86D5A44404C4D8237A47A52C063450DA6615A4440419C8713987A52C0185B0872505A4440B6476FB88F7A52C058C51B99475A4440B8C9A8328C7A52C0BF266BD4435A4440FA9B5088807A52C0D9CD8C7E345A4440A70A4625757A52C0AA605452275A4440B28174B1697A52C0DC63E943175A4440888384285F7A52C04240BE840A5A44405DA27A6B607A52C085CB2A6C065A4440764F1E166A7A52C0D175E107E759444011397D3D5F7A52C0F0D93A38D85944404C3448C1537A52C05DA79196CA594440419DF2E8467A52C0DC476E4DBA594440088F368E587A52C048A7AE7C96594440A84F72874D7A52C0F42F49658A594440BBEB6CC83F7A52C092E9D0E979594440AEB8382A377A52C0329067976F594440B5C01E13297A52C03A00E2AE5E5944408235CEA6237A52C026A8E15B58594440682096CD1C7A52C0BF29AC545059444019E42EC2147A52C0813E912749594440B0FD648C0F7A52C04910AE80425944403A014D840D7A52C062A06B5F405944405F0B7A6F0C7A52C0B62E35423F594440959A3DD00A7A52C06308008E3D594440A86DC328087A52C09BE5B2D1395944402DE8BD31047A52C00F290648345944404B1B0E4B037A52C021C84109335944406A82A8FB007A52C004E3E0D2315944401E335019FF7952C0996038D730594440BF44BC75FE7952C0A051BAF42F594440EFFCA204FD7952C0FAD005F52D59444074779D0DF97952C03E90BC73285944407B681F2BF87952C021AB5B3D275944406917D34CF77952C00A83328D265944404084B872F67952C0C3D66CE525594440FFAECF9CF57952C04CA60A4625594440350A4966F57952C03A3B191C255944405323F433F57952C0F94B8BFA2459444077137CD3F47952C0A6F10BAF24594440942C27A1F47952C064027E8D24594440560DC2DCEE7952C05DC0CB0C1B594440755AB741ED7952C0410FB56D18594440D47C957CEC7952C053AEF02E17594440B1DAFCBFEA7952C0EEE87FB9165944402368CC24EA7952C0DC7D8E8F165944405FB4C70BE97952C089230F4416594440D0419770E87952C077B81D1A1659444065A54929E87952C0D7C05609165944409B00C3F2E77952C036C98FF815594440D42B6519E27952C047E350BF0B594440B2F4A10BEA7952C05C01857AFA58444009A4C4AEED7952C066F6798CF258444021037976F97952C06E15C440D75844409DD32CD0EE7952C0A46DFC89CA584440CE8B135FED7952C05247C7D5C85844408BFD65F7E47952C009168733BF5844401C40BFEFDF7952C0CBF6216FB9584440B33F506EDB7952C0747B4963B4584440C8940F41D57952C0B96E4A79AD584440FF06EDD5C77952C0D349B6BA9C58444093331477BC7952C0B77BB94F8E5844400C0055DCB87952C03605323B8B584440F068E388B57952C0C6F99B50885844401E34BBEEAD7952C0179B560A8158444085B2F0F5B57952C0BCADF4DA6C584440BAD91F28B77952C0ACAA97DF69584440BABC395CAB7952C006B64AB03858444014EB54F99E7952C01188D7F50B584440A98592C9A97952C0691A14CD0358444093FDF334607952C06C205D6C5A574440170D198F527952C01A8524B37A57444005854199467952C0AD6C1FF2965744409F3A56293D7952C02C98F8A3A85744401230BABC397952C0B2632310AF574440DD2230D6377952C0691B7FA2B257444061FBC9181F7952C097A608707A5744403140A209147952C05017299485574440567E198C117952C02BD9B111885744407BBC900E0F7952C0D7169E978A5744407FDAA84E077952C002637D039357444083F8C08EFF7852C0FE2AC0779B57444087307E1AF77852C0E1968FA4A4574440B515FBCBEE7852C0E449D235935744407F69519FE47852C065A9F57EA3574440EACE13CFD97852C0B6847CD0B35744402B8716D9CE7852C0CB7EDDE9CE5744408F8D40BCAE7852C070D1C952EB574440AF08FEB7927852C0EF1989D0085844403FFD67CD8F7852C0719010E50B5844401C2785798F7852C0764D486B0C584440F697DD93877852C0ACAB02B51858444037363B527D7852C0093543AA28584440C3D50110777852C09355116E32584440EEE714E4677852C03387A4164A584440717500C45D7852C07EA5F3E1595844405791D101497852C09D7DE5417A5844401AC1C6F5EF7752C0B9162D40DB5844400F7C0C569C7752C03EE8D9ACFA58444005508C2C997752C09259BDC3ED584440AC38D55A987752C0D1217024D0584440533BC3D4967752C04B5645B8C9584440E7FF55478E7752C05DC2A1B7785844402FFA0AD28C7752C0581CCEFC6A584440DCB930D28B7752C021567F8461584440FB20CB82897752C062D7F6764B58444079909E22877752C0D89942E7355844408C63247B847752C0B58993FB1D584440ACE46377817752C0677E350708584440C6C210397D7752C0B2F4A10BEA57444074B680D07A7752C0909DB7B1D9574440DB317557767752C0077767EDB65744409A7631CD747752C02D7B12D89C5744400D6C9560717752C054FEB5BC72574440FC34EECD6F7752C0A3E6ABE4635744409E7AA4C16D7752C0D1949D7E50574440FE9C82FC6C7752C0E046CA16495744401E4FCB0F5C7752C09B53C90050574440D503E621537752C0E063B0E25457444037DC476E4D7752C032569BFF5757444070ED4449487752C0836C59BE2E57444066F50EB7437752C054C554FA0957444032022A1C417752C0713C9F01F55644404487C091407752C01F7EFE7BF05644406E4E2503407752C05D4C33DDEB56444088F546AD307752C03ECBF3E0EE5644401F0F7D772B7752C04835ECF7C4564440A33B889D297752C026AAB706B656444087A4164A267752C0938E72309B5644403B6F63B3237752C050FD834886564440D7F7E120217752C00D6C956071564440132A38BC207752C07A8A1C226E564440315D88D51F7752C07E8E8F1667564440D4F02DAC1B7752C0ADA415DF505644408D4468041B7752C0952BBCCB45564440B88D06F0167752C0BB46CB811E564440A435069D107752C0C8E88024EC554440C9703C9F017752C0F01307D0EF55444083DE1B43007752C0855D143DF05544404EB4AB90F27652C0A69718CBF45544401ABE8575E37652C0C214E5D2F8554440293C6876DD7652C0807D74EACA5544403FABCC94D67652C0F58079C8945544405AD76839D07652C0B41D537765554440849ECDAACF7652C0272D5C56615544405DA79196CA7652C0D87F9D9B36554440331477BCC97652C06A10E6762F554440B41F2922C37652C07B82C476F75444406F2C280CCA7652C030815B77F35444405164ADA1D47652C0BC202235ED544440685BCD3AE37652C0F4311F10E8544440D6E429ABE97652C04203B16CE65444408B4E965AEF7652C0A23F34F3E454444080BA8102EF7652C0C77DAB75E2544440B515FBCBEE7652C0B64604E3E05444407C992842EA7652C02DEC6987BF544440F9BA0CFFE97652C028637C98BD544440363B527DE77652C0001B1021AE544440A359D93EE47652C0378AAC359454444027BA2EFCE07652C05C8E57207A5444403A765089EB7652C0DB17D00B7754444064744012F67652C059A148F77354444027C0B0FCF97652C054185B0872544440D1C952EBFD7652C0200BD1217054444092AD2EA7047752C0E083D72E6D544440F488D1730B7752C0CF807A336A544440A6B73F170D7752C0357A3540695444406F287CB60E7752C0CAF78C4468544440B3D0CE69167752C0A9BD88B663544440F678211D1E7752C0888384285F544440834F73F2227752C0E3361AC05B544440C2F693313E7752C0C05AB56B42544440F834272F327752C06684B70721544440C4758C2B2E7752C03D0801F9125444408D959867257752C00E4A9869FB53444022C2BF081A7752C0247F30F0DC534440EF1CCA50157752C03599F1B6D2534440C0B2D2A4147752C06551D845D15344409048DBF8137752C09509BFD4CF53444067B5C01E137752C01F0DA7CCCD5344403E22A644127752C0D9942BBCCB534440A71FD4450A7752C029B16B7BBB534440C0AF9124087752C0E95DBC1FB75344400856D5CBEF7652C018062CB98A534440F71BEDB8E17652C098A0866F615344406403E962D37652C03197546D375344404A22FB20CB7652C0765089EB185344402A1900AAB87652C0BE0F070951524440E386DF4DB77652C01F63EE5A425244400F7D772B4B7652C005A568E55E524440FB3F87F9F27552C07D224F92AE5144405793A7ACA67552C0D7C0560916514440BEDA519CA37552C0A44FABE80F514440745B22179C7552C0E2CCAFE600514440DCD6169E977552C00B43E4F4F5504440A93121E6927552C05E807D74EA504440D13FC1C58A7552C056ED9A90D6504440096B63EC847552C0AB92C83EC8504440AE80423D7D7552C04127840EBA50444040F7E5CC767552C0D0967329AE504440632827DA557552C0DEE7F86871504440C8ED974F567552C05646239F57504440211FF46C567552C03674B33F5050444015713AC9567552C059DC7F643A5044404AB20E47577552C028B682A62550444037AB3E575B7552C0F7AE415F7A4F444045460724617552C0A94885B1854E4440F62686E4647552C02D978DCEF94D444036AE7FD7677552C018AE0E80B84D4440B9E00CFE7E7552C0B01F6283854D4440446B459BE37552C0C5E23785954C444012A27C410B7652C03C1405FA444C4440588B4F01307652C0B058C345EE4B4440A6457D923B7652C07C28D192C74B44402C9CA4F9637652C0A2957B81594B4440A81ABD1AA07652C0300C5872154B4440FBC8AD49B77652C035272F32014B44404127840EBA7652C02AE109BDFE4A44401DCBBBEA017752C02172FA7ABE4A4440130CE71A667752C0C6A2E9EC644A44400A4B3CA06C7752C0BEF8A23D5E4A4440A5D93C0E837752C06473D53C474A4440FDBCA948857752C06B98A1F1444A4440F0C000C2877752C0F0DE5163424A4440D8817346947752C04450357A354A4440BF28417FA17752C08099EFE0274A44400A2DEBFEB17752C0BCAE5FB01B4A44407FF8F9EFC17752C08C0DDDEC0F4A444053C90050C57752C0B14B546F0D4A44402E71E481C87752C0BF61A2410A4A44401EFB592C457852C09F39EB538E494440056D72F8A47852C06D8E739B7049444036AD1402B97852C0D68BA19C68494440F59F353FFE7852C0BAA0BE654E494440289A07B0C87952C0C58F31772D4944406133C005D97952C0D862B7CF2A494440E1783E03EA7952C04DDA54DD2349444046B3B27DC87A52C06A11514CDE4844402F185C73477B52C0FCE25295B6484440A26131EA5A7B52C06A696E85B04844408499B67F657B52C036902E36AD4844404F8F6D19707B52C0C1C760C5A94844402E1D739EB17B52C02BDCF29194484440F9122A38BC7B52C0B5132521914844401021AE9CBD7B52C080D250A39048444081CEA44DD57B52C0431B800D88484440BBB88D06F07B52C076A38FF980484440B5A50EF27A7C52C07780272D5C484440F7C77BD5CA7C52C08AE5965643484440614D6551D87C52C05CFDD8243F484440E84CDA54DD7C52C03F1878EE3D4844409947FE60E07C52C05774EB353D484440AF0793E2E37C52C0FF5C34643C48444065A54929E87C52C0C45E28603B484440EFAB72A1F27C52C01F12BEF737484440D07D39B35D7D52C0075F984C1548444025AB22DC647D52C03D0801F912484440C39E76F86B7D52C0861C5BCF104844401211FE45D07F52C0F2CEA10C55474440B804E09F528252C0785C548B884644407615527E528252C0DB85E63A8D464440E2E5E95C518252C0BB270F0BB546444089B48D3F518252C0A7203F1BB94644400858AB764D8252C0F294D5743D474440CD565EF23F8252C07D7555A0164944401B28F04E3E8252C0E9F010C64F494440AAB4C5353E8252C0BDC117265349444032CB9E04368252C0F6285C8FC24944405111A7936C8252C09FE238F06A4B44402252D32EA68252C0BC02D193324D44404C50C3B7B08252C0F9F36DC1524D4440D26F5F07CE8252C0E34F5436AC4D4440A774B0FECF8252C0C266800BB24D4440A626C11BD28252C007431D56B84D4440EDD286C3D28252C0DC476E4DBA4D44402638F581E48252C04A5F0839EF4D444074779D0DF98252C0E3C281902C4E4440890629780A8352C016DC0F78604E44408315A75A0B8352C0E5EFDE51634E4440EA793716148352C036E84B6F7F4E44404703780B248352C0C24CDBBFB24E44403046240A2D8352C09BE09BA6CF4E4440A4C00298328352C02D776682E14E444055F833BC598352C09F91088D604F4440B3B27DC85B8352C08922A46E674F444075E789E76C8352C066118AADA04F44400D52F014728352C051F355F2B14F4440C5ABAC6D8A8352C0D4D00660035044403D7E6FD39F8352C05C1ABFF04A5044405051F52B9D8352C042B28009DC504440 +(1 row) + + test3 +------- + +(1 row) + + test4 +------- + +(1 row) + + test5 +---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + 0106000020E6100000010000000103000000010000003500000056EF703B347C52C054FF2092215B44401B9AB2D30F7C52C03FE1ECD6325B4440B14B546F0D7C52C0BBCE86FC335B4440730F09DFFB7B52C0B796C9703C5B4440108FC4CBD37B52C0B96C74CE4F5B444001C0B167CF7B52C0ED0BE8853B5B4440C843DFDDCA7B52C05DDDB1D8265B4440A73D25E7C47B52C0D53BDC0E0D5B4440BB5E9A22C07B52C0F8A3A833F75A4440355F251FBB7B52C0B64604E3E05A444008910C39B67B52C098BF42E6CA5A44405227A089B07B52C0F204C24EB15A444024F1F274AE7B52C069E4F38AA75A44402B4A09C1AA7B52C06B63EC84975A4440E199D024B17B52C0546F0D6C955A44403C873254C57B52C02EAC1BEF8E5A44402593533BC37B52C0588AE42B815A4440973AC8EBC17B52C087890629785A44407A6F0C01C07B52C0E1EB6B5D6A5A44401B9B1DA9BE7B52C03F6F2A52615A444088855AD3BC7B52C088669E5C535A4440E1EA0088BB7B52C0E6E95C514A5A44400CE6AF90B97B52C070D05E7D3C5A44401E85EB51B87B52C0B03A72A4335A4440BAF3C473B67B52C09929ADBF255A4440CD920035B57B52C0454AB3791C5A4440F78DAF3DB37B52C0E09BA6CF0E5A4440DBC2F352B17B52C0703FE081015A444015C440D7BE7B52C05E83BEF4F659444041446ADAC57B52C0EFDFBC38F15944405FB1868BDC7B52C0C03E3A75E559444034BC5983F77B52C0205ED72FD8594440EFFCA204FD7B52C07E384888F25944403ACAC16C027C52C00876FC17085A444056478E74067C52C00FECF82F105A44400FECF82F107C52C0876D8B321B5A4440BB438A01127C52C0DE1CAED51E5A4440B9C15087157C52C034643C4A255A444099F221A81A7C52C0D0EFFB372F5A44404AED45B41D7C52C0785DBF60375A4440373465A71F7C52C065A71FD4455A4440C558A65F227C52C0D80DDB16655A4440F92EA52E197C52C09BA73AE4665A4440DEE522BE137C52C00664AF777F5A44405698BED7107C52C04759BF99985A444012D90759167C52C09430D3F6AF5A444044679945287C52C01F680586AC5A444049F086342A7C52C09CC3B5DAC35A44401FF5D72B2C7C52C0CB811E6ADB5A4440247EC51A2E7C52C0548B8862F25A4440FF59F3E32F7C52C0CB290131095B4440F96871C6307C52C09605137F145B444056EF703B347C52C054FF2092215B4440 +(1 row) + + test6 +------- + +(1 row) + + obs_getgeometryid_test1 +------------------------- + 36047048500 +(1 row) + + obs_getgeometryid_test2 +------------------------- + 36047048500 +(1 row) + + obs_getgeometryid_test3 +------------------------- + 36047 +(1 row) + + obs_getgeometryid_test4 +------------------------- + +(1 row) + + obs_getgeometrybyid +-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + 0106000020E6100000010000000103000000010000002C0200005051F52B9D8352C042B28009DC50444093C2BCC7998352C0E89E758D965144402EFD4B52998352C09A07B0C8AF514440E75086AA988352C022FAB5F5D351444027874F3A918352C0A46B26DF6C53444018E945ED7E8352C04D81CCCEA25344401346B3B27D8352C05D50DF32A753444068226C787A8352C08D25AC8DB153444015C8EC2C7A8352C004560E2DB2534440DF8618AF798352C00FD07D39B3534440FEB627486C8352C0DC9E20B1DD534440B98C9B1A688352C05D328E91EC5344408B8A389D648352C0929048DBF853444075CAA31B618352C0986A662D05544440EA758BC0588352C0D6C397892254444048DFA469508352C0151DC9E53F544440B67F65A5498352C0F73DEAAF575444401403249A408352C05E2A36E6755444402367614F3B8352C06DE2E47E8754444011FC6F253B8352C0431B800D885444403E7958A8358352C0DD0A6135965444401D739EB12F8352C093DFA293A5544440FB04508C2C8352C035289A07B05444401EA4A7C8218352C0347F4C6BD3544440D7C05609168352C05053CBD6FA544440AC8E1CE90C8352C0C9AA083719554440FC8D76DCF08252C0BD18CA897655444048895DDBDB8252C0C3B7B06EBC554440698995D1C88252C032207BBDFB55444004A73E90BC8252C0DB4C857824564440321F10E84C8252C08862F20698574440BB0853944B8252C09831056B9C57444080F0A1444B8252C0D32F116F9D574440C7629B54348252C0418177F2E9574440CEA44DD53D8152C04F1F813FFC564440A51133FB3C8152C0F607CA6DFB5644404D2EC6C03A8152C0DD43C2F7FE564440C5C6BC8E388152C0F3035779025744404B3E7617288152C0C1340C1F11574440C99063EB198152C0BB6070CD1D57444086E5CFB7058152C001D9EBDD1F574440DD770C8FFD8052C09F573CF548574440E69315C3D58052C0BCE47FF2775744404852D2C3D08052C0122C0E677E574440581EA4A7C88052C084F068E388574440187AC4E8B98052C0336C94F59B5744400E828E56B58052C0A80018CFA0574440B7B24467998052C0C8409E5DBE574440BEA085048C8052C032ACE28DCC5744401215AA9B8B8052C0A8A8FA95CE574440B9313D61898052C01F2A8D98D9574440C6DFF604898052C0A8C5E061DA574440AA622AFD848052C0B5F81400E3574440BD1B0B0A838052C012656F29E75744406C91B41B7D8052C0745AB741ED5744408C2C9963798052C0D2FA5B02F05744403315E291788052C079AF5A99F0574440412B3064758052C0128255F5F25744401329CDE6718052C0B7CEBF5DF6574440FEB3E6C75F8052C00876FC1708584440B70721205F8052C04374081C09584440A7CD380D518052C0C00303081F5844400133DFC14F8052C001BF469220584440EA211ADD418052C07570B03731584440CD3CB9A6408052C015342DB13258444020B1DD3D408052C0B03A72A433584440BA66F2CD368052C09F3D97A9495844400EDB1665368052C08C9E5BE84A584440F3AB3940308052C05376FA415D584440880FECF82F8052C0115322895E584440C6DD205A2B8052C0DC7F643A74584440FC389A232B8052C0F4A78DEA74584440990F0874268052C0FDD64E9484584440A5BDC117268052C02C27A1F4855844407218CC5F218052C0F9BB77D498584440F65E7CD11E8052C0E8A1B60DA3584440C1374D9F1D8052C0BC3E73D6A758444022DC6454198052C00629780AB95844406519E258178052C0FF03AC55BB584440FA5FAE450B8052C05704FF5BC9584440D7A3703D0A8052C0F25B74B2D458444036ACA92C0A8052C00A849D62D55844407FDAA84E078052C006BAF605F45844408B8862F2068052C017F19D98F558444006F1811DFF7F52C04DBD6E111859444048FAB48AFE7F52C0CF6740BD195944407A1A3048FA7F52C0E6AC4F3926594440382BA226FA7F52C08D614ED0265944407A34D593F97F52C0081B9E5E29594440F8A3A833F77F52C03A58FFE7305944402AAA7EA5F37F52C0643C4A253C594440A7E507AEF27F52C0321CCF674059444063EFC517ED7F52C0438D429259594440B1A6B228EC7F52C0185E49F25C5944400DC2DCEEE57F52C09BAA7B6473594440EA059FE6E47F52C0C3D50110775944403B8DB454DE7F52C059F5B9DA8A594440A06CCA15DE7F52C094F3C5DE8B5944408509A359D97F52C0910C39B69E594440244223D8B87F52C0FE7A8505F7594440EF004F5AB87F52C08DD31055F85944409CDA19A6B67F52C03F53AF5B045A4440F7730AF2B37F52C05A9C31CC095A444009C21550A87F52C0077C7E18215A44409E3F6D54A77F52C00C056C07235A4440C3499A3FA67F52C0586E6935245A44407020240B987F52C080B6D5AC335A4440DDD0949D7E7F52C07383A10E2B5A44404E417E36727F52C0207A5226355A4440F4A44C6A687F52C0A2410A9E425A4440E92ADD5D677F52C061527C7C425A44407905A227657F52C03D7C9928425A4440791C06F3577F52C0D9EA724A405A4440F2B4FCC0557F52C08690F3FE3F5A4440FE7C5BB0547F52C0209738F2405A444052F17F47547F52C014E97E4E415A4440350C1F11537F52C0AF230ED9405A444098158A743F7F52C08F519E79395A44401ABD1AA0347F52C0A3586E69355A4440EB5223F4337F52C0207A5226355A4440A8AAD0402C7F52C0D89942E7355A44407C5EF1D4237F52C0613596B0365A44400227DBC01D7F52C007EA9447375A4440567E198C117F52C084D72E6D385A44402C7DE882FA7E52C0249BABE6395A4440D72FD80DDB7E52C0955F0663445A44401F2A8D98D97E52C0CBA0DAE0445A4440ACC612D6C67E52C0771211FE455A444026FBE769C07E52C06B64575A465A44400B7BDAE1AF7E52C023D5777E515A44407E8AE3C0AB7E52C0EBC37AA3565A4440268DD13AAA7E52C04F55A181585A4440525F96766A7E52C02502D53F885A4440A69C2FF65E7E52C003B16CE6905A44403B342C465D7E52C0D8B5BDDD925A444002B859BC587E52C0B20FB22C985A4440B0912408577E52C0871403249A5A444039950C00557E52C021E7FD7F9C5A4440D3139678407E52C015731074B45A444080ED60C43E7E52C0BAF3C473B65A4440FB3BDBA3377E52C074CC79C6BE5A44401BB7989F1B7E52C042E73576895A4440B01A4B581B7E52C03D2AFEEF885A4440D68C0C72177E52C07C60C77F815A44407EA99F37157E52C0AE80423D7D5A444053910A630B7E52C04A2366F6795A4440B7EEE6A90E7E52C0670E492D945A44401A4CC3F0117E52C0D829560DC25A444064AE0CAA0D7E52C0D74CBED9E65A4440D3687231067E52C07405DB88275B4440158C4AEA047E52C08D7E349C325B4440AB5791D1017E52C048BF7D1D385B4440268C6665FB7D52C0548A1D8D435B44405C1B2AC6F97D52C065187783685B4440FA0B3D62F47D52C03FE08101845B4440E2E313B2F37D52C03196E997885B444038F4160FEF7D52C05D50DF32A75B4440109546CCEC7D52C07FDB1324B65B44401C261AA4E07D52C0BA641C23D95B44405A0EF450DB7D52C0081F4AB4E45B4440BBB20B06D77D52C06E693524EE5B4440CE6BEC12D57D52C0FB592C45F25B444073672618CE7D52C09A0645F3005C4440BB7B80EECB7D52C0C7BAB88D065C4440F5F411F8C37D52C057E9EE3A1B5C44407B8670CCB27D52C09AB4A9BA475C4440240B98C0AD7D52C0282A1BD6545C4440E4839ECDAA7D52C0FA5E43705C5C4440E4805D4D9E7D52C08AAA5FE97C5C44401B2AC6F99B7D52C01C2444F9825C4440D3122BA3917D52C059F8FA5A975C4440A7ACA6EB897D52C0FD2D01F8A75C444007B5DFDA897D52C04818062CB95C44401EF7ADD6897D52C0399A232BBF5C444036397CD2897D52C0904946CEC25C444001DE02098A7D52C08A58C4B0C35C4440CB68E4F38A7D52C0527B116DC75C4440AD4F39268B7D52C0AB92C83EC85C4440531EDD088B7D52C0EB19C231CB5C4440C5C551B9897D52C070EB6E9EEA5C444077F4BF5C8B7D52C090149161155D44409BE447FC8A7D52C0161406651A5D4440D13FC1C58A7D52C0F792C6681D5D4440E3DEFC86897D52C0836C59BE2E5D44407EFFE6C5897D52C087C1FC15325D444071033E3F8C7D52C0DBA6785C545D44407C6308008E7D52C03FA6B5696C5D4440F42F49658A7D52C054FEB5BC725D4440713788D68A7D52C0ED9C6681765D44403CDC0E0D8B7D52C0B036C64E785D44403B8E1F2A8D7D52C066A3737E8A5D4440D3F88557927D52C07D0569C6A25D44407D022846967D52C0E5D4CE30B55D4440BFF1B567967D52C07C0BEBC6BB5D44409B012EC8967D52C0DE1D19ABCD5D44400AF31E679A7D52C0081F4AB4E45D4440D47D00529B7D52C0EBE1CB44115E44403F00A94D9C7D52C068774831405E4440F7393E5A9C7D52C04339D1AE425E44409831056B9C7D52C090A2CEDC435E444003B4AD669D7D52C086CABF96575E44402670EB6E9E7D52C0048E041A6C5E44409C69C2F6937D52C03259DC7F645E4440DDED7A698A7D52C047C8409E5D5E44407842AF3F897D52C0EEB089CC5C5E4440B053AC1A847D52C0859675FF585E444033FCA71B287D52C04D4A41B7975E444042942F68217D52C03F00A94D9C5E44404885B185207D52C0E5B4A7E49C5E4440751C3F541A7D52C0E318C91EA15E4440C26856B60F7D52C03A94A12AA65E4440FA7953910A7D52C093DFA293A55E444057923CD7F77C52C0C63368E89F5E444003CE52B29C7C52C06C239EEC665E44409AB33EE5987C52C020EEEA55645E4440DFC0E446917C52C0CF6394675E5E4440A70183A44F7C52C0B60E0EF6265E44400E0F61FC347C52C0CE88D2DEE05D4440E1404816307C52C01FD95C35CF5D444091B6F1272A7C52C0A7069ACFB95D444014C95702297C52C0CC785BE9B55D4440807F4A95287C52C0567C43E1B35D4440CE3637A6277C52C047AD307DAF5D4440DAFE9595267C52C07D569929AD5D4440FB90B75CFD7B52C02159C0046E5D4440876EF607CA7B52C078B130444E5D4440438CD7BCAA7B52C0321CCF67405D44401DC9E53FA47B52C0938C9C853D5D4440BBED42739D7B52C0111615713A5D444026FF93BF7B7B52C02BBD361B2B5D444039ECBE63787B52C091B6F1272A5D4440F2599E07777B52C0D40D1478275D4440A3005130637B52C01DFF0582005D4440A3AF20CD587B52C08AC6DADFD95C4440EB8F300C587B52C050FC1873D75C444003ECA353577B52C0E6ADBA0ED55C444003AF963B337B52C04694F6065F5C4440D13AAA9A207B52C0F0A485CB2A5C4440486B0C3A217B52C0B9DE3653215C4440E814E467237B52C065C57075005C44404F73F222137B52C08EC70C54C65B4440020D36751E7B52C0367689EAAD5B4440669E5C53207B52C0EA7420EBA95B4440A92C0ABB287B52C0D6FF39CC975B4440C2BCC799267B52C0E9B5D958895B4440B3075A81217B52C04276DEC6665B44405DDA70581A7B52C0535C55F65D5B4440C70BE9F0107B52C03526C45C525B444093C7D3F2037B52C08B338639415B44407E8978EBFC7A52C0FC1BB4571F5B4440D4B32094F77A52C0D061BEBC005B444016BD5301F77A52C09C887E6DFD5A4440887E6DFDF47A52C07B82C476F75A4440ECA4BE2CED7A52C0AE0AD462F05A4440846055BDFC7A52C0EF3A1BF2CF5A4440C1E09A3BFA7A52C072FC5069C45A444068C9E369F97A52C0D95DA0A4C05A4440A94D9CDCEF7A52C050711C78B55A4440321AF9BCE27A52C0FD2D01F8A75A44400F0D8B51D77A52C0F566D47C955A4440A5F27684D37A52C0EB54F99E915A4440C843DFDDCA7A52C02BBF0CC6885A44402A36E675C47A52C0DB68006F815A44405C70067FBF7A52C03D4162BB7B5A44405DA45016BE7A52C05C8E57207A5A44408D25AC8DB17A52C0681F2BF86D5A44404C4D8237A47A52C063450DA6615A4440419C8713987A52C0185B0872505A4440B6476FB88F7A52C058C51B99475A4440B8C9A8328C7A52C0BF266BD4435A4440FA9B5088807A52C0D9CD8C7E345A4440A70A4625757A52C0AA605452275A4440B28174B1697A52C0DC63E943175A4440888384285F7A52C04240BE840A5A44405DA27A6B607A52C085CB2A6C065A4440764F1E166A7A52C0D175E107E759444011397D3D5F7A52C0F0D93A38D85944404C3448C1537A52C05DA79196CA594440419DF2E8467A52C0DC476E4DBA594440088F368E587A52C048A7AE7C96594440A84F72874D7A52C0F42F49658A594440BBEB6CC83F7A52C092E9D0E979594440AEB8382A377A52C0329067976F594440B5C01E13297A52C03A00E2AE5E5944408235CEA6237A52C026A8E15B58594440682096CD1C7A52C0BF29AC545059444019E42EC2147A52C0813E912749594440B0FD648C0F7A52C04910AE80425944403A014D840D7A52C062A06B5F405944405F0B7A6F0C7A52C0B62E35423F594440959A3DD00A7A52C06308008E3D594440A86DC328087A52C09BE5B2D1395944402DE8BD31047A52C00F290648345944404B1B0E4B037A52C021C84109335944406A82A8FB007A52C004E3E0D2315944401E335019FF7952C0996038D730594440BF44BC75FE7952C0A051BAF42F594440EFFCA204FD7952C0FAD005F52D59444074779D0DF97952C03E90BC73285944407B681F2BF87952C021AB5B3D275944406917D34CF77952C00A83328D265944404084B872F67952C0C3D66CE525594440FFAECF9CF57952C04CA60A4625594440350A4966F57952C03A3B191C255944405323F433F57952C0F94B8BFA2459444077137CD3F47952C0A6F10BAF24594440942C27A1F47952C064027E8D24594440560DC2DCEE7952C05DC0CB0C1B594440755AB741ED7952C0410FB56D18594440D47C957CEC7952C053AEF02E17594440B1DAFCBFEA7952C0EEE87FB9165944402368CC24EA7952C0DC7D8E8F165944405FB4C70BE97952C089230F4416594440D0419770E87952C077B81D1A1659444065A54929E87952C0D7C05609165944409B00C3F2E77952C036C98FF815594440D42B6519E27952C047E350BF0B594440B2F4A10BEA7952C05C01857AFA58444009A4C4AEED7952C066F6798CF258444021037976F97952C06E15C440D75844409DD32CD0EE7952C0A46DFC89CA584440CE8B135FED7952C05247C7D5C85844408BFD65F7E47952C009168733BF5844401C40BFEFDF7952C0CBF6216FB9584440B33F506EDB7952C0747B4963B4584440C8940F41D57952C0B96E4A79AD584440FF06EDD5C77952C0D349B6BA9C58444093331477BC7952C0B77BB94F8E5844400C0055DCB87952C03605323B8B584440F068E388B57952C0C6F99B50885844401E34BBEEAD7952C0179B560A8158444085B2F0F5B57952C0BCADF4DA6C584440BAD91F28B77952C0ACAA97DF69584440BABC395CAB7952C006B64AB03858444014EB54F99E7952C01188D7F50B584440A98592C9A97952C0691A14CD0358444093FDF334607952C06C205D6C5A574440170D198F527952C01A8524B37A57444005854199467952C0AD6C1FF2965744409F3A56293D7952C02C98F8A3A85744401230BABC397952C0B2632310AF574440DD2230D6377952C0691B7FA2B257444061FBC9181F7952C097A608707A5744403140A209147952C05017299485574440567E198C117952C02BD9B111885744407BBC900E0F7952C0D7169E978A5744407FDAA84E077952C002637D039357444083F8C08EFF7852C0FE2AC0779B57444087307E1AF77852C0E1968FA4A4574440B515FBCBEE7852C0E449D235935744407F69519FE47852C065A9F57EA3574440EACE13CFD97852C0B6847CD0B35744402B8716D9CE7852C0CB7EDDE9CE5744408F8D40BCAE7852C070D1C952EB574440AF08FEB7927852C0EF1989D0085844403FFD67CD8F7852C0719010E50B5844401C2785798F7852C0764D486B0C584440F697DD93877852C0ACAB02B51858444037363B527D7852C0093543AA28584440C3D50110777852C09355116E32584440EEE714E4677852C03387A4164A584440717500C45D7852C07EA5F3E1595844405791D101497852C09D7DE5417A5844401AC1C6F5EF7752C0B9162D40DB5844400F7C0C569C7752C03EE8D9ACFA58444005508C2C997752C09259BDC3ED584440AC38D55A987752C0D1217024D0584440533BC3D4967752C04B5645B8C9584440E7FF55478E7752C05DC2A1B7785844402FFA0AD28C7752C0581CCEFC6A584440DCB930D28B7752C021567F8461584440FB20CB82897752C062D7F6764B58444079909E22877752C0D89942E7355844408C63247B847752C0B58993FB1D584440ACE46377817752C0677E350708584440C6C210397D7752C0B2F4A10BEA57444074B680D07A7752C0909DB7B1D9574440DB317557767752C0077767EDB65744409A7631CD747752C02D7B12D89C5744400D6C9560717752C054FEB5BC72574440FC34EECD6F7752C0A3E6ABE4635744409E7AA4C16D7752C0D1949D7E50574440FE9C82FC6C7752C0E046CA16495744401E4FCB0F5C7752C09B53C90050574440D503E621537752C0E063B0E25457444037DC476E4D7752C032569BFF5757444070ED4449487752C0836C59BE2E57444066F50EB7437752C054C554FA0957444032022A1C417752C0713C9F01F55644404487C091407752C01F7EFE7BF05644406E4E2503407752C05D4C33DDEB56444088F546AD307752C03ECBF3E0EE5644401F0F7D772B7752C04835ECF7C4564440A33B889D297752C026AAB706B656444087A4164A267752C0938E72309B5644403B6F63B3237752C050FD834886564440D7F7E120217752C00D6C956071564440132A38BC207752C07A8A1C226E564440315D88D51F7752C07E8E8F1667564440D4F02DAC1B7752C0ADA415DF505644408D4468041B7752C0952BBCCB45564440B88D06F0167752C0BB46CB811E564440A435069D107752C0C8E88024EC554440C9703C9F017752C0F01307D0EF55444083DE1B43007752C0855D143DF05544404EB4AB90F27652C0A69718CBF45544401ABE8575E37652C0C214E5D2F8554440293C6876DD7652C0807D74EACA5544403FABCC94D67652C0F58079C8945544405AD76839D07652C0B41D537765554440849ECDAACF7652C0272D5C56615544405DA79196CA7652C0D87F9D9B36554440331477BCC97652C06A10E6762F554440B41F2922C37652C07B82C476F75444406F2C280CCA7652C030815B77F35444405164ADA1D47652C0BC202235ED544440685BCD3AE37652C0F4311F10E8544440D6E429ABE97652C04203B16CE65444408B4E965AEF7652C0A23F34F3E454444080BA8102EF7652C0C77DAB75E2544440B515FBCBEE7652C0B64604E3E05444407C992842EA7652C02DEC6987BF544440F9BA0CFFE97652C028637C98BD544440363B527DE77652C0001B1021AE544440A359D93EE47652C0378AAC359454444027BA2EFCE07652C05C8E57207A5444403A765089EB7652C0DB17D00B7754444064744012F67652C059A148F77354444027C0B0FCF97652C054185B0872544440D1C952EBFD7652C0200BD1217054444092AD2EA7047752C0E083D72E6D544440F488D1730B7752C0CF807A336A544440A6B73F170D7752C0357A3540695444406F287CB60E7752C0CAF78C4468544440B3D0CE69167752C0A9BD88B663544440F678211D1E7752C0888384285F544440834F73F2227752C0E3361AC05B544440C2F693313E7752C0C05AB56B42544440F834272F327752C06684B70721544440C4758C2B2E7752C03D0801F9125444408D959867257752C00E4A9869FB53444022C2BF081A7752C0247F30F0DC534440EF1CCA50157752C03599F1B6D2534440C0B2D2A4147752C06551D845D15344409048DBF8137752C09509BFD4CF53444067B5C01E137752C01F0DA7CCCD5344403E22A644127752C0D9942BBCCB534440A71FD4450A7752C029B16B7BBB534440C0AF9124087752C0E95DBC1FB75344400856D5CBEF7652C018062CB98A534440F71BEDB8E17652C098A0866F615344406403E962D37652C03197546D375344404A22FB20CB7652C0765089EB185344402A1900AAB87652C0BE0F070951524440E386DF4DB77652C01F63EE5A425244400F7D772B4B7652C005A568E55E524440FB3F87F9F27552C07D224F92AE5144405793A7ACA67552C0D7C0560916514440BEDA519CA37552C0A44FABE80F514440745B22179C7552C0E2CCAFE600514440DCD6169E977552C00B43E4F4F5504440A93121E6927552C05E807D74EA504440D13FC1C58A7552C056ED9A90D6504440096B63EC847552C0AB92C83EC8504440AE80423D7D7552C04127840EBA50444040F7E5CC767552C0D0967329AE504440632827DA557552C0DEE7F86871504440C8ED974F567552C05646239F57504440211FF46C567552C03674B33F5050444015713AC9567552C059DC7F643A5044404AB20E47577552C028B682A62550444037AB3E575B7552C0F7AE415F7A4F444045460724617552C0A94885B1854E4440F62686E4647552C02D978DCEF94D444036AE7FD7677552C018AE0E80B84D4440B9E00CFE7E7552C0B01F6283854D4440446B459BE37552C0C5E23785954C444012A27C410B7652C03C1405FA444C4440588B4F01307652C0B058C345EE4B4440A6457D923B7652C07C28D192C74B44402C9CA4F9637652C0A2957B81594B4440A81ABD1AA07652C0300C5872154B4440FBC8AD49B77652C035272F32014B44404127840EBA7652C02AE109BDFE4A44401DCBBBEA017752C02172FA7ABE4A4440130CE71A667752C0C6A2E9EC644A44400A4B3CA06C7752C0BEF8A23D5E4A4440A5D93C0E837752C06473D53C474A4440FDBCA948857752C06B98A1F1444A4440F0C000C2877752C0F0DE5163424A4440D8817346947752C04450357A354A4440BF28417FA17752C08099EFE0274A44400A2DEBFEB17752C0BCAE5FB01B4A44407FF8F9EFC17752C08C0DDDEC0F4A444053C90050C57752C0B14B546F0D4A44402E71E481C87752C0BF61A2410A4A44401EFB592C457852C09F39EB538E494440056D72F8A47852C06D8E739B7049444036AD1402B97852C0D68BA19C68494440F59F353FFE7852C0BAA0BE654E494440289A07B0C87952C0C58F31772D4944406133C005D97952C0D862B7CF2A494440E1783E03EA7952C04DDA54DD2349444046B3B27DC87A52C06A11514CDE4844402F185C73477B52C0FCE25295B6484440A26131EA5A7B52C06A696E85B04844408499B67F657B52C036902E36AD4844404F8F6D19707B52C0C1C760C5A94844402E1D739EB17B52C02BDCF29194484440F9122A38BC7B52C0B5132521914844401021AE9CBD7B52C080D250A39048444081CEA44DD57B52C0431B800D88484440BBB88D06F07B52C076A38FF980484440B5A50EF27A7C52C07780272D5C484440F7C77BD5CA7C52C08AE5965643484440614D6551D87C52C05CFDD8243F484440E84CDA54DD7C52C03F1878EE3D4844409947FE60E07C52C05774EB353D484440AF0793E2E37C52C0FF5C34643C48444065A54929E87C52C0C45E28603B484440EFAB72A1F27C52C01F12BEF737484440D07D39B35D7D52C0075F984C1548444025AB22DC647D52C03D0801F912484440C39E76F86B7D52C0861C5BCF104844401211FE45D07F52C0F2CEA10C55474440B804E09F528252C0785C548B884644407615527E528252C0DB85E63A8D464440E2E5E95C518252C0BB270F0BB546444089B48D3F518252C0A7203F1BB94644400858AB764D8252C0F294D5743D474440CD565EF23F8252C07D7555A0164944401B28F04E3E8252C0E9F010C64F494440AAB4C5353E8252C0BDC117265349444032CB9E04368252C0F6285C8FC24944405111A7936C8252C09FE238F06A4B44402252D32EA68252C0BC02D193324D44404C50C3B7B08252C0F9F36DC1524D4440D26F5F07CE8252C0E34F5436AC4D4440A774B0FECF8252C0C266800BB24D4440A626C11BD28252C007431D56B84D4440EDD286C3D28252C0DC476E4DBA4D44402638F581E48252C04A5F0839EF4D444074779D0DF98252C0E3C281902C4E4440890629780A8352C016DC0F78604E44408315A75A0B8352C0E5EFDE51634E4440EA793716148352C036E84B6F7F4E44404703780B248352C0C24CDBBFB24E44403046240A2D8352C09BE09BA6CF4E4440A4C00298328352C02D776682E14E444055F833BC598352C09F91088D604F4440B3B27DC85B8352C08922A46E674F444075E789E76C8352C066118AADA04F44400D52F014728352C051F355F2B14F4440C5ABAC6D8A8352C0D4D00660035044403D7E6FD39F8352C05C1ABFF04A5044405051F52B9D8352C042B28009DC504440 +(1 row) + + ?column? +---------- + t +(1 row) + + obs_getgeometrybyid +--------------------- + +(1 row) + +Dropping obs_table.sql fixture table... +Done. +Dropping obs_column.sql fixture table... +Done. +Dropping obs_column_table.sql fixture table... +Done. +Dropping obs_column_to_column.sql fixture table... +Done. +Dropping obs_85328201013baa14e8e8a4a57a01e6f6fbc5f9b1 fixture table... +Done. +Dropping obs_3e7cc9cfd403b912c57b42d5f9195af9ce2f3cdb fixture table... +Done. +Dropping obs_ab038198aaab3f3cb055758638ee4de28ad70146 fixture table... +Done. +Dropping obs_a92e1111ad3177676471d66bb8036e6d057f271b fixture table... +Done. +Dropping obs_11ee8b82c877c073438bc935a91d3dfccef875d1 fixture table... +Done. +Dropping obs_d34555209878e8c4b37cf0b2b3d072ff129ec470 fixture table... +Done. +Dropping obs_b0ef6dd68d5faddbf231fd7f02916b3d00ec43c4 fixture table... +Done. From 31609e347a493564390ac459ab750d6baa4b948e Mon Sep 17 00:00:00 2001 From: Andy Eschbacher Date: Fri, 22 Apr 2016 15:48:07 -0400 Subject: [PATCH 13/41] adding new fixture --- ...bs_b0ef6dd68d5faddbf231fd7f02916b3d00ec43c4.sql | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 src/pg/test/fixtures/obs_b0ef6dd68d5faddbf231fd7f02916b3d00ec43c4.sql diff --git a/src/pg/test/fixtures/obs_b0ef6dd68d5faddbf231fd7f02916b3d00ec43c4.sql b/src/pg/test/fixtures/obs_b0ef6dd68d5faddbf231fd7f02916b3d00ec43c4.sql new file mode 100644 index 0000000..d29290a --- /dev/null +++ b/src/pg/test/fixtures/obs_b0ef6dd68d5faddbf231fd7f02916b3d00ec43c4.sql @@ -0,0 +1,14 @@ + +CREATE TABLE obs_b0ef6dd68d5faddbf231fd7f02916b3d00ec43c4 ( + cartodb_id integer, + the_geom geometry(Geometry,4326), + the_geom_webmercator geometry(Geometry,3857), + geoid text +); + +COPY obs_b0ef6dd68d5faddbf231fd7f02916b3d00ec43c4 (cartodb_id, the_geom, the_geom_webmercator, geoid) FROM stdin; +2007 0106000020E6100000010000000103000000010000002C0200005051F52B9D8352C042B28009DC50444093C2BCC7998352C0E89E758D965144402EFD4B52998352C09A07B0C8AF514440E75086AA988352C022FAB5F5D351444027874F3A918352C0A46B26DF6C53444018E945ED7E8352C04D81CCCEA25344401346B3B27D8352C05D50DF32A753444068226C787A8352C08D25AC8DB153444015C8EC2C7A8352C004560E2DB2534440DF8618AF798352C00FD07D39B3534440FEB627486C8352C0DC9E20B1DD534440B98C9B1A688352C05D328E91EC5344408B8A389D648352C0929048DBF853444075CAA31B618352C0986A662D05544440EA758BC0588352C0D6C397892254444048DFA469508352C0151DC9E53F544440B67F65A5498352C0F73DEAAF575444401403249A408352C05E2A36E6755444402367614F3B8352C06DE2E47E8754444011FC6F253B8352C0431B800D885444403E7958A8358352C0DD0A6135965444401D739EB12F8352C093DFA293A5544440FB04508C2C8352C035289A07B05444401EA4A7C8218352C0347F4C6BD3544440D7C05609168352C05053CBD6FA544440AC8E1CE90C8352C0C9AA083719554440FC8D76DCF08252C0BD18CA897655444048895DDBDB8252C0C3B7B06EBC554440698995D1C88252C032207BBDFB55444004A73E90BC8252C0DB4C857824564440321F10E84C8252C08862F20698574440BB0853944B8252C09831056B9C57444080F0A1444B8252C0D32F116F9D574440C7629B54348252C0418177F2E9574440CEA44DD53D8152C04F1F813FFC564440A51133FB3C8152C0F607CA6DFB5644404D2EC6C03A8152C0DD43C2F7FE564440C5C6BC8E388152C0F3035779025744404B3E7617288152C0C1340C1F11574440C99063EB198152C0BB6070CD1D57444086E5CFB7058152C001D9EBDD1F574440DD770C8FFD8052C09F573CF548574440E69315C3D58052C0BCE47FF2775744404852D2C3D08052C0122C0E677E574440581EA4A7C88052C084F068E388574440187AC4E8B98052C0336C94F59B5744400E828E56B58052C0A80018CFA0574440B7B24467998052C0C8409E5DBE574440BEA085048C8052C032ACE28DCC5744401215AA9B8B8052C0A8A8FA95CE574440B9313D61898052C01F2A8D98D9574440C6DFF604898052C0A8C5E061DA574440AA622AFD848052C0B5F81400E3574440BD1B0B0A838052C012656F29E75744406C91B41B7D8052C0745AB741ED5744408C2C9963798052C0D2FA5B02F05744403315E291788052C079AF5A99F0574440412B3064758052C0128255F5F25744401329CDE6718052C0B7CEBF5DF6574440FEB3E6C75F8052C00876FC1708584440B70721205F8052C04374081C09584440A7CD380D518052C0C00303081F5844400133DFC14F8052C001BF469220584440EA211ADD418052C07570B03731584440CD3CB9A6408052C015342DB13258444020B1DD3D408052C0B03A72A433584440BA66F2CD368052C09F3D97A9495844400EDB1665368052C08C9E5BE84A584440F3AB3940308052C05376FA415D584440880FECF82F8052C0115322895E584440C6DD205A2B8052C0DC7F643A74584440FC389A232B8052C0F4A78DEA74584440990F0874268052C0FDD64E9484584440A5BDC117268052C02C27A1F4855844407218CC5F218052C0F9BB77D498584440F65E7CD11E8052C0E8A1B60DA3584440C1374D9F1D8052C0BC3E73D6A758444022DC6454198052C00629780AB95844406519E258178052C0FF03AC55BB584440FA5FAE450B8052C05704FF5BC9584440D7A3703D0A8052C0F25B74B2D458444036ACA92C0A8052C00A849D62D55844407FDAA84E078052C006BAF605F45844408B8862F2068052C017F19D98F558444006F1811DFF7F52C04DBD6E111859444048FAB48AFE7F52C0CF6740BD195944407A1A3048FA7F52C0E6AC4F3926594440382BA226FA7F52C08D614ED0265944407A34D593F97F52C0081B9E5E29594440F8A3A833F77F52C03A58FFE7305944402AAA7EA5F37F52C0643C4A253C594440A7E507AEF27F52C0321CCF674059444063EFC517ED7F52C0438D429259594440B1A6B228EC7F52C0185E49F25C5944400DC2DCEEE57F52C09BAA7B6473594440EA059FE6E47F52C0C3D50110775944403B8DB454DE7F52C059F5B9DA8A594440A06CCA15DE7F52C094F3C5DE8B5944408509A359D97F52C0910C39B69E594440244223D8B87F52C0FE7A8505F7594440EF004F5AB87F52C08DD31055F85944409CDA19A6B67F52C03F53AF5B045A4440F7730AF2B37F52C05A9C31CC095A444009C21550A87F52C0077C7E18215A44409E3F6D54A77F52C00C056C07235A4440C3499A3FA67F52C0586E6935245A44407020240B987F52C080B6D5AC335A4440DDD0949D7E7F52C07383A10E2B5A44404E417E36727F52C0207A5226355A4440F4A44C6A687F52C0A2410A9E425A4440E92ADD5D677F52C061527C7C425A44407905A227657F52C03D7C9928425A4440791C06F3577F52C0D9EA724A405A4440F2B4FCC0557F52C08690F3FE3F5A4440FE7C5BB0547F52C0209738F2405A444052F17F47547F52C014E97E4E415A4440350C1F11537F52C0AF230ED9405A444098158A743F7F52C08F519E79395A44401ABD1AA0347F52C0A3586E69355A4440EB5223F4337F52C0207A5226355A4440A8AAD0402C7F52C0D89942E7355A44407C5EF1D4237F52C0613596B0365A44400227DBC01D7F52C007EA9447375A4440567E198C117F52C084D72E6D385A44402C7DE882FA7E52C0249BABE6395A4440D72FD80DDB7E52C0955F0663445A44401F2A8D98D97E52C0CBA0DAE0445A4440ACC612D6C67E52C0771211FE455A444026FBE769C07E52C06B64575A465A44400B7BDAE1AF7E52C023D5777E515A44407E8AE3C0AB7E52C0EBC37AA3565A4440268DD13AAA7E52C04F55A181585A4440525F96766A7E52C02502D53F885A4440A69C2FF65E7E52C003B16CE6905A44403B342C465D7E52C0D8B5BDDD925A444002B859BC587E52C0B20FB22C985A4440B0912408577E52C0871403249A5A444039950C00557E52C021E7FD7F9C5A4440D3139678407E52C015731074B45A444080ED60C43E7E52C0BAF3C473B65A4440FB3BDBA3377E52C074CC79C6BE5A44401BB7989F1B7E52C042E73576895A4440B01A4B581B7E52C03D2AFEEF885A4440D68C0C72177E52C07C60C77F815A44407EA99F37157E52C0AE80423D7D5A444053910A630B7E52C04A2366F6795A4440B7EEE6A90E7E52C0670E492D945A44401A4CC3F0117E52C0D829560DC25A444064AE0CAA0D7E52C0D74CBED9E65A4440D3687231067E52C07405DB88275B4440158C4AEA047E52C08D7E349C325B4440AB5791D1017E52C048BF7D1D385B4440268C6665FB7D52C0548A1D8D435B44405C1B2AC6F97D52C065187783685B4440FA0B3D62F47D52C03FE08101845B4440E2E313B2F37D52C03196E997885B444038F4160FEF7D52C05D50DF32A75B4440109546CCEC7D52C07FDB1324B65B44401C261AA4E07D52C0BA641C23D95B44405A0EF450DB7D52C0081F4AB4E45B4440BBB20B06D77D52C06E693524EE5B4440CE6BEC12D57D52C0FB592C45F25B444073672618CE7D52C09A0645F3005C4440BB7B80EECB7D52C0C7BAB88D065C4440F5F411F8C37D52C057E9EE3A1B5C44407B8670CCB27D52C09AB4A9BA475C4440240B98C0AD7D52C0282A1BD6545C4440E4839ECDAA7D52C0FA5E43705C5C4440E4805D4D9E7D52C08AAA5FE97C5C44401B2AC6F99B7D52C01C2444F9825C4440D3122BA3917D52C059F8FA5A975C4440A7ACA6EB897D52C0FD2D01F8A75C444007B5DFDA897D52C04818062CB95C44401EF7ADD6897D52C0399A232BBF5C444036397CD2897D52C0904946CEC25C444001DE02098A7D52C08A58C4B0C35C4440CB68E4F38A7D52C0527B116DC75C4440AD4F39268B7D52C0AB92C83EC85C4440531EDD088B7D52C0EB19C231CB5C4440C5C551B9897D52C070EB6E9EEA5C444077F4BF5C8B7D52C090149161155D44409BE447FC8A7D52C0161406651A5D4440D13FC1C58A7D52C0F792C6681D5D4440E3DEFC86897D52C0836C59BE2E5D44407EFFE6C5897D52C087C1FC15325D444071033E3F8C7D52C0DBA6785C545D44407C6308008E7D52C03FA6B5696C5D4440F42F49658A7D52C054FEB5BC725D4440713788D68A7D52C0ED9C6681765D44403CDC0E0D8B7D52C0B036C64E785D44403B8E1F2A8D7D52C066A3737E8A5D4440D3F88557927D52C07D0569C6A25D44407D022846967D52C0E5D4CE30B55D4440BFF1B567967D52C07C0BEBC6BB5D44409B012EC8967D52C0DE1D19ABCD5D44400AF31E679A7D52C0081F4AB4E45D4440D47D00529B7D52C0EBE1CB44115E44403F00A94D9C7D52C068774831405E4440F7393E5A9C7D52C04339D1AE425E44409831056B9C7D52C090A2CEDC435E444003B4AD669D7D52C086CABF96575E44402670EB6E9E7D52C0048E041A6C5E44409C69C2F6937D52C03259DC7F645E4440DDED7A698A7D52C047C8409E5D5E44407842AF3F897D52C0EEB089CC5C5E4440B053AC1A847D52C0859675FF585E444033FCA71B287D52C04D4A41B7975E444042942F68217D52C03F00A94D9C5E44404885B185207D52C0E5B4A7E49C5E4440751C3F541A7D52C0E318C91EA15E4440C26856B60F7D52C03A94A12AA65E4440FA7953910A7D52C093DFA293A55E444057923CD7F77C52C0C63368E89F5E444003CE52B29C7C52C06C239EEC665E44409AB33EE5987C52C020EEEA55645E4440DFC0E446917C52C0CF6394675E5E4440A70183A44F7C52C0B60E0EF6265E44400E0F61FC347C52C0CE88D2DEE05D4440E1404816307C52C01FD95C35CF5D444091B6F1272A7C52C0A7069ACFB95D444014C95702297C52C0CC785BE9B55D4440807F4A95287C52C0567C43E1B35D4440CE3637A6277C52C047AD307DAF5D4440DAFE9595267C52C07D569929AD5D4440FB90B75CFD7B52C02159C0046E5D4440876EF607CA7B52C078B130444E5D4440438CD7BCAA7B52C0321CCF67405D44401DC9E53FA47B52C0938C9C853D5D4440BBED42739D7B52C0111615713A5D444026FF93BF7B7B52C02BBD361B2B5D444039ECBE63787B52C091B6F1272A5D4440F2599E07777B52C0D40D1478275D4440A3005130637B52C01DFF0582005D4440A3AF20CD587B52C08AC6DADFD95C4440EB8F300C587B52C050FC1873D75C444003ECA353577B52C0E6ADBA0ED55C444003AF963B337B52C04694F6065F5C4440D13AAA9A207B52C0F0A485CB2A5C4440486B0C3A217B52C0B9DE3653215C4440E814E467237B52C065C57075005C44404F73F222137B52C08EC70C54C65B4440020D36751E7B52C0367689EAAD5B4440669E5C53207B52C0EA7420EBA95B4440A92C0ABB287B52C0D6FF39CC975B4440C2BCC799267B52C0E9B5D958895B4440B3075A81217B52C04276DEC6665B44405DDA70581A7B52C0535C55F65D5B4440C70BE9F0107B52C03526C45C525B444093C7D3F2037B52C08B338639415B44407E8978EBFC7A52C0FC1BB4571F5B4440D4B32094F77A52C0D061BEBC005B444016BD5301F77A52C09C887E6DFD5A4440887E6DFDF47A52C07B82C476F75A4440ECA4BE2CED7A52C0AE0AD462F05A4440846055BDFC7A52C0EF3A1BF2CF5A4440C1E09A3BFA7A52C072FC5069C45A444068C9E369F97A52C0D95DA0A4C05A4440A94D9CDCEF7A52C050711C78B55A4440321AF9BCE27A52C0FD2D01F8A75A44400F0D8B51D77A52C0F566D47C955A4440A5F27684D37A52C0EB54F99E915A4440C843DFDDCA7A52C02BBF0CC6885A44402A36E675C47A52C0DB68006F815A44405C70067FBF7A52C03D4162BB7B5A44405DA45016BE7A52C05C8E57207A5A44408D25AC8DB17A52C0681F2BF86D5A44404C4D8237A47A52C063450DA6615A4440419C8713987A52C0185B0872505A4440B6476FB88F7A52C058C51B99475A4440B8C9A8328C7A52C0BF266BD4435A4440FA9B5088807A52C0D9CD8C7E345A4440A70A4625757A52C0AA605452275A4440B28174B1697A52C0DC63E943175A4440888384285F7A52C04240BE840A5A44405DA27A6B607A52C085CB2A6C065A4440764F1E166A7A52C0D175E107E759444011397D3D5F7A52C0F0D93A38D85944404C3448C1537A52C05DA79196CA594440419DF2E8467A52C0DC476E4DBA594440088F368E587A52C048A7AE7C96594440A84F72874D7A52C0F42F49658A594440BBEB6CC83F7A52C092E9D0E979594440AEB8382A377A52C0329067976F594440B5C01E13297A52C03A00E2AE5E5944408235CEA6237A52C026A8E15B58594440682096CD1C7A52C0BF29AC545059444019E42EC2147A52C0813E912749594440B0FD648C0F7A52C04910AE80425944403A014D840D7A52C062A06B5F405944405F0B7A6F0C7A52C0B62E35423F594440959A3DD00A7A52C06308008E3D594440A86DC328087A52C09BE5B2D1395944402DE8BD31047A52C00F290648345944404B1B0E4B037A52C021C84109335944406A82A8FB007A52C004E3E0D2315944401E335019FF7952C0996038D730594440BF44BC75FE7952C0A051BAF42F594440EFFCA204FD7952C0FAD005F52D59444074779D0DF97952C03E90BC73285944407B681F2BF87952C021AB5B3D275944406917D34CF77952C00A83328D265944404084B872F67952C0C3D66CE525594440FFAECF9CF57952C04CA60A4625594440350A4966F57952C03A3B191C255944405323F433F57952C0F94B8BFA2459444077137CD3F47952C0A6F10BAF24594440942C27A1F47952C064027E8D24594440560DC2DCEE7952C05DC0CB0C1B594440755AB741ED7952C0410FB56D18594440D47C957CEC7952C053AEF02E17594440B1DAFCBFEA7952C0EEE87FB9165944402368CC24EA7952C0DC7D8E8F165944405FB4C70BE97952C089230F4416594440D0419770E87952C077B81D1A1659444065A54929E87952C0D7C05609165944409B00C3F2E77952C036C98FF815594440D42B6519E27952C047E350BF0B594440B2F4A10BEA7952C05C01857AFA58444009A4C4AEED7952C066F6798CF258444021037976F97952C06E15C440D75844409DD32CD0EE7952C0A46DFC89CA584440CE8B135FED7952C05247C7D5C85844408BFD65F7E47952C009168733BF5844401C40BFEFDF7952C0CBF6216FB9584440B33F506EDB7952C0747B4963B4584440C8940F41D57952C0B96E4A79AD584440FF06EDD5C77952C0D349B6BA9C58444093331477BC7952C0B77BB94F8E5844400C0055DCB87952C03605323B8B584440F068E388B57952C0C6F99B50885844401E34BBEEAD7952C0179B560A8158444085B2F0F5B57952C0BCADF4DA6C584440BAD91F28B77952C0ACAA97DF69584440BABC395CAB7952C006B64AB03858444014EB54F99E7952C01188D7F50B584440A98592C9A97952C0691A14CD0358444093FDF334607952C06C205D6C5A574440170D198F527952C01A8524B37A57444005854199467952C0AD6C1FF2965744409F3A56293D7952C02C98F8A3A85744401230BABC397952C0B2632310AF574440DD2230D6377952C0691B7FA2B257444061FBC9181F7952C097A608707A5744403140A209147952C05017299485574440567E198C117952C02BD9B111885744407BBC900E0F7952C0D7169E978A5744407FDAA84E077952C002637D039357444083F8C08EFF7852C0FE2AC0779B57444087307E1AF77852C0E1968FA4A4574440B515FBCBEE7852C0E449D235935744407F69519FE47852C065A9F57EA3574440EACE13CFD97852C0B6847CD0B35744402B8716D9CE7852C0CB7EDDE9CE5744408F8D40BCAE7852C070D1C952EB574440AF08FEB7927852C0EF1989D0085844403FFD67CD8F7852C0719010E50B5844401C2785798F7852C0764D486B0C584440F697DD93877852C0ACAB02B51858444037363B527D7852C0093543AA28584440C3D50110777852C09355116E32584440EEE714E4677852C03387A4164A584440717500C45D7852C07EA5F3E1595844405791D101497852C09D7DE5417A5844401AC1C6F5EF7752C0B9162D40DB5844400F7C0C569C7752C03EE8D9ACFA58444005508C2C997752C09259BDC3ED584440AC38D55A987752C0D1217024D0584440533BC3D4967752C04B5645B8C9584440E7FF55478E7752C05DC2A1B7785844402FFA0AD28C7752C0581CCEFC6A584440DCB930D28B7752C021567F8461584440FB20CB82897752C062D7F6764B58444079909E22877752C0D89942E7355844408C63247B847752C0B58993FB1D584440ACE46377817752C0677E350708584440C6C210397D7752C0B2F4A10BEA57444074B680D07A7752C0909DB7B1D9574440DB317557767752C0077767EDB65744409A7631CD747752C02D7B12D89C5744400D6C9560717752C054FEB5BC72574440FC34EECD6F7752C0A3E6ABE4635744409E7AA4C16D7752C0D1949D7E50574440FE9C82FC6C7752C0E046CA16495744401E4FCB0F5C7752C09B53C90050574440D503E621537752C0E063B0E25457444037DC476E4D7752C032569BFF5757444070ED4449487752C0836C59BE2E57444066F50EB7437752C054C554FA0957444032022A1C417752C0713C9F01F55644404487C091407752C01F7EFE7BF05644406E4E2503407752C05D4C33DDEB56444088F546AD307752C03ECBF3E0EE5644401F0F7D772B7752C04835ECF7C4564440A33B889D297752C026AAB706B656444087A4164A267752C0938E72309B5644403B6F63B3237752C050FD834886564440D7F7E120217752C00D6C956071564440132A38BC207752C07A8A1C226E564440315D88D51F7752C07E8E8F1667564440D4F02DAC1B7752C0ADA415DF505644408D4468041B7752C0952BBCCB45564440B88D06F0167752C0BB46CB811E564440A435069D107752C0C8E88024EC554440C9703C9F017752C0F01307D0EF55444083DE1B43007752C0855D143DF05544404EB4AB90F27652C0A69718CBF45544401ABE8575E37652C0C214E5D2F8554440293C6876DD7652C0807D74EACA5544403FABCC94D67652C0F58079C8945544405AD76839D07652C0B41D537765554440849ECDAACF7652C0272D5C56615544405DA79196CA7652C0D87F9D9B36554440331477BCC97652C06A10E6762F554440B41F2922C37652C07B82C476F75444406F2C280CCA7652C030815B77F35444405164ADA1D47652C0BC202235ED544440685BCD3AE37652C0F4311F10E8544440D6E429ABE97652C04203B16CE65444408B4E965AEF7652C0A23F34F3E454444080BA8102EF7652C0C77DAB75E2544440B515FBCBEE7652C0B64604E3E05444407C992842EA7652C02DEC6987BF544440F9BA0CFFE97652C028637C98BD544440363B527DE77652C0001B1021AE544440A359D93EE47652C0378AAC359454444027BA2EFCE07652C05C8E57207A5444403A765089EB7652C0DB17D00B7754444064744012F67652C059A148F77354444027C0B0FCF97652C054185B0872544440D1C952EBFD7652C0200BD1217054444092AD2EA7047752C0E083D72E6D544440F488D1730B7752C0CF807A336A544440A6B73F170D7752C0357A3540695444406F287CB60E7752C0CAF78C4468544440B3D0CE69167752C0A9BD88B663544440F678211D1E7752C0888384285F544440834F73F2227752C0E3361AC05B544440C2F693313E7752C0C05AB56B42544440F834272F327752C06684B70721544440C4758C2B2E7752C03D0801F9125444408D959867257752C00E4A9869FB53444022C2BF081A7752C0247F30F0DC534440EF1CCA50157752C03599F1B6D2534440C0B2D2A4147752C06551D845D15344409048DBF8137752C09509BFD4CF53444067B5C01E137752C01F0DA7CCCD5344403E22A644127752C0D9942BBCCB534440A71FD4450A7752C029B16B7BBB534440C0AF9124087752C0E95DBC1FB75344400856D5CBEF7652C018062CB98A534440F71BEDB8E17652C098A0866F615344406403E962D37652C03197546D375344404A22FB20CB7652C0765089EB185344402A1900AAB87652C0BE0F070951524440E386DF4DB77652C01F63EE5A425244400F7D772B4B7652C005A568E55E524440FB3F87F9F27552C07D224F92AE5144405793A7ACA67552C0D7C0560916514440BEDA519CA37552C0A44FABE80F514440745B22179C7552C0E2CCAFE600514440DCD6169E977552C00B43E4F4F5504440A93121E6927552C05E807D74EA504440D13FC1C58A7552C056ED9A90D6504440096B63EC847552C0AB92C83EC8504440AE80423D7D7552C04127840EBA50444040F7E5CC767552C0D0967329AE504440632827DA557552C0DEE7F86871504440C8ED974F567552C05646239F57504440211FF46C567552C03674B33F5050444015713AC9567552C059DC7F643A5044404AB20E47577552C028B682A62550444037AB3E575B7552C0F7AE415F7A4F444045460724617552C0A94885B1854E4440F62686E4647552C02D978DCEF94D444036AE7FD7677552C018AE0E80B84D4440B9E00CFE7E7552C0B01F6283854D4440446B459BE37552C0C5E23785954C444012A27C410B7652C03C1405FA444C4440588B4F01307652C0B058C345EE4B4440A6457D923B7652C07C28D192C74B44402C9CA4F9637652C0A2957B81594B4440A81ABD1AA07652C0300C5872154B4440FBC8AD49B77652C035272F32014B44404127840EBA7652C02AE109BDFE4A44401DCBBBEA017752C02172FA7ABE4A4440130CE71A667752C0C6A2E9EC644A44400A4B3CA06C7752C0BEF8A23D5E4A4440A5D93C0E837752C06473D53C474A4440FDBCA948857752C06B98A1F1444A4440F0C000C2877752C0F0DE5163424A4440D8817346947752C04450357A354A4440BF28417FA17752C08099EFE0274A44400A2DEBFEB17752C0BCAE5FB01B4A44407FF8F9EFC17752C08C0DDDEC0F4A444053C90050C57752C0B14B546F0D4A44402E71E481C87752C0BF61A2410A4A44401EFB592C457852C09F39EB538E494440056D72F8A47852C06D8E739B7049444036AD1402B97852C0D68BA19C68494440F59F353FFE7852C0BAA0BE654E494440289A07B0C87952C0C58F31772D4944406133C005D97952C0D862B7CF2A494440E1783E03EA7952C04DDA54DD2349444046B3B27DC87A52C06A11514CDE4844402F185C73477B52C0FCE25295B6484440A26131EA5A7B52C06A696E85B04844408499B67F657B52C036902E36AD4844404F8F6D19707B52C0C1C760C5A94844402E1D739EB17B52C02BDCF29194484440F9122A38BC7B52C0B5132521914844401021AE9CBD7B52C080D250A39048444081CEA44DD57B52C0431B800D88484440BBB88D06F07B52C076A38FF980484440B5A50EF27A7C52C07780272D5C484440F7C77BD5CA7C52C08AE5965643484440614D6551D87C52C05CFDD8243F484440E84CDA54DD7C52C03F1878EE3D4844409947FE60E07C52C05774EB353D484440AF0793E2E37C52C0FF5C34643C48444065A54929E87C52C0C45E28603B484440EFAB72A1F27C52C01F12BEF737484440D07D39B35D7D52C0075F984C1548444025AB22DC647D52C03D0801F912484440C39E76F86B7D52C0861C5BCF104844401211FE45D07F52C0F2CEA10C55474440B804E09F528252C0785C548B884644407615527E528252C0DB85E63A8D464440E2E5E95C518252C0BB270F0BB546444089B48D3F518252C0A7203F1BB94644400858AB764D8252C0F294D5743D474440CD565EF23F8252C07D7555A0164944401B28F04E3E8252C0E9F010C64F494440AAB4C5353E8252C0BDC117265349444032CB9E04368252C0F6285C8FC24944405111A7936C8252C09FE238F06A4B44402252D32EA68252C0BC02D193324D44404C50C3B7B08252C0F9F36DC1524D4440D26F5F07CE8252C0E34F5436AC4D4440A774B0FECF8252C0C266800BB24D4440A626C11BD28252C007431D56B84D4440EDD286C3D28252C0DC476E4DBA4D44402638F581E48252C04A5F0839EF4D444074779D0DF98252C0E3C281902C4E4440890629780A8352C016DC0F78604E44408315A75A0B8352C0E5EFDE51634E4440EA793716148352C036E84B6F7F4E44404703780B248352C0C24CDBBFB24E44403046240A2D8352C09BE09BA6CF4E4440A4C00298328352C02D776682E14E444055F833BC598352C09F91088D604F4440B3B27DC85B8352C08922A46E674F444075E789E76C8352C066118AADA04F44400D52F014728352C051F355F2B14F4440C5ABAC6D8A8352C0D4D00660035044403D7E6FD39F8352C05C1ABFF04A5044405051F52B9D8352C042B28009DC504440 0106000020110F0000010000000103000000010000002C020000677EB113B6725FC1491C95A2F6E95241CCC6EE50B0725FC1B15ECA5FC7EA5241CDBC7289AF725FC11126FF9CE3EA52416265786CAE725FC16244221A0CEB5241C49EF8C9A1725FC17D7DC8CFD5EC524157A2F6B382725FC19360CF3012ED52416E3EA19D80725FC1D5E22C1B17ED5241AF1C1D227B725FC15B70ACB222ED52418CA8DFA17A725FC11C7D196523ED5241FBE623CC79725FC144499B9124ED52416E9E570863725FC19A17431C54ED524121B19BEF5B725FC142C5CDC364ED5241D0D2190256725FC1493B798572ED5241B618780D50725FC12DE88D5080ED5241193E00DC41725FC175F71F2FA1ED5241473FA8B133725FC13FF5CE0DC2ED5241DBAB423328725FC19AF709B0DCED524140C290D618725FC1975D1C83FEED524189735ED90F725FC15601773612EE5241AEDD1F920F725FC19FF11FD612EE524189416F3F06725FC101F060AF22EE52419BBF221EFC715FC1459828E433EE5241CAE83DC6F6715FC1AD8E2D983FEE5241B4D97A7DE4715FC1BF258C3767EE52417E474089D0715FC1C8CF535A93EE5241F612EF08C1715FC196EF015DB5EE52412C42E16391715FC1252D17DB1DEF5241249D56B66D715FC1AC23391E6CEF52415FFEBA5F4D715FC1B5C8ED01B3EF5241CFCEA48E38715FC15E74FB9DE0EF52418DE088E57A705FC13B6C51B880F15241EB5574A478705FC1815644A385F152410006171D78705FC1D14484C686F152414612DD2651705FC1A05C9678DCF152413E618D73AE6E5FC160A77441D2F0524167BC1401AD6E5FC1A21C9856D1F0524192F92738A96E5FC17D4B324DD5F0524151EE7A7DA56E5FC1E0E8673AD9F05241E1196985896E5FC11C97C1A1E9F052416877C372716E5FC1374575D5F7F05241DEE351224F6E5FC12F8B5125FAF05241AE565846416E5FC1BAAE462A28F15241ADF30FADFD6D5FC10D478DCA5CF1524118191B30F56D5FC14E4A5E0564F15241451F8169E76D5FC1D447C8C36FF152414E70805DCE6D5FC1571FBC1F85F1524126E8C799C66D5FC1A9E6378E8AF15241D8199926976D5FC147E9B7A8ABF1524114ADEC69806D5FC12B1DE58CBBF152417336D0B77F6D5FC1144C68D3BDF152419D73E3EE7B6D5FC1B6274228CAF15241569026527B6D5FC12B96BF09CBF15241195D8979746D5FC1F677BFB0D4F15241A032BA29716D5FC100C3F859D9F152414468AD16676D5FC1B52D882DE0F15241F5846DC5606D5FC14019C142E3F15241AD9734615F6D5FC1599DDFEBE3F152414B0910FB596D5FC1AECB5990E6F15241FA2A8E0D546D5FC129637C61EAF1524132A0EA45356D5FC137037E3CFEF15241C748F028346D5FC1A89EC15FFFF1524108CD09411C6D5FC1F2D174ED17F25241F9F9340E1A6D5FC121120EA719F25241DBEFAC74026D5FC10B30194C2CF25241BA677765006D5FC157BBE8F22DF2524117F15AB3FF6C5FC1B72463032FF25241A26CACABEF6C5FC121BC65AD47F25241FFF58FF9EE6C5FC1F708711249F252416D02E589E46C5FC1C9142BA05DF25241146AC710E46C5FC1EB929C0E5FF252418F4EAF37DC6C5FC144F4C85A77F252415B2511DBDB6C5FC153481A2078F25241B19A79E5D36C5FC11D2872AB89F2524169B7BC48D36C5FC1FA9515368BF252413075E544CB6C5FC1370A4B5AA0F25241A5867BEDC66C5FC1C1FEECCDABF252414EDA65E5C46C5FC113C2C829B1F252417FEACA9ABD6C5FC1EC97DC6EC4F252417408BC3CBA6C5FC12DB99B00C7F25241884A04BAA56C5FC1F42246B6D6F252410C342DF9A36C5FC16AD67369E3F25241E7C4ADDCA36C5FC1DA65C72EE4F252416F86E6FD9E6C5FC1EDB7908006F3524127A329619E6C5FC153899A4308F35241AD41AD13916C5FC1A645F1E02EF352412F35521A906C5FC167BB2DC030F35241F4FCF6DD886C5FC178C95DBC3EF35241AA1EF8A4886C5FC1667482653FF352412C129DAB876C5FC106D1764242F35241469591A2836C5FC1B8CDBEB34AF35241D24790987D6C5FC1FC21E34A57F3524179A038F47B6C5FC199947D105CF352419FDDC876726C5FC1134B654178F35241D7EDB0E0706C5FC18E524B097CF3524158AF664D666C5FC17DD8532E95F35241DC988F8C646C5FC1E5EFCF4A99F35241DF52A863596C5FC1B118BE76AFF352411672CAF8586C5FC1EDE90E9AB0F352411354D3ED506C5FC18CE184B5C5F352419DFDEBB6196C5FC17D35EDA328F452410E3C30E1186C5FC1BE22D61B2AF452415CF23EFC156C5FC1B4EFD19437F45241BF49B664116C5FC18D66DBAC3DF4524109BA5AA2FD6B5FC18601BFC657F45241E636E3F6FB6B5FC1605439F159F45241118DAC20FA6B5FC11BB58C435BF452410533C7FFE16B5FC1E96F64976CF45241E8BFA2CEB66B5FC163CCB8EF62F4524146D66DBDA16B5FC11C7E4D3E6EF45241896E0219916B5FC1AEB7E5547DF45241447C0B518F6B5FC138184E2F7DF4524139953E8F8B6B5FC1440A53D17CF45241189AF020756B5FC1837FA2B97AF45241D78E4366716B5FC1DF5E0D657AF45241C7C02C976F6B5FC1D49198757BF45241244A10E56E6B5FC1E183F9DC7BF4524105C2DAD56C6B5FC1A4DB66597BF45241C216E4854B6B5FC11B69D71673F452418898A120396B5FC10A9F7C896EF45241536587FC376B5FC11C7E4D3E6EF4524124E209E82A6B5FC15DFE74166FF452416298129A1C6B5FC1076802F86FF45241F513E746126B5FC1C97A2CA170F45241C177308BFD6A5FC13FC41AEA71F45241525D376AD66A5FC1C80E049173F4524124F946FBA06A5FC1AFAE64507FF452413A9033819E6A5FC1674D5DDD7FF45241D189B5A37E6A5FC15E34E61C81F45241E5FDECBA736A5FC11436478481F4524151BA5BA6576A5FC13BAAA2FF8DF452415D60FFA2506A5FC18AE424C393F4524150886C0C4E6A5FC1CCD6D6DA95F45241191B13BCE1695FC13B111D58CBF45241AC69B632CE695FC12CB84909D5F45241C2FBE454CB695FC1474F313DD7F452412D2B6C9FC3695FC166DABC2FDDF452417DE17ABAC0695FC1B7ECA463DFF45241136C0C47BD695FC1A52E5508E2F45241D5AC1D689A695FC19566A4DEFCF4524123632C8397695FC16760F41BFFF4524170EC09688B695FC1940C326F08F5524137D33BD15B695FC14472DAB3CCF45241DC3A1E585B695FC171B57A1DCCF45241E8E57FB854695FC1BB6D0DC8C3F45241152393EF50695FC150F84402BFF45241C503E83C40695FC1091C7056BBF45241E0B8CBCD45695FC1D91B21B5D8F45241F96DAF5E4B695FC12B7F0E1B0CF55241F559341B44695FC19941CB5535F55241C4DB746A37695FC1D31E41CF7DF552417FE4BF3E35695FC13FA724388AF5524107A13AFC2F695FC19CCA316390F552411E15721325695FC129957F339DF552415816205222695FC1EBDDDB9DC6F55241EBA02E2A19695FC1786FF36BE5F55241EB91F4FE17695FC1E936E08FEAF552419E9ABC1E10695FC115B60BDB0CF65241392090470C695FC1A5CF47991DF652415F1739A1F7685FC1035B35D044F652411411C795EE685FC135995AC651F6524146212C4BE7685FC17EBF85595CF65241CCF65CFBE3685FC19891E9F960F652412C3A5920D8685FC1ED3E186D71F652417CE6EB73D4685FC128D57EB477F65241BAA670EDC6685FC1A911EFDF8EF6524183E704C3A9685FC1F14268BDC0F652419179B030A1685FC1CC96896DCFF652412DF0492E9C685FC19D5E6CF2D7F65241D4DF55F286685FC1FB914656FCF6524149F6A9FE82685FC1F81E602103F75241A139236F71685FC1AAE68BF819F75241A8DA855364685FC10678B0962CF75241846B063764685FC1E62515DE3FF75241B98FE62F64685FC1CDC86D9646F75241F0B3C62864685FC1517BEBA94AF7524127DD648564685FC11904BEA74BF7524125F15C1466685FC1361E70D74FF75241923EDB6966685FC1DA8D75C250F75241103CFC3766685FC1A54F891054F75241398D07FE63685FC13A9F074877F75241C86779C666685FC17D457434A7F75241B7A89C2266685FC1CB41D6D2ACF75241817FFEC565685FC1DC98BF33B0F75241CD3F89A863685FC1393E03A1C3F752419620671364685FC19DFEF15FC7F7524133C4314768685FC16B47CAC9EDF7524140A182416B685FC1C10F7FBE08F852416EC0212265685FC13DF5FFD40FF85241A4EE7DE265685FC1EFE42E0E14F85241DC171C3F66685FC1DB82451316F8524130D829D669685FC1E8DB2F752AF852416A247DA172685FC16A83E0AB45F85241ED305B4F79685FC1AB08B54F5AF85241370F5A8879685FC115877CB161F8524148CE362C7A685FC1520DF2BE75F85241E18AB75280685FC1FF3792908FF85241DE9EAFE181685FC15A058783C1F852410122278D83685FC14503B91BF6F852415BB586A283685FC1CB9D4FE6F8F852417F2406BF83685FC12FECCC38FAF85241A2A77D6A85685FC1B3B61F5510F952411EBE542B87685FC1548F295327F952412C23CF6275685FC10DA8BFCD1EF95241399C412965685FC14C21331717F9524173A76B2F63685FC1C781222C16F95241CC1258725A685FC19F456FE911F952412663922EBE675FC140E93A3658F95241DE3EACCCB2675FC16066A15A5DF9524174E2F34BB1675FC113D4E1035EF95241875BE9C6A6675FC18F93DAC062F95241850645BE94675FC1688DE66868F95241DD7131018C675FC17DF0A5BF67F952410723F3316C675FC19E6CF26461F952413918A660D1665FC1D1278B8521F95241FCE9C6EBCA665FC1C44ABC9E1EF95241B8B1E8FABD665FC19EB5DCF817F95241F5645F7E4E665FC13B6BDCD3D9F85241EE8DE53621665FC1F56F87448BF8524110DAAFE418665FC1D8B1D67877F85241B60FA3D10E665FC137645F7D5FF85241B8F6ECDE0C665FC1CB638C1E5BF852414DA4B0250C665FC1D3E2A1D758F8524187B4988F0A665FC10F90C8EB53F8524177E681C008665FC17AA9405051F852411DD265BBC2655FC18F422C8B0AF852411D06818A6B655FC1A0361FF5E6F75241C637CF6236655FC15383546CD7F75241B83C875D2B655FC1BF9B0231D4F75241BBF1E1D01F655FC1048548BDD0F75241EEEEE491E6645FC1C552788DBFF75241E7EE61DDE0645FC16E41D57CBEF75241B3AC0D8EDE645FC168D9ED79BBF7524173FC58DABC645FC1A1C8EDCF8FF752416FAC7235AB645FC10B37238464F752414E2EB9EDA9645FC16D2678CC61F75241BD673FB4A8645FC14EEA331E5FF75241400C17656B645FC103E60DD9DAF6524120E497C04B645FC12AF8FF50A0F65241F98352CF4C645FC17E1D5BB495F6524173B3DF8250645FC1A74718E070F652416E2C4CE034645FC14211BCBC2FF652413A6C4A1B48645FC1CCC3F76114F65241C54B7A474B645FC104A736E70FF65241BCB9518E59645FC1EA2C3F99FBF552419F1D24F055645FC115531068EBF55241541C70484D645FC13DBCB1ABC4F552410EEE0D1F41645FC12BBA47CBBAF552412D219F2531645FC11EBEF0CBADF55241444FEF131B645FC1973F28989AF5524148FF8B230F645FC1B1B37EA174F55241341DFA1006645FC1B126DF5652F55241B6109F1705645FC1F2AD95A14EF55241177750AB01645FC131F0FDF247F5524168F1F364F4635FC1F80FD80440F55241A38D2DD50E645FC15C5E15AC1BF55241753223930A645FC13FECC1BF0EF552412E45EA2E09645FC13F8AEA860AF552413BBE5CF5F8635FC15463FF01FEF45241070EAEAAE2635FC1281ACDE1EEF4524189A7F044CF635FC13BF7102DDAF452414A7911D0C8635FC1D68D0DD8D5F452418B2A5C1EBA635FC1EDCA7CEECBF45241687AB33CAF635FC17E7A41B5C3F452416557FECDA6635FC18A5EF251BDF45241D7814A69A4635FC1AAF16D85BBF45241ECB9161F8F635FC166AEAAE6ADF4524183E0C97778635FC1D2B0EE18A0F4524174B392D863635FC1752CE5D28CF45241D7D81AA755635FC141D067E982F45241F44259AB4F635FC18F41A0B07EF45241ADFBBDDA3B635FC15FAE57826DF45241C04C408328635FC127BC5AC05EF45241AB2E430F15635FC1C4FB5FC34CF4524196243E2A03635FC15DF59B7B3EF452411040D34E05635FC192BFE1E439F4524185C93FBA15635FC1EB27D8B916F45241846FDD4D03635FC124111C2206F45241DE99A0CBEF625FC1B82DB7DCF6F3524107820FFAD9625FC1A339269EE4F35241062717F3F7625FC13004C97EBCF352415E5B5638E5625FC142412EF3AEF35241530BEDDECD625FC1435B5E7C9CF352412674773BBF625FC1A28341EC90F352419B1C714CA7625FC16AF656FB7DF352419AEF3F169E625FC1F14EB4E576F3524142113B7492625FC199BC6DE76DF35241938620CA84625FC1BFB87BDD65F35241C6828DF07B625FC1E268E5695EF35241600D1F7D78625FC199F517075CF352418963E8A676625FC188DC98C75AF35241C56496E573625FC1C2ACF4DE58F35241844F6D636F625FC11C74B4AF54F352416B8B4FA768625FC19037A07B4EF352413753771F67625FC169258B164DF352417545EB3263625FC17EBBDBBA4BF35241208A9BFF5F625FC16F98F3A04AF352417E0EC1E95E625FC1CA4C3CA349F352415D81CD765C625FC1C694066647F3524145BDAFBA55625FC106265A3B41F35241DA60F73954625FC19A2AABDF3FF3524138E05EC052625FC147B6551A3FF35241603BE64D51625FC193DD655E3EF3524151728DE24F625FC1EE9FDBAB3DF352411A49EF854F625FC137ABDF7C3DF35241AEFB70304F625FC1034E49573DF352419C3C948C4E625FC1D4FCB6023DF352412EEF15374E625FC115A020DD3CF35241AFBA476B44625FC155E70C3832F35241B59715B141625FC1439E4E482FF35241C93D3C6240625FC1AFB63AE32DF35241843C0B6F3D625FC118A8AC5F2DF35241767870673C625FC1E6C7B0302DF35241D3F2198A3A625FC1519B1EDC2CF35241C22E7F8239625FC1C5BB22AD2CF352416996610939625FC19C95579A2CF35241326DC3AC38625FC1816F8C872CF35241C5ED55BD2E625FC1B9F9C21321F35241BE51B13C3C625FC1AF35B4BB0DF3524120EA516A42625FC1F596B7D904F35241E933CC6C56625FC149246146E6F252415227E85544625FC1C5CC8B08D8F25241339AF4E241625FC1164DEE1FD6F252413C2C1D9C33625FC1A9F86155CBF25241159AE8102B625FC1A8429EDFC4F252411081AF6923625FC13DEE9338BFF25241ECD5C4EB18625FC13738F379B7F2524198B1D82002625FC12F3E72B8A4F2524171DE7AD0EE615FC1DFC51B9294F25241A2FD19B1E8615FC1DAFCDD1E91F252412DB5D60AE3615FC1D89C9BDA8DF25241B3581821D6615FC197A1A9B485F25241990713C4E3615FC18EB8AB186FF25241F2B328CCE5615FC1F38DA1C16BF252415F8E8EC2D1615FC182A157AA34F25241888079B8BC615FC1F0F52C9102F25241F6229C16CF615FC1EB05AB6DF9F152413B72B71A52615FC15E4DB8B93BF15241E6480DEC3A615FC15F58BBDF5FF15241788D349B26615FC1185F47827FF152410509869316615FC11BF8AA5393F15241D99983C210615FC1E95D21859AF15241B90214880D615FC1931836859EF152419A9E2982E3605FC1196092945FF15241621B29B9D0605FC1D5A0E10E6CF15241FC9B3E7ECC605FC1F2DDE7D86EF15241961C5443C8605FC1FB7353AC71F152410A067719BB605FC19755DD1A7BF152417DEF99EFAD605FC1AFC1CE9284F152412AEE62939F605FC1284274D98EF15241E9A64A7791605FC14F393C537BF152411C80022F80605FC17F6A9F908DF15241ADDDDFD06D605FC1CAB470D79FF152412A819E325B605FC1BD6F5C31BEF1524190C5B3A624605FC10CA33203DEF1524156ACE50FF55F5FC1071E320BFFF1524183DABE1BF05F5FC1E765627E02F25241CEAE418DEF5F5FC136E7B61403F252412FDE4523E25F5FC1232316D810F25241756C5EB7D05F5FC1F245CDB722F252416576D415C65F5FC11024BEA72DF2524101759750AC5F5FC171478B2748F2524190E1AE1D9B5F5FC1CB1162D859F25241501D02DB775F5FC1B677AA1B7EF252410EF7A299E05E5FC1D90EC1C0EAF25241CEFD748E525E5FC19E7915F40DF35241334B702F4D5E5FC1F6CECF7DFFF25241EC5D37CB4B5E5FC10B57574FDEF25241DF85A434495E5FC15887A21DD7F25241D65DAEAD3A5E5FC1D4920C627CF25241ECF49A33385E5FC19DA818016DF2524102960381365E5FC18F9AA56562F2524140887794325E5FC17E002CB249F252415A0B6C8B2E5E5FC199A8B28B31F2524118F642092A5E5FC1C329CBC016F2524191FD5CEA245E5FC15B75B329FEF152411EA121B51D5E5FC1F717C694DCF15241A66CD69D195E5FC13AD57144CAF15241320BDD04125E5FC1DC5FFD53A3F152415C572A670F5E5FC1C666671D86F1524130E82796095E5FC106EBBFF456F15241C77C35EA065E5FC1D99CD75446F15241972BA76F035E5FC114F4149B30F15241ACD1CD20025E5FC1FDF2DA4F28F152413DF33F61E55D5FC189D5280E30F15241220C6D36D65D5FC11E50FD8535F15241C6461E87CC5D5FC1CA0C800239F1524120B20ACAC35D5FC132F47CCE0AF15241F8295206BC5D5FC14D55BFA1E1F0524112A88899B75D5FC1F07B4825CAF0524125536DAEB65D5FC1E464DA14C5F05241712232BCB55D5FC13B193EE8BFF05241348BB6AF9B5D5FC198F28648C3F05241698723D6925D5FC14723335994F05241A68313B18F5D5FC136CA729D83F05241303BD00A8A5D5FC17AD7AD8F65F05241139526A5855D5FC10CC24E264EF05241C0CA9C46815D5FC1615BFEBC36F05241E72FA09B805D5FC13170001B33F05241B1F7C7137F5D5FC160C053372BF052412CE62B02785D5FC1B67D595612F05241C18E31E5765D5FC1125C47EF05F0524129C834F76F5D5FC11E895CF0D9EF5241F4622B39655D5FC1DDC7B48AA1EF524135D34CC24B5D5FC14A75C1A6A5EF52410491F872495D5FC13563DE20A6EF524153D4EE2E325D5FC1733E8A3AABEF524114423186185D5FC1CAA5EBBDAFEF52419508A5560E5D5FC1E229FB557CEF5241AC7260A6025D5FC1531FB1B83FEF5241E55517DAF75C5FC1B2DC77BD0AEF52412F25DCE7F65C5FC178D0FC1D06EF5241AEFF4747EE5C5FC1E9890846D6EE5241D35ACFD4EC5C5FC1ED227846CEEE5241455DA89DE15C5FC11C0BED928FEE5241C1AA2C5CED5C5FC17BE112198BEE524130489156FF5C5FC1C56C291784EE5241163D7322185D5FC1E8BD96547EEE5241CBA45B12235D5FC12FF7FA7E7CEE52415D8E8ABA2C5D5FC1783E55D87AEE5241DF86ED242C5D5FC1E47A870E78EE5241A75D4FC82B5D5FC1FCC9B44B76EE5241128DD612245D5FC165F193F250EE52417FD0D8A0235D5FC1573F73C84EEE52415175CE5E1F5D5FC14A3372773DEE5241CA772ADC195D5FC1B5507A7220EE5241779E6652145D5FC1B19AA33E03EE524158848B3E265D5FC102DED1CBFFED52416C8E9023385D5FC1D3720059FCED52412ABF4ECA3E5D5FC12FA8E42EFAED5241AECB2C78455D5FC15D412D0EF8ED524188A752E8505D5FC1A898EDC0F4ED524185F2F7745C5D5FC1A2F8496AF1ED524112CD693D5F5D5FC14D81EE59F0ED5241D5CBBBFE615D5FC13BD02E40EFED5241064F39136F5D5FC13199BF26EAED524137D2B6277C5D5FC16D14510DE5ED5241F2166D5D845D5FC156B5973CE1ED52413FD661A5B25D5FC1AA58F3E0C4ED52417887293F9E5D5FC179C31F7F9FED52410430AC6D975D5FC1A4EE42C28FED5241C4DE178A885D5FC178BDFB6175ED52419F0BBA39755D5FC1F1B8444453ED524166C9E2356D5D5FC1A27546D247ED52413196C8116C5D5FC15079123546ED5241FB62AEED6A5D5FC1D68EDE9744ED524122BE357B695D5FC19628A15142ED52414B19BD08685D5FC15FD0FF0140ED5241F52102745A5D5FC119BB1AD02DED5241D885D4D5565D5FC15D4B1EEF28ED524193BCE67A2D5D5FC1D6AAA03AF7EC5241D1400093155D5FC14CE07D02C9EC52417F081C39FD5C5FC1CB04FEFB99EC524199546332EF5C5FC13A85ABD577EC524152C222D5CF5C5FC17B5F2A1898EB52412080CE85CD5C5FC10AFFC2A987EB5241C02774D8155C5FC18EE6DC9BA7EB524156A68D09805B5FC138099E41E2EA52413471006FFE5A5FC1DB69138B37EA524150E5BA3AF95A5FC121F686AF30EA5241C2D39B74EC5A5FC107ABDCE31FEA52415272A2DBE45A5FC1641E51A413EA52411730CBD7DC5A5FC161EE31C506EA52417B5A110ACF5A5FC18B98D582F0E952410CDBA31AC55A5FC159186C7CE0E95241A533460DB85A5FC11959969BD0E95241F0CB5D1DAD5A5FC1A5C3E74BC3E9524146471A26755A5FC17F78AB4F7FE95241455196ED755A5FC1170FEF7362E95241C453751F765A5FC1FFBBD3335AE952410C3732BC765A5FC17154A5BE41E952419DF8ED91775A5FC145DCAE882AE952416DE3CA787E5A5FC1D9EC0DE16AE852417ECFD852885A5FC1C10B281E59E75241606A58B28E5A5FC14E5C319EBCE65241C4F3BEB4935A5FC16F7F0B8F73E65241B2109707BB5A5FC1AEA846853AE652418657D2EE655B5FC154B32D102EE552417700FC47A95B5FC188941BF9D3E452415DB31EB4E75B5FC18BC001FF72E45241F1D3FA59FB5B5FC102BD96B647E4524103FBDDFA3F5C5FC1E14EBC9CCCE35241D7CF961DA65C5FC15A254A7F80E3524157A4AE7ECD5C5FC127559ED969E3524118BCB632D25C5FC1A071051A67E352415A478A424C5D5FC13A49943D1FE35241C13B8970F65D5FC1814DC917BBE2524164EE1084015E5FC150E3239EB3E25241C1446F9D275E5FC1A79CFDE499E2524196075C662B5E5FC1E5095B5497E2524133AB269A2F5E5FC13E68AD7894E2524155973ADD445E5FC126F7C60886E252413D6EA8525B5E5FC11B36E9D376E2524140FAF958775E5FC143296C3269E252418E55106D925E5FC1499CE50A5CE252415E31B328985E5FC19333FF4159E252418B9BF7959D5E5FC1E0CB1CB455E252418137E357715F5FC17B9F0721CBE152416615881014605FC109BAAFE5A9E152411413BB1936605FC1F24012F5A0E15241A640A5B5AB605FC1314379A583E152417156519303625FC1A3D034D35EE15241984C64521F625FC11EC47BDB5BE152412B9A712E3C625FC181D0131754E15241A5AD5015B6635FC14EF3394F06E15241957BA8BC8D645FC1D02B07E8D9E05241C46C80CCAE645FC1F536F420D3E05241340AE5C6C0645FC14508B36DCFE052416E8369C8D2645FC19B63EE94CBE05241B1CD131342655FC179F6EAE0B3E05241EB46981454655FC1FA262908B0E05241B1402C7256655FC12F367B7BAFE052418BB21FB07E655FC1520449E2A5E05241B7F81814AC655FC15F3283F89DE052411182490C98665FC1B3AF79D474E0524139BC17BF1F675FC10B43AF0F59E05241B24F83A636675FC13076435F54E052411206982A3F675FC10269440453E052412CB6BD5744675FC16AF8F13552E0524147705F4C4A675FC185097D4B51E052414A84DA8F51675FC1731CC32850E052413C1F605863675FC19B626C594CE052418FA9A33619685FC1FC29509725E05241D2D7056025685FC1C2DF77FD22E05241BE72087431685FC1D9B5839220E05241E6B2E182416C5FC1737D66AC4EDF5241B181F79B84705FC116F285136ADE524167A3F86284705FC18BC859506FDE52413566627782705FC1ABCBCFD09BDE5241B563834582705FC16BBD825BA0DE52414111C4D77B705FC1AE87CB4C34DF524134C618E264705FC11842DE4945E15241A7EBA61962705FC1130B692F85E15241F1C4E7EE61705FC1EE7C7EF588E152413080AE0454705FC1C703798805E25241F06D17B1B0705FC13519CF1BE0E35241CE0BA68A12715FC18CD4AABEDDE55241E315AB6F24715FC13EB188BD01E652412B024E3956715FC1CC31F3CF65E652416E083D9059715FC1553658566CE65241C3C84A275D715FC1DA9E1F6073E652412E2045445E715FC117352E9375E65241E5EB0B687C715FC1C0CAFCC6B0E65241EB861A4E9F715FC134320B67F5E65241EB2664E3BC715FC1D6DEB4782FE7524157831C64BE715FC15BB633A932E75241061D7139CD715FC1A0F8971D52E752411C54A754E8715FC1A6FAE1868BE752415BAAF99BF7715FC14061D1DCABE75241A4B5290B01725FC1BB53ECD7BFE752413BC1778743725FC1DE22C4FC4DE852416B12060247725FC12684D9AF55E85241493E121764725FC1D3A3A0BD95E85241808A65E26C725FC13DE24310A9E85241C553533D96725FC1F69F042E04E95241A693DA95BA725FC141591D4354E95241677EB113B6725FC1491C95A2F6E95241 36047 +\. + +CREATE SCHEMA IF NOT EXISTS observatory; +ALTER TABLE obs_b0ef6dd68d5faddbf231fd7f02916b3d00ec43c4 SET SCHEMA observatory; From 69ac0d25f22ea212ad7f452d2e242f2efce29765 Mon Sep 17 00:00:00 2001 From: Stuart Lynn Date: Fri, 22 Apr 2016 16:10:30 -0400 Subject: [PATCH 14/41] Adding tests for new json returning utility functions --- .../expected/40_observatory_utility_test.out | 61 ++++--------------- .../test/sql/40_observatory_utility_test.sql | 25 +++++--- 2 files changed, 29 insertions(+), 57 deletions(-) diff --git a/src/pg/test/expected/40_observatory_utility_test.out b/src/pg/test/expected/40_observatory_utility_test.out index 5fb3a2f..5cc88e7 100644 --- a/src/pg/test/expected/40_observatory_utility_test.out +++ b/src/pg/test/expected/40_observatory_utility_test.out @@ -46,44 +46,15 @@ SELECT (1 row) --- future test: give back nulls when geometry doesn't intersect --- SELECT --- cdb_observatory._OBS_GeomTable( --- CDB_LatLng(0,0), -- should give back null since it's in the ocean? --- '"us.census.tiger".census_tract' --- ); --- OBS_GetColumnData --- should give back: --- colname | tablename | aggregate --- -----------|-----------------|----------- --- geoid | obs_{hex table} | null --- total_pop | obs_{hex table} | sum -SELECT - (unnest(cdb_observatory._OBS_GetColumnData( - '"us.census.tiger".census_tract', - Array['"us.census.tiger".census_tract_geoid', '"us.census.acs".B01001001'], - '2009 - 2013' - ))).* -ORDER BY colname, tablename ASC; - colname | tablename | aggregate ------------+----------------------------------------------+----------- - geoid | obs_11ee8b82c877c073438bc935a91d3dfccef875d1 | - geoid | obs_ab038198aaab3f3cb055758638ee4de28ad70146 | - geoid | obs_d34555209878e8c4b37cf0b2b3d072ff129ec470 | - total_pop | obs_ab038198aaab3f3cb055758638ee4de28ad70146 | sum -(4 rows) +test_get_obs_column_with_geoid_and_census_1 | test_get_obs_column_with_geoid_and_census_2 | test_get_obs_column_with_geoid_and_census_3 +---------------------------------------------+---------------------------------------------+--------------------------------------------- +t | t | t +(1 row) --- should be null-valued -SELECT - (unnest(cdb_observatory._OBS_GetColumnData( - '"us.census.tiger".census_tract', - Array['"us.census.tiger".baloney'], -- entry not in catalog - '2009 - 2013' - ))).* -ORDER BY 1 ASC; - colname | tablename | aggregate ----------+-----------+----------- -(0 rows) +obs_getcolumndatajson_missing_measure +--------------------------------------- +t +(1 row) -- OBS_LookupCensusHuman -- should give back: {"\"us.census.acs\".B19083001"} @@ -127,17 +98,11 @@ SELECT SELECT vals[1] As mandarin_orange (1 row) -SELECT cdb_observatory._OBS_GetRelatedColumn( - Array[ - '"es.ine".pop_0_4', - '"us.census.acs".B01001001', - '"us.census.acs".B01001002' - ], - 'denominator' - ); - _obs_getrelatedcolumn -------------------------------------------------------------- - {"\"es.ine\".total_pop",NULL,"\"us.census.acs\".B01001001"} +-- should give back a normalized name + SELECT cdb_observatory._OBS_NormalizeMeasureName('test 343 %% 2 qqq }}{{}}'); +_obs_normalizemeasurename +--------------------------- +test_343_2_qqq (1 row) \i test/sql/drop_fixtures.sql diff --git a/src/pg/test/sql/40_observatory_utility_test.sql b/src/pg/test/sql/40_observatory_utility_test.sql index 37f0648..5fe5c40 100644 --- a/src/pg/test/sql/40_observatory_utility_test.sql +++ b/src/pg/test/sql/40_observatory_utility_test.sql @@ -32,22 +32,29 @@ SELECT -- -----------|-----------------|----------- -- geoid | obs_{hex table} | null -- total_pop | obs_{hex table} | sum +WITH result as ( SELECT - (unnest(cdb_observatory._OBS_GetColumnData( + array_agg(a) expected from cdb_observatory._OBS_GetColumnData( '"us.census.tiger".census_tract', Array['"us.census.tiger".census_tract_geoid', '"us.census.acs".B01001001'], - '2009 - 2013' - ))).* -ORDER BY colname, tablename ASC; + '2009 - 2013') a +) +select (expected)[1]::text = '{"colname":"geoid","tablename":"obs_d34555209878e8c4b37cf0b2b3d072ff129ec470","aggregate":null,"name":"US Census Tract Geoids","type":"Text","description":""}' as test_get_obs_column_with_geoid_and_census_1, + (expected)[2]::text = '{"colname":"geoid","tablename":"obs_ab038198aaab3f3cb055758638ee4de28ad70146","aggregate":null,"name":"US Census Tract Geoids","type":"Text","description":""}' as test_get_obs_column_with_geoid_and_census_2, + (expected)[3]::text = '{"colname":"geoid","tablename":"obs_65f29658e096ca1485bf683f65fdbc9f05ec3c5d","aggregate":null,"name":"US Census Tract Geoids","type":"Text","description":""}' as test_get_obs_column_with_geoid_and_census_3 +from result; + -- should be null-valued +WITH result as ( SELECT - (unnest(cdb_observatory._OBS_GetColumnData( + array_agg(a) expected from cdb_observatory._OBS_GetColumnData( '"us.census.tiger".census_tract', - Array['"us.census.tiger".baloney'], -- entry not in catalog - '2009 - 2013' - ))).* -ORDER BY 1 ASC; + Array['"us.census.tiger".baloney'], + '2009 - 2013') a +) +select expected is null as OBS_GetColumnDataJSON_missing_measure +from result; -- OBS_LookupCensusHuman -- should give back: {"\"us.census.acs\".B19083001"} From 7782bdeec23285e875b0d153dfd31bdcd22d5f59 Mon Sep 17 00:00:00 2001 From: Stuart Lynn Date: Fri, 22 Apr 2016 16:10:41 -0400 Subject: [PATCH 15/41] adding tests fro new json returning get methods --- .../41_observatory_augmentation_test.out | 36 ++++++------- .../sql/41_observatory_augmentation_test.sql | 50 +++++++++++-------- 2 files changed, 48 insertions(+), 38 deletions(-) diff --git a/src/pg/test/expected/41_observatory_augmentation_test.out b/src/pg/test/expected/41_observatory_augmentation_test.out index 948b4b3..41bff69 100644 --- a/src/pg/test/expected/41_observatory_augmentation_test.out +++ b/src/pg/test/expected/41_observatory_augmentation_test.out @@ -41,34 +41,34 @@ Done. {female_pop,male_pop} | {} (1 row) - names | vals ---------------+---------- - {gini_index} | {0.3494} +obs_get_gini_index_at_test_point +---------------------------------- +t (1 row) - names | vals ---------------+------ - {gini_index} | {} +obs_get_gini_index_at_null_island +----------------------------------- +t (1 row) - _obs_getpoints --------------------- - {4809.33511352425} +obs_getpoints_for_test_point +------------------------------ +t (1 row) - _obs_getpoints ----------------- - +obs_getpoints_for_null_island +------------------------------- +t (1 row) - _obs_getpolygons --------------------- - {1570.72353789469} +obs_getpolygons_for_test_point +-------------------------------- +t (1 row) - _obs_getpolygons ------------------- - {NULL} +obs_getpolygons_for_null_island +--------------------------------- +t (1 row) segment_name | total_pop_quantile | male_pop_quantile | female_pop_quantile | median_age_quantile | white_pop_quantile | black_pop_quantile | asian_pop_quantile | hispanic_pop_quantile | not_us_citizen_pop_quantile | workers_16_and_over_quantile | commuters_by_car_truck_van_quantile | commuters_by_public_transportation_quantile | commuters_by_bus_quantile | commuters_by_subway_or_elevated_quantile | walked_to_work_quantile | worked_at_home_quantile | children_quantile | households_quantile | population_3_years_over_quantile | in_school_quantile | in_grades_1_to_4_quantile | in_grades_5_to_8_quantile | in_grades_9_to_12_quantile | in_undergrad_college_quantile | pop_25_years_over_quantile | high_school_diploma_quantile | bachelors_degree_quantile | masters_degree_quantile | pop_5_years_over_quantile | speak_only_english_at_home_quantile | speak_spanish_at_home_quantile | pop_determined_poverty_status_quantile | poverty_quantile | median_income_quantile | gini_index_quantile | income_per_capita_quantile | housing_units_quantile | vacant_housing_units_quantile | vacant_housing_units_for_rent_quantile | vacant_housing_units_for_sale_quantile | median_rent_quantile | percent_income_spent_on_rent_quantile | owner_occupied_housing_units_quantile | million_dollar_housing_units_quantile diff --git a/src/pg/test/sql/41_observatory_augmentation_test.sql b/src/pg/test/sql/41_observatory_augmentation_test.sql index 1436597..5999383 100644 --- a/src/pg/test/sql/41_observatory_augmentation_test.sql +++ b/src/pg/test/sql/41_observatory_augmentation_test.sql @@ -41,42 +41,50 @@ FROM -- -----------|------- -- gini_index | 0.3494 -SELECT * FROM - cdb_observatory._OBS_Get( +WITH result as ( + SELECT _OBS_GetJSON::text as expected FROM + cdb_observatory._OBS_GetJSON( cdb_observatory._TestPoint(), Array['"us.census.acs".B19083001']::text[], '2009 - 2013', '"us.census.tiger".block_group' - ); + ) +) select expected = '{"value":0.3494,"name":"Gini Index","tablename":"obs_3e7cc9cfd403b912c57b42d5f9195af9ce2f3cdb","aggregate":"","type":"Numeric","description":""}' + from result; -- gini index at null island -SELECT * FROM - cdb_observatory._OBS_Get( +WITH result as ( + SELECT count(_OBS_GetJSON) as expected FROM + cdb_observatory._OBS_GetJSON( CDB_LatLng(0, 0), Array['"us.census.acs".B19083001']::text[], '2009 - 2013', '"us.census.tiger".block_group' - ); - + ) +) select expected = 0 as OBS_Get_gini_index_at_null_island + from result; + -- OBS_GetPoints -- obs_getpoints -- -------------------- -- {4809.33511352425} SELECT - cdb_observatory._OBS_GetPoints( + (cdb_observatory._OBS_GetPoints( cdb_observatory._TestPoint(), 'obs_a92e1111ad3177676471d66bb8036e6d057f271b'::text, -- see example in obs_geomtable - Array[('total_pop','obs_ab038198aaab3f3cb055758638ee4de28ad70146','sum')::cdb_observatory.OBS_ColumnData] - ); - + (Array['{"colname":"total_pop","tablename":"obs_ab038198aaab3f3cb055758638ee4de28ad70146","aggregate":"sum","name":"Total Population","type":"Numeric","description":"The total number of all people living in a given geographic area. This is a very useful catch-all denominator when calculating rates."}'::json]) + ))[1]::text = '{"value":4809.33511352425,"name":"Total Population","tablename":"obs_ab038198aaab3f3cb055758638ee4de28ad70146","aggregate":"sum","type":"Numeric","description":"The total number of all people living in a given geographic area. This is a very useful catch-all denominator when calculating rates."}' + as OBS_GetPoints_for_test_point; -- what happens at null island + SELECT - cdb_observatory._OBS_GetPoints( + (cdb_observatory._OBS_GetPoints( CDB_LatLng(0, 0), 'obs_a92e1111ad3177676471d66bb8036e6d057f271b'::text, -- see example in obs_geomtable - Array[('total_pop','obs_ab038198aaab3f3cb055758638ee4de28ad70146','sum')::cdb_observatory.OBS_ColumnData] - ); + (Array['{"colname":"total_pop","tablename":"obs_ab038198aaab3f3cb055758638ee4de28ad70146","aggregate":"sum","name":"Total Population","type":"Numeric","description":"The total number of all people living in a given geographic area. This is a very useful catch-all denominator when calculating rates."}'::json]) + ))[1]::text is null + as OBS_GetPoints_for_null_island; -- OBS_GetPolygons -- obs_getpolygons @@ -84,19 +92,21 @@ SELECT -- {12996.8172420752} SELECT - cdb_observatory._OBS_GetPolygons( + (cdb_observatory._OBS_GetPolygons( cdb_observatory._TestArea(), 'obs_a92e1111ad3177676471d66bb8036e6d057f271b'::text, -- see example in obs_geomtable - Array[('total_pop','obs_ab038198aaab3f3cb055758638ee4de28ad70146','sum')::cdb_observatory.OBS_ColumnData] -); + Array['{"colname":"total_pop","tablename":"obs_ab038198aaab3f3cb055758638ee4de28ad70146","aggregate":"sum","name":"Total Population","type":"Numeric","description":"The total number of all people living in a given geographic area. This is a very useful catch-all denominator when calculating rates."}'::json] +))[1]::text = '{"value":12996.8172420752,"name":"Total Population","tablename":"obs_ab038198aaab3f3cb055758638ee4de28ad70146","aggregate":"sum","type":"Numeric","description":"The total number of all people living in a given geographic area. This is a very useful catch-all denominator when calculating rates."}' + as OBS_GetPolygons_for_test_point; -- see what happens around null island SELECT - cdb_observatory._OBS_GetPolygons( + (cdb_observatory._OBS_GetPolygons( ST_Buffer(CDB_LatLng(0, 0)::geography, 500)::geometry, 'obs_a92e1111ad3177676471d66bb8036e6d057f271b'::text, -- see example in obs_geomtable - Array[('total_pop','obs_ab038198aaab3f3cb055758638ee4de28ad70146','sum')::cdb_observatory.OBS_ColumnData] -); + Array['{"colname":"total_pop","tablename":"obs_ab038198aaab3f3cb055758638ee4de28ad70146","aggregate":"sum","name":"Total Population","type":"Numeric","description":"The total number of all people living in a given geographic area. This is a very useful catch-all denominator when calculating rates."}'::json]) + )[1]->>'value' is null + as OBS_GetPolygons_for_null_island; SELECT * FROM cdb_observatory._OBS_GetSegmentSnapshot( From 2c46a72038facf2cf3e79201af1d2df646c04534 Mon Sep 17 00:00:00 2001 From: Stuart Lynn Date: Fri, 22 Apr 2016 16:14:56 -0400 Subject: [PATCH 16/41] bug fix --- src/pg/test/sql/41_observatory_augmentation_test.sql | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/pg/test/sql/41_observatory_augmentation_test.sql b/src/pg/test/sql/41_observatory_augmentation_test.sql index 5999383..63433c2 100644 --- a/src/pg/test/sql/41_observatory_augmentation_test.sql +++ b/src/pg/test/sql/41_observatory_augmentation_test.sql @@ -42,20 +42,21 @@ FROM -- gini_index | 0.3494 WITH result as ( - SELECT _OBS_GetJSON::text as expected FROM - cdb_observatory._OBS_GetJSON( + SELECT _OBS_Get::text as expected FROM + cdb_observatory._OBS_Get( cdb_observatory._TestPoint(), Array['"us.census.acs".B19083001']::text[], '2009 - 2013', '"us.census.tiger".block_group' ) ) select expected = '{"value":0.3494,"name":"Gini Index","tablename":"obs_3e7cc9cfd403b912c57b42d5f9195af9ce2f3cdb","aggregate":"","type":"Numeric","description":""}' + as OBS_Get_gini_index_at_test_point from result; -- gini index at null island WITH result as ( - SELECT count(_OBS_GetJSON) as expected FROM - cdb_observatory._OBS_GetJSON( + SELECT count(_OBS_Get) as expected FROM + cdb_observatory._OBS_Get( CDB_LatLng(0, 0), Array['"us.census.acs".B19083001']::text[], '2009 - 2013', From a9b22caadf2c06d703ee80690dde924707fffce5 Mon Sep 17 00:00:00 2001 From: Stuart Lynn Date: Fri, 22 Apr 2016 16:40:21 -0400 Subject: [PATCH 17/41] updating OBS_GetCategories to json internals --- src/pg/sql/41_observatory_augmentation.sql | 39 ++++++++++++++-------- 1 file changed, 25 insertions(+), 14 deletions(-) diff --git a/src/pg/sql/41_observatory_augmentation.sql b/src/pg/sql/41_observatory_augmentation.sql index cdf707c..9899829 100644 --- a/src/pg/sql/41_observatory_augmentation.sql +++ b/src/pg/sql/41_observatory_augmentation.sql @@ -691,14 +691,14 @@ CREATE OR REPLACE FUNCTION cdb_observatory._OBS_GetCategories( geometry_level text DEFAULT '"us.census.tiger".block_group', time_span text DEFAULT '2009 - 2013' ) -RETURNS TABLE(names text[], categories text[]) as $$ +RETURNS SETOF JSON as $$ DECLARE geom_table_name text; geoid text; names text[]; results text[]; query text; - data_table_info cdb_observatory.OBS_ColumnData[]; + data_table_info json[]; BEGIN geom_table_name := cdb_observatory._OBS_GeomTable(geom, geometry_level); @@ -709,13 +709,12 @@ BEGIN RETURN QUERY SELECT '{}'::text[], '{}'::text[]; END IF; - data_table_info := cdb_observatory._OBS_GetColumnData(geometry_level, - dimension_names, - time_span); - - - names := (SELECT array_agg((d).colname) - FROM unnest(data_table_info) As d); + execute' + select array_agg( _obs_getcolumndatajson) from cdb_observatory._OBS_GetColumnDataJSON($1, + $2, + $3);' + INTO data_table_info + using geometry_level, dimension_names, time_span; EXECUTE @@ -729,7 +728,7 @@ BEGIN query := 'SELECT ARRAY['; FOR i IN 1..array_upper(data_table_info, 1) LOOP - query = query || format('%I ', lower(((data_table_info)[i]).colname)); + query = query || format('%I ', lower(((data_table_info)[i])->>'colname')); IF i < array_upper(data_table_info, 1) THEN query := query || ','; @@ -740,8 +739,8 @@ BEGIN FROM observatory.%I WHERE %I.geoid = %L ', - ((data_table_info)[1]).tablename, - ((data_table_info)[1]).tablename, + ((data_table_info)[1])->>'tablename', + ((data_table_info)[1])->>'tablename', geoid ); @@ -749,9 +748,21 @@ BEGIN query INTO results USING geom; - + RETURN QUERY - SELECT names,results + EXECUTE + $query$ + select row_to_json(t) from( + select categories as category, + meta->>'name' as name, + meta->>'tablename' as tablename, + meta->>'aggregate' as aggregate, + meta->>'type' as type, + meta->>'description' as description + from (select unnest($1) as categories, unnest($2) as meta) b + ) t + $query$ + USING results, data_table_info; RETURN; END; From 0406d493a7ceb4d7930a748dcb5ffdb1bdb33c62 Mon Sep 17 00:00:00 2001 From: Stuart Lynn Date: Fri, 22 Apr 2016 16:49:38 -0400 Subject: [PATCH 18/41] removing extra JSON from testing --- src/pg/test/sql/40_observatory_utility_test.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pg/test/sql/40_observatory_utility_test.sql b/src/pg/test/sql/40_observatory_utility_test.sql index 5fe5c40..abdab50 100644 --- a/src/pg/test/sql/40_observatory_utility_test.sql +++ b/src/pg/test/sql/40_observatory_utility_test.sql @@ -53,7 +53,7 @@ SELECT Array['"us.census.tiger".baloney'], '2009 - 2013') a ) -select expected is null as OBS_GetColumnDataJSON_missing_measure +select expected is null as OBS_GetColumnData_missing_measure from result; -- OBS_LookupCensusHuman From aa29a287d15574d95cac61cfa173ae3ac610cc4c Mon Sep 17 00:00:00 2001 From: Stuart Lynn Date: Fri, 22 Apr 2016 16:49:51 -0400 Subject: [PATCH 19/41] tests for OBS_GetCategories --- .../41_observatory_augmentation_test.out | 13 +++---- .../sql/41_observatory_augmentation_test.sql | 36 ++++++++++++------- 2 files changed, 30 insertions(+), 19 deletions(-) diff --git a/src/pg/test/expected/41_observatory_augmentation_test.out b/src/pg/test/expected/41_observatory_augmentation_test.out index 41bff69..5b13d3e 100644 --- a/src/pg/test/expected/41_observatory_augmentation_test.out +++ b/src/pg/test/expected/41_observatory_augmentation_test.out @@ -81,16 +81,17 @@ t | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (1 row) - names | categories --------+--------------------------------- - {X10} | {"Wealthy, urban without Kids"} +getcategories_at_test_point_1 | getcategories_at_test_point_2 +-------------------------------+------------------------------- +t | t (1 row) - names | categories --------+------------ - {X10} | +getcategories_at_null_island +------------------------------ +t (1 row) + obs_getmeasure ---------------------------------------------------- {"name" : "total_pop", "value" : 9516.27915900609} diff --git a/src/pg/test/sql/41_observatory_augmentation_test.sql b/src/pg/test/sql/41_observatory_augmentation_test.sql index 63433c2..137b021 100644 --- a/src/pg/test/sql/41_observatory_augmentation_test.sql +++ b/src/pg/test/sql/41_observatory_augmentation_test.sql @@ -122,19 +122,29 @@ SELECT * FROM '"us.census.tiger".census_tract' ); -SELECT * FROM - cdb_observatory._OBS_GetCategories( - cdb_observatory._TestPoint(), - Array['"us.census.spielman_singleton_segments".X10'], - '"us.census.tiger".census_tract' -); - -SELECT * FROM - cdb_observatory._OBS_GetCategories( - CDB_LatLng(0, 0), - Array['"us.census.spielman_singleton_segments".X10'], - '"us.census.tiger".census_tract' -); +WITH result as ( + SELECT array_agg(_OBS_GetCategories) as expected FROM + cdb_observatory._OBS_GetCategories( + cdb_observatory._TestPoint(), + Array['"us.census.spielman_singleton_segments".X10'], + '"us.census.tiger".census_tract' + ) +) + select (expected)[1]::text = '{"category":"Wealthy, urban without Kids","name":"SS_segment_10_clusters","tablename":"obs_65f29658e096ca1485bf683f65fdbc9f05ec3c5d","aggregate":null,"type":"Text","description":"Sociodemographic classes from Spielman and Singleton 2015, 10 clusters"}' as GetCategories_at_test_point_1, + (expected)[2]::text ='{"category":"Wealthy, urban without Kids","name":"SS_segment_10_clusters","tablename":"obs_11ee8b82c877c073438bc935a91d3dfccef875d1","aggregate":null,"type":"Text","description":"Sociodemographic classes from Spielman and Singleton 2015, 10 clusters"}' as GetCategories_at_test_point_2 + from result; + +WITH result as ( + SELECT array_agg(_OBS_GetCategories) as expected FROM + cdb_observatory._OBS_GetCategories( + -- cdb_observatory._TestPoint(), + CDB_LatLng(0,0), + Array['"us.census.spielman_singleton_segments".X10'], + '"us.census.tiger".census_tract' + ) +) + select expected is null as GetCategories_at_null_island + from result; -- Point-based OBS_GetMeasure, default normalization (area) SELECT * FROM From 54c3407d496426625f04ceb8301d50fb13182834 Mon Sep 17 00:00:00 2001 From: Andy Eschbacher Date: Fri, 22 Apr 2016 20:55:59 -0400 Subject: [PATCH 20/41] adding fixture to load/drop scripts --- src/pg/test/sql/drop_fixtures.sql | 4 ++++ src/pg/test/sql/load_fixtures.sql | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/src/pg/test/sql/drop_fixtures.sql b/src/pg/test/sql/drop_fixtures.sql index 5201029..e351172 100644 --- a/src/pg/test/sql/drop_fixtures.sql +++ b/src/pg/test/sql/drop_fixtures.sql @@ -43,4 +43,8 @@ DROP TABLE observatory.obs_11ee8b82c877c073438bc935a91d3dfccef875d1; DROP TABLE observatory.obs_d34555209878e8c4b37cf0b2b3d072ff129ec470; \echo Done. +\echo Dropping obs_b0ef6dd68d5faddbf231fd7f02916b3d00ec43c4 fixture table... +DROP TABLE observatory.obs_b0ef6dd68d5faddbf231fd7f02916b3d00ec43c4; +\echo Done. + \unset ECHO diff --git a/src/pg/test/sql/load_fixtures.sql b/src/pg/test/sql/load_fixtures.sql index 721558a..e21067b 100644 --- a/src/pg/test/sql/load_fixtures.sql +++ b/src/pg/test/sql/load_fixtures.sql @@ -43,4 +43,8 @@ SET client_min_messages TO WARNING; \i test/fixtures/obs_d34555209878e8c4b37cf0b2b3d072ff129ec470.sql \echo Done. +\echo Loading obs_b0ef6dd68d5faddbf231fd7f02916b3d00ec43c4.sql fixture file... +\i test/fixtures/obs_b0ef6dd68d5faddbf231fd7f02916b3d00ec43c4.sql +\echo Done. + \unset ECHO From ebc2c6dec51c4b2cbef15d64f3e9404ac878b53d Mon Sep 17 00:00:00 2001 From: Andy Eschbacher Date: Fri, 22 Apr 2016 21:19:19 -0400 Subject: [PATCH 21/41] adding tests for _obs_searchtables --- .../42_observatory_exploration_test.out | 54 +++++++++++++++++++ .../sql/42_observatory_exploration_test.sql | 28 ++++++++++ 2 files changed, 82 insertions(+) create mode 100644 src/pg/test/expected/42_observatory_exploration_test.out create mode 100644 src/pg/test/sql/42_observatory_exploration_test.sql diff --git a/src/pg/test/expected/42_observatory_exploration_test.out b/src/pg/test/expected/42_observatory_exploration_test.out new file mode 100644 index 0000000..a4546b0 --- /dev/null +++ b/src/pg/test/expected/42_observatory_exploration_test.out @@ -0,0 +1,54 @@ +\i test/sql/load_fixtures.sql +SET client_min_messages TO WARNING; +\set ECHO none +Loading obs_table.sql fixture file... +Done. +Loading obs_column.sql fixture file... +Done. +Loading obs_column_table.sql fixture file... +Done. +Loading obs_column_to_column.sql fixture file... +Done. +Loading obs_85328201013baa14e8e8a4a57a01e6f6fbc5f9b1.sql fixture file... +Done. +Loading obs_3e7cc9cfd403b912c57b42d5f9195af9ce2f3cdb.sql fixture file... +Done. +Loading obs_ab038198aaab3f3cb055758638ee4de28ad70146.sql fixture file... +Done. +Loading obs_a92e1111ad3177676471d66bb8036e6d057f271b.sql fixture file... +Done. +Loading obs_11ee8b82c877c073438bc935a91d3dfccef875d1.sql fixture file... +Done. +Loading obs_d34555209878e8c4b37cf0b2b3d072ff129ec470.sql fixture file... +Done. +Loading obs_b0ef6dd68d5faddbf231fd7f02916b3d00ec43c4.sql fixture file... +Done. +_obs_searchtables_tables_match|_obs_searchtables_timespan_matches +t|t +t|t +(2 rows) +_obs_searchtables_timespan_does_not_match +t +(1 row) +Dropping obs_table.sql fixture table... +Done. +Dropping obs_column.sql fixture table... +Done. +Dropping obs_column_table.sql fixture table... +Done. +Dropping obs_column_to_column.sql fixture table... +Done. +Dropping obs_85328201013baa14e8e8a4a57a01e6f6fbc5f9b1 fixture table... +Done. +Dropping obs_3e7cc9cfd403b912c57b42d5f9195af9ce2f3cdb fixture table... +Done. +Dropping obs_ab038198aaab3f3cb055758638ee4de28ad70146 fixture table... +Done. +Dropping obs_a92e1111ad3177676471d66bb8036e6d057f271b fixture table... +Done. +Dropping obs_11ee8b82c877c073438bc935a91d3dfccef875d1 fixture table... +Done. +Dropping obs_d34555209878e8c4b37cf0b2b3d072ff129ec470 fixture table... +Done. +Dropping obs_b0ef6dd68d5faddbf231fd7f02916b3d00ec43c4 fixture table... +Done. diff --git a/src/pg/test/sql/42_observatory_exploration_test.sql b/src/pg/test/sql/42_observatory_exploration_test.sql new file mode 100644 index 0000000..8dca434 --- /dev/null +++ b/src/pg/test/sql/42_observatory_exploration_test.sql @@ -0,0 +1,28 @@ +\i test/sql/load_fixtures.sql +\pset format unaligned + +-- set up variables for use in testing + +\set cartodb_census_tract_geometry '' + +\set cartodb_county_geometry '' + +-- _OBS_SearchTables tests +SELECT + t.table_name IN ('obs_b0ef6dd68d5faddbf231fd7f02916b3d00ec43c4', + 'obs_23da37d4e66e9de2f525572967f8618bde99a8c0') As _OBS_SearchTables_tables_match, + t.timespan = '2013' As _OBS_SearchTables_timespan_matches +FROM cdb_observatory._OBS_SearchTables( + '"us.census.tiger".county', + '2013' +) As t(table_name, timespan); + +-- _OBS_SearchTables tests +-- should not return tables for year that does not match +SELECT count(*) = 0 As _OBS_SearchTables_timespan_does_not_match +FROM cdb_observatory._OBS_SearchTables( + '"us.census.tiger".county', + '1988' -- year before first tiger data was collected +) As t(table_name, timespan); + +\i test/sql/drop_fixtures.sql From 18445d7755304d180be32b5621a339f9dc413687 Mon Sep 17 00:00:00 2001 From: Andy Eschbacher Date: Fri, 22 Apr 2016 21:19:55 -0400 Subject: [PATCH 22/41] adding better comments and tidying up code --- src/pg/sql/44_observatory_geometries.sql | 96 ++++++++++++++++++------ 1 file changed, 74 insertions(+), 22 deletions(-) diff --git a/src/pg/sql/44_observatory_geometries.sql b/src/pg/sql/44_observatory_geometries.sql index a7f8523..2347365 100644 --- a/src/pg/sql/44_observatory_geometries.sql +++ b/src/pg/sql/44_observatory_geometries.sql @@ -1,19 +1,34 @@ --- Returns the polygon(s) that overlap with the input geometry. --- Input: --- :param geom geometry: input geometry --- :param boundary_id text: table to get polygon from (can be approximate name) --- :param use_literal boolean: use the literal table name (defaults to true) +-- Data Observatory -- Welcome to the Future +-- These Data Observatory functions provide access to boundary polyons (and +-- their ids) such as those available through the US Census Tiger, Who's on +-- First, the Spanish Census, and so on --- From an input point geometry, find the boundary which intersects with the centroid of the input geometry + +-- OBS_GetGeometry +-- +-- Returns the boundary polygon(s) that overlap with the input point geometry. +-- From an input point geometry, find the boundary which intersects with the +-- centroid of the input geometry +-- Inputs: +-- geom geometry: input point geometry +-- boundary_id text: source id of boundaries +-- see function OBS_ListGeomColumns for all avaiable +-- boundary ids +-- time_span text: time span that the geometries were collected (optional) +-- +-- Output: +-- boundary geometry: geometry boundary that intersects with geom, is at the +-- resolution requested with boundary_id, and time_span +-- CREATE OR REPLACE FUNCTION cdb_observatory.OBS_GetGeometry( - geom geometry(geometry, 4326), + geom geometry(Geometry, 4326), boundary_id text, time_span text DEFAULT NULL) -RETURNS geometry(geometry, 4326) +RETURNS geometry(Geometry, 4326) AS $$ DECLARE - boundary geometry(geometry, 4326); + boundary geometry(Geometry, 4326); target_table text; BEGIN @@ -31,15 +46,18 @@ BEGIN SELECT x.target_tables INTO target_table FROM cdb_observatory._OBS_SearchTables(boundary_id, time_span) As x(target_tables, - time_spans) - ORDER BY x.time_spans DESC + timespans) + ORDER BY x.timespans DESC LIMIT 1; ELSE + -- TODO: modify for only one table returned instead of arbitrarily choosing + -- one with LIMIT 1 (could be conflict between clipped vs non-clipped + -- boundaries in the metadata tables) SELECT x.target_tables INTO target_table FROM cdb_observatory._OBS_SearchTables(boundary_id, time_span) As x(target_tables, - time_spans) - WHERE x.time_spans = time_span + timespans) + WHERE x.timespans = time_span LIMIT 1; END IF; @@ -66,6 +84,25 @@ BEGIN END; $$ LANGUAGE plpgsql; +-- OBS_GetGeometryId +-- +-- retrieves the boundary identifier (e.g., '36047' = Kings County/Brooklyn, NY) +-- corresponding to the location geom and boundary types (e.g., +-- us.census.tiger.county) + +-- Inputs: +-- geom geometry: location where the boundary is requested to overlap with +-- boundary_id text: source id of boundaries (e.g., us.census.tiger.county) +-- see function OBS_ListGeomColumns for all avaiable +-- boundary ids +-- time_span text: time span that the geometries were collected (optional) +-- +-- Output: +-- geometry_id text: identifier of the geometry which overlaps with the input +-- point geom in the table corresponding to boundary_id and +-- time_span +-- + CREATE OR REPLACE FUNCTION cdb_observatory.OBS_GetGeometryId( geom geometry(Geometry, 4326), boundary_id text, @@ -88,17 +125,17 @@ BEGIN IF time_span IS NULL THEN SELECT x.target_tables INTO target_table - FROM cdb_observatory.cdb_observatory._OBS_SearchTables(boundary_id, + FROM cdb_observatory._OBS_SearchTables(boundary_id, time_span) As x(target_tables, - time_spans) - ORDER BY x.time_spans DESC + timespans) + ORDER BY x.timespans DESC LIMIT 1; ELSE SELECT x.target_tables INTO target_table - FROM cdb_observatory.cdb_observatory._OBS_SearchTables(boundary_id, + FROM cdb_observatory._OBS_SearchTables(boundary_id, time_span) As x(target_tables, - time_spans) - WHERE x.time_spans = time_span + timespans) + WHERE x.timespans = time_span LIMIT 1; END IF; @@ -125,10 +162,25 @@ BEGIN END; $$ LANGUAGE plpgsql; --- Given a geometry reference (e.g., geoid for US Census), and it's geometry level (see OBS_ListGeomColumns() for all available boundary ids), give back the boundary that corresponds to that reference and level. --- @param geometry_id text: identifier for boundary geometry corresponding to a boundary id `boundary_id`. E.g., '36047' is a geoid for US Census Tiger boundaries corresponding to a county (047) in New York State (36) --- @param boundary_id: +-- OBS_GetGeometryById +-- +-- Given a geometry reference (e.g., geoid for US Census), and it's geometry +-- level (see OBS_ListGeomColumns() for all available boundary ids), give back +-- the boundary that corresponds to that geometry_id, boundary_id, and +-- time_span + +-- Inputs: +-- geometry_id text: geometry id of the requested boundary +-- boundary_id text: source id of boundaries (e.g., us.census.tiger.county) +-- see function OBS_ListGeomColumns for all avaiable +-- boundary ids +-- time_span text: time span that the geometries were collected (optional) +-- +-- Output: +-- boundary geometry: geometry boundary that matches geometry_id, is at the +-- resolution requested with boundary_id, and time_span +-- CREATE OR REPLACE FUNCTION cdb_observatory.OBS_GetGeometryById( geometry_id text, -- ex: '36047' From 0ab79827273adaa432dd152698690101eea48f39 Mon Sep 17 00:00:00 2001 From: Andy Eschbacher Date: Fri, 22 Apr 2016 21:20:43 -0400 Subject: [PATCH 23/41] adding expected out for getgeometry* functions --- .../expected/44_observatory_geometries.out | 112 ------------------ .../44_observatory_geometries_test.out | 89 ++++++++++++++ 2 files changed, 89 insertions(+), 112 deletions(-) delete mode 100644 src/pg/test/expected/44_observatory_geometries.out create mode 100644 src/pg/test/expected/44_observatory_geometries_test.out diff --git a/src/pg/test/expected/44_observatory_geometries.out b/src/pg/test/expected/44_observatory_geometries.out deleted file mode 100644 index a6a69cc..0000000 --- a/src/pg/test/expected/44_observatory_geometries.out +++ /dev/null @@ -1,112 +0,0 @@ -\i test/sql/load_fixtures.sql -SET client_min_messages TO WARNING; -\set ECHO none -Loading obs_table.sql fixture file... -Done. -Loading obs_column.sql fixture file... -Done. -Loading obs_column_table.sql fixture file... -Done. -Loading obs_column_to_column.sql fixture file... -Done. -Loading obs_85328201013baa14e8e8a4a57a01e6f6fbc5f9b1.sql fixture file... -Done. -Loading obs_3e7cc9cfd403b912c57b42d5f9195af9ce2f3cdb.sql fixture file... -Done. -Loading obs_ab038198aaab3f3cb055758638ee4de28ad70146.sql fixture file... -Done. -Loading obs_a92e1111ad3177676471d66bb8036e6d057f271b.sql fixture file... -Done. -Loading obs_11ee8b82c877c073438bc935a91d3dfccef875d1.sql fixture file... -Done. -Loading obs_d34555209878e8c4b37cf0b2b3d072ff129ec470.sql fixture file... -Done. -Loading obs_b0ef6dd68d5faddbf231fd7f02916b3d00ec43c4.sql fixture file... -Done. - test1 ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - 0106000020E6100000010000000103000000010000003500000056EF703B347C52C054FF2092215B44401B9AB2D30F7C52C03FE1ECD6325B4440B14B546F0D7C52C0BBCE86FC335B4440730F09DFFB7B52C0B796C9703C5B4440108FC4CBD37B52C0B96C74CE4F5B444001C0B167CF7B52C0ED0BE8853B5B4440C843DFDDCA7B52C05DDDB1D8265B4440A73D25E7C47B52C0D53BDC0E0D5B4440BB5E9A22C07B52C0F8A3A833F75A4440355F251FBB7B52C0B64604E3E05A444008910C39B67B52C098BF42E6CA5A44405227A089B07B52C0F204C24EB15A444024F1F274AE7B52C069E4F38AA75A44402B4A09C1AA7B52C06B63EC84975A4440E199D024B17B52C0546F0D6C955A44403C873254C57B52C02EAC1BEF8E5A44402593533BC37B52C0588AE42B815A4440973AC8EBC17B52C087890629785A44407A6F0C01C07B52C0E1EB6B5D6A5A44401B9B1DA9BE7B52C03F6F2A52615A444088855AD3BC7B52C088669E5C535A4440E1EA0088BB7B52C0E6E95C514A5A44400CE6AF90B97B52C070D05E7D3C5A44401E85EB51B87B52C0B03A72A4335A4440BAF3C473B67B52C09929ADBF255A4440CD920035B57B52C0454AB3791C5A4440F78DAF3DB37B52C0E09BA6CF0E5A4440DBC2F352B17B52C0703FE081015A444015C440D7BE7B52C05E83BEF4F659444041446ADAC57B52C0EFDFBC38F15944405FB1868BDC7B52C0C03E3A75E559444034BC5983F77B52C0205ED72FD8594440EFFCA204FD7B52C07E384888F25944403ACAC16C027C52C00876FC17085A444056478E74067C52C00FECF82F105A44400FECF82F107C52C0876D8B321B5A4440BB438A01127C52C0DE1CAED51E5A4440B9C15087157C52C034643C4A255A444099F221A81A7C52C0D0EFFB372F5A44404AED45B41D7C52C0785DBF60375A4440373465A71F7C52C065A71FD4455A4440C558A65F227C52C0D80DDB16655A4440F92EA52E197C52C09BA73AE4665A4440DEE522BE137C52C00664AF777F5A44405698BED7107C52C04759BF99985A444012D90759167C52C09430D3F6AF5A444044679945287C52C01F680586AC5A444049F086342A7C52C09CC3B5DAC35A44401FF5D72B2C7C52C0CB811E6ADB5A4440247EC51A2E7C52C0548B8862F25A4440FF59F3E32F7C52C0CB290131095B4440F96871C6307C52C09605137F145B444056EF703B347C52C054FF2092215B4440 -(1 row) - - test2 --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - 0106000020E6100000010000000103000000010000002C0200005051F52B9D8352C042B28009DC50444093C2BCC7998352C0E89E758D965144402EFD4B52998352C09A07B0C8AF514440E75086AA988352C022FAB5F5D351444027874F3A918352C0A46B26DF6C53444018E945ED7E8352C04D81CCCEA25344401346B3B27D8352C05D50DF32A753444068226C787A8352C08D25AC8DB153444015C8EC2C7A8352C004560E2DB2534440DF8618AF798352C00FD07D39B3534440FEB627486C8352C0DC9E20B1DD534440B98C9B1A688352C05D328E91EC5344408B8A389D648352C0929048DBF853444075CAA31B618352C0986A662D05544440EA758BC0588352C0D6C397892254444048DFA469508352C0151DC9E53F544440B67F65A5498352C0F73DEAAF575444401403249A408352C05E2A36E6755444402367614F3B8352C06DE2E47E8754444011FC6F253B8352C0431B800D885444403E7958A8358352C0DD0A6135965444401D739EB12F8352C093DFA293A5544440FB04508C2C8352C035289A07B05444401EA4A7C8218352C0347F4C6BD3544440D7C05609168352C05053CBD6FA544440AC8E1CE90C8352C0C9AA083719554440FC8D76DCF08252C0BD18CA897655444048895DDBDB8252C0C3B7B06EBC554440698995D1C88252C032207BBDFB55444004A73E90BC8252C0DB4C857824564440321F10E84C8252C08862F20698574440BB0853944B8252C09831056B9C57444080F0A1444B8252C0D32F116F9D574440C7629B54348252C0418177F2E9574440CEA44DD53D8152C04F1F813FFC564440A51133FB3C8152C0F607CA6DFB5644404D2EC6C03A8152C0DD43C2F7FE564440C5C6BC8E388152C0F3035779025744404B3E7617288152C0C1340C1F11574440C99063EB198152C0BB6070CD1D57444086E5CFB7058152C001D9EBDD1F574440DD770C8FFD8052C09F573CF548574440E69315C3D58052C0BCE47FF2775744404852D2C3D08052C0122C0E677E574440581EA4A7C88052C084F068E388574440187AC4E8B98052C0336C94F59B5744400E828E56B58052C0A80018CFA0574440B7B24467998052C0C8409E5DBE574440BEA085048C8052C032ACE28DCC5744401215AA9B8B8052C0A8A8FA95CE574440B9313D61898052C01F2A8D98D9574440C6DFF604898052C0A8C5E061DA574440AA622AFD848052C0B5F81400E3574440BD1B0B0A838052C012656F29E75744406C91B41B7D8052C0745AB741ED5744408C2C9963798052C0D2FA5B02F05744403315E291788052C079AF5A99F0574440412B3064758052C0128255F5F25744401329CDE6718052C0B7CEBF5DF6574440FEB3E6C75F8052C00876FC1708584440B70721205F8052C04374081C09584440A7CD380D518052C0C00303081F5844400133DFC14F8052C001BF469220584440EA211ADD418052C07570B03731584440CD3CB9A6408052C015342DB13258444020B1DD3D408052C0B03A72A433584440BA66F2CD368052C09F3D97A9495844400EDB1665368052C08C9E5BE84A584440F3AB3940308052C05376FA415D584440880FECF82F8052C0115322895E584440C6DD205A2B8052C0DC7F643A74584440FC389A232B8052C0F4A78DEA74584440990F0874268052C0FDD64E9484584440A5BDC117268052C02C27A1F4855844407218CC5F218052C0F9BB77D498584440F65E7CD11E8052C0E8A1B60DA3584440C1374D9F1D8052C0BC3E73D6A758444022DC6454198052C00629780AB95844406519E258178052C0FF03AC55BB584440FA5FAE450B8052C05704FF5BC9584440D7A3703D0A8052C0F25B74B2D458444036ACA92C0A8052C00A849D62D55844407FDAA84E078052C006BAF605F45844408B8862F2068052C017F19D98F558444006F1811DFF7F52C04DBD6E111859444048FAB48AFE7F52C0CF6740BD195944407A1A3048FA7F52C0E6AC4F3926594440382BA226FA7F52C08D614ED0265944407A34D593F97F52C0081B9E5E29594440F8A3A833F77F52C03A58FFE7305944402AAA7EA5F37F52C0643C4A253C594440A7E507AEF27F52C0321CCF674059444063EFC517ED7F52C0438D429259594440B1A6B228EC7F52C0185E49F25C5944400DC2DCEEE57F52C09BAA7B6473594440EA059FE6E47F52C0C3D50110775944403B8DB454DE7F52C059F5B9DA8A594440A06CCA15DE7F52C094F3C5DE8B5944408509A359D97F52C0910C39B69E594440244223D8B87F52C0FE7A8505F7594440EF004F5AB87F52C08DD31055F85944409CDA19A6B67F52C03F53AF5B045A4440F7730AF2B37F52C05A9C31CC095A444009C21550A87F52C0077C7E18215A44409E3F6D54A77F52C00C056C07235A4440C3499A3FA67F52C0586E6935245A44407020240B987F52C080B6D5AC335A4440DDD0949D7E7F52C07383A10E2B5A44404E417E36727F52C0207A5226355A4440F4A44C6A687F52C0A2410A9E425A4440E92ADD5D677F52C061527C7C425A44407905A227657F52C03D7C9928425A4440791C06F3577F52C0D9EA724A405A4440F2B4FCC0557F52C08690F3FE3F5A4440FE7C5BB0547F52C0209738F2405A444052F17F47547F52C014E97E4E415A4440350C1F11537F52C0AF230ED9405A444098158A743F7F52C08F519E79395A44401ABD1AA0347F52C0A3586E69355A4440EB5223F4337F52C0207A5226355A4440A8AAD0402C7F52C0D89942E7355A44407C5EF1D4237F52C0613596B0365A44400227DBC01D7F52C007EA9447375A4440567E198C117F52C084D72E6D385A44402C7DE882FA7E52C0249BABE6395A4440D72FD80DDB7E52C0955F0663445A44401F2A8D98D97E52C0CBA0DAE0445A4440ACC612D6C67E52C0771211FE455A444026FBE769C07E52C06B64575A465A44400B7BDAE1AF7E52C023D5777E515A44407E8AE3C0AB7E52C0EBC37AA3565A4440268DD13AAA7E52C04F55A181585A4440525F96766A7E52C02502D53F885A4440A69C2FF65E7E52C003B16CE6905A44403B342C465D7E52C0D8B5BDDD925A444002B859BC587E52C0B20FB22C985A4440B0912408577E52C0871403249A5A444039950C00557E52C021E7FD7F9C5A4440D3139678407E52C015731074B45A444080ED60C43E7E52C0BAF3C473B65A4440FB3BDBA3377E52C074CC79C6BE5A44401BB7989F1B7E52C042E73576895A4440B01A4B581B7E52C03D2AFEEF885A4440D68C0C72177E52C07C60C77F815A44407EA99F37157E52C0AE80423D7D5A444053910A630B7E52C04A2366F6795A4440B7EEE6A90E7E52C0670E492D945A44401A4CC3F0117E52C0D829560DC25A444064AE0CAA0D7E52C0D74CBED9E65A4440D3687231067E52C07405DB88275B4440158C4AEA047E52C08D7E349C325B4440AB5791D1017E52C048BF7D1D385B4440268C6665FB7D52C0548A1D8D435B44405C1B2AC6F97D52C065187783685B4440FA0B3D62F47D52C03FE08101845B4440E2E313B2F37D52C03196E997885B444038F4160FEF7D52C05D50DF32A75B4440109546CCEC7D52C07FDB1324B65B44401C261AA4E07D52C0BA641C23D95B44405A0EF450DB7D52C0081F4AB4E45B4440BBB20B06D77D52C06E693524EE5B4440CE6BEC12D57D52C0FB592C45F25B444073672618CE7D52C09A0645F3005C4440BB7B80EECB7D52C0C7BAB88D065C4440F5F411F8C37D52C057E9EE3A1B5C44407B8670CCB27D52C09AB4A9BA475C4440240B98C0AD7D52C0282A1BD6545C4440E4839ECDAA7D52C0FA5E43705C5C4440E4805D4D9E7D52C08AAA5FE97C5C44401B2AC6F99B7D52C01C2444F9825C4440D3122BA3917D52C059F8FA5A975C4440A7ACA6EB897D52C0FD2D01F8A75C444007B5DFDA897D52C04818062CB95C44401EF7ADD6897D52C0399A232BBF5C444036397CD2897D52C0904946CEC25C444001DE02098A7D52C08A58C4B0C35C4440CB68E4F38A7D52C0527B116DC75C4440AD4F39268B7D52C0AB92C83EC85C4440531EDD088B7D52C0EB19C231CB5C4440C5C551B9897D52C070EB6E9EEA5C444077F4BF5C8B7D52C090149161155D44409BE447FC8A7D52C0161406651A5D4440D13FC1C58A7D52C0F792C6681D5D4440E3DEFC86897D52C0836C59BE2E5D44407EFFE6C5897D52C087C1FC15325D444071033E3F8C7D52C0DBA6785C545D44407C6308008E7D52C03FA6B5696C5D4440F42F49658A7D52C054FEB5BC725D4440713788D68A7D52C0ED9C6681765D44403CDC0E0D8B7D52C0B036C64E785D44403B8E1F2A8D7D52C066A3737E8A5D4440D3F88557927D52C07D0569C6A25D44407D022846967D52C0E5D4CE30B55D4440BFF1B567967D52C07C0BEBC6BB5D44409B012EC8967D52C0DE1D19ABCD5D44400AF31E679A7D52C0081F4AB4E45D4440D47D00529B7D52C0EBE1CB44115E44403F00A94D9C7D52C068774831405E4440F7393E5A9C7D52C04339D1AE425E44409831056B9C7D52C090A2CEDC435E444003B4AD669D7D52C086CABF96575E44402670EB6E9E7D52C0048E041A6C5E44409C69C2F6937D52C03259DC7F645E4440DDED7A698A7D52C047C8409E5D5E44407842AF3F897D52C0EEB089CC5C5E4440B053AC1A847D52C0859675FF585E444033FCA71B287D52C04D4A41B7975E444042942F68217D52C03F00A94D9C5E44404885B185207D52C0E5B4A7E49C5E4440751C3F541A7D52C0E318C91EA15E4440C26856B60F7D52C03A94A12AA65E4440FA7953910A7D52C093DFA293A55E444057923CD7F77C52C0C63368E89F5E444003CE52B29C7C52C06C239EEC665E44409AB33EE5987C52C020EEEA55645E4440DFC0E446917C52C0CF6394675E5E4440A70183A44F7C52C0B60E0EF6265E44400E0F61FC347C52C0CE88D2DEE05D4440E1404816307C52C01FD95C35CF5D444091B6F1272A7C52C0A7069ACFB95D444014C95702297C52C0CC785BE9B55D4440807F4A95287C52C0567C43E1B35D4440CE3637A6277C52C047AD307DAF5D4440DAFE9595267C52C07D569929AD5D4440FB90B75CFD7B52C02159C0046E5D4440876EF607CA7B52C078B130444E5D4440438CD7BCAA7B52C0321CCF67405D44401DC9E53FA47B52C0938C9C853D5D4440BBED42739D7B52C0111615713A5D444026FF93BF7B7B52C02BBD361B2B5D444039ECBE63787B52C091B6F1272A5D4440F2599E07777B52C0D40D1478275D4440A3005130637B52C01DFF0582005D4440A3AF20CD587B52C08AC6DADFD95C4440EB8F300C587B52C050FC1873D75C444003ECA353577B52C0E6ADBA0ED55C444003AF963B337B52C04694F6065F5C4440D13AAA9A207B52C0F0A485CB2A5C4440486B0C3A217B52C0B9DE3653215C4440E814E467237B52C065C57075005C44404F73F222137B52C08EC70C54C65B4440020D36751E7B52C0367689EAAD5B4440669E5C53207B52C0EA7420EBA95B4440A92C0ABB287B52C0D6FF39CC975B4440C2BCC799267B52C0E9B5D958895B4440B3075A81217B52C04276DEC6665B44405DDA70581A7B52C0535C55F65D5B4440C70BE9F0107B52C03526C45C525B444093C7D3F2037B52C08B338639415B44407E8978EBFC7A52C0FC1BB4571F5B4440D4B32094F77A52C0D061BEBC005B444016BD5301F77A52C09C887E6DFD5A4440887E6DFDF47A52C07B82C476F75A4440ECA4BE2CED7A52C0AE0AD462F05A4440846055BDFC7A52C0EF3A1BF2CF5A4440C1E09A3BFA7A52C072FC5069C45A444068C9E369F97A52C0D95DA0A4C05A4440A94D9CDCEF7A52C050711C78B55A4440321AF9BCE27A52C0FD2D01F8A75A44400F0D8B51D77A52C0F566D47C955A4440A5F27684D37A52C0EB54F99E915A4440C843DFDDCA7A52C02BBF0CC6885A44402A36E675C47A52C0DB68006F815A44405C70067FBF7A52C03D4162BB7B5A44405DA45016BE7A52C05C8E57207A5A44408D25AC8DB17A52C0681F2BF86D5A44404C4D8237A47A52C063450DA6615A4440419C8713987A52C0185B0872505A4440B6476FB88F7A52C058C51B99475A4440B8C9A8328C7A52C0BF266BD4435A4440FA9B5088807A52C0D9CD8C7E345A4440A70A4625757A52C0AA605452275A4440B28174B1697A52C0DC63E943175A4440888384285F7A52C04240BE840A5A44405DA27A6B607A52C085CB2A6C065A4440764F1E166A7A52C0D175E107E759444011397D3D5F7A52C0F0D93A38D85944404C3448C1537A52C05DA79196CA594440419DF2E8467A52C0DC476E4DBA594440088F368E587A52C048A7AE7C96594440A84F72874D7A52C0F42F49658A594440BBEB6CC83F7A52C092E9D0E979594440AEB8382A377A52C0329067976F594440B5C01E13297A52C03A00E2AE5E5944408235CEA6237A52C026A8E15B58594440682096CD1C7A52C0BF29AC545059444019E42EC2147A52C0813E912749594440B0FD648C0F7A52C04910AE80425944403A014D840D7A52C062A06B5F405944405F0B7A6F0C7A52C0B62E35423F594440959A3DD00A7A52C06308008E3D594440A86DC328087A52C09BE5B2D1395944402DE8BD31047A52C00F290648345944404B1B0E4B037A52C021C84109335944406A82A8FB007A52C004E3E0D2315944401E335019FF7952C0996038D730594440BF44BC75FE7952C0A051BAF42F594440EFFCA204FD7952C0FAD005F52D59444074779D0DF97952C03E90BC73285944407B681F2BF87952C021AB5B3D275944406917D34CF77952C00A83328D265944404084B872F67952C0C3D66CE525594440FFAECF9CF57952C04CA60A4625594440350A4966F57952C03A3B191C255944405323F433F57952C0F94B8BFA2459444077137CD3F47952C0A6F10BAF24594440942C27A1F47952C064027E8D24594440560DC2DCEE7952C05DC0CB0C1B594440755AB741ED7952C0410FB56D18594440D47C957CEC7952C053AEF02E17594440B1DAFCBFEA7952C0EEE87FB9165944402368CC24EA7952C0DC7D8E8F165944405FB4C70BE97952C089230F4416594440D0419770E87952C077B81D1A1659444065A54929E87952C0D7C05609165944409B00C3F2E77952C036C98FF815594440D42B6519E27952C047E350BF0B594440B2F4A10BEA7952C05C01857AFA58444009A4C4AEED7952C066F6798CF258444021037976F97952C06E15C440D75844409DD32CD0EE7952C0A46DFC89CA584440CE8B135FED7952C05247C7D5C85844408BFD65F7E47952C009168733BF5844401C40BFEFDF7952C0CBF6216FB9584440B33F506EDB7952C0747B4963B4584440C8940F41D57952C0B96E4A79AD584440FF06EDD5C77952C0D349B6BA9C58444093331477BC7952C0B77BB94F8E5844400C0055DCB87952C03605323B8B584440F068E388B57952C0C6F99B50885844401E34BBEEAD7952C0179B560A8158444085B2F0F5B57952C0BCADF4DA6C584440BAD91F28B77952C0ACAA97DF69584440BABC395CAB7952C006B64AB03858444014EB54F99E7952C01188D7F50B584440A98592C9A97952C0691A14CD0358444093FDF334607952C06C205D6C5A574440170D198F527952C01A8524B37A57444005854199467952C0AD6C1FF2965744409F3A56293D7952C02C98F8A3A85744401230BABC397952C0B2632310AF574440DD2230D6377952C0691B7FA2B257444061FBC9181F7952C097A608707A5744403140A209147952C05017299485574440567E198C117952C02BD9B111885744407BBC900E0F7952C0D7169E978A5744407FDAA84E077952C002637D039357444083F8C08EFF7852C0FE2AC0779B57444087307E1AF77852C0E1968FA4A4574440B515FBCBEE7852C0E449D235935744407F69519FE47852C065A9F57EA3574440EACE13CFD97852C0B6847CD0B35744402B8716D9CE7852C0CB7EDDE9CE5744408F8D40BCAE7852C070D1C952EB574440AF08FEB7927852C0EF1989D0085844403FFD67CD8F7852C0719010E50B5844401C2785798F7852C0764D486B0C584440F697DD93877852C0ACAB02B51858444037363B527D7852C0093543AA28584440C3D50110777852C09355116E32584440EEE714E4677852C03387A4164A584440717500C45D7852C07EA5F3E1595844405791D101497852C09D7DE5417A5844401AC1C6F5EF7752C0B9162D40DB5844400F7C0C569C7752C03EE8D9ACFA58444005508C2C997752C09259BDC3ED584440AC38D55A987752C0D1217024D0584440533BC3D4967752C04B5645B8C9584440E7FF55478E7752C05DC2A1B7785844402FFA0AD28C7752C0581CCEFC6A584440DCB930D28B7752C021567F8461584440FB20CB82897752C062D7F6764B58444079909E22877752C0D89942E7355844408C63247B847752C0B58993FB1D584440ACE46377817752C0677E350708584440C6C210397D7752C0B2F4A10BEA57444074B680D07A7752C0909DB7B1D9574440DB317557767752C0077767EDB65744409A7631CD747752C02D7B12D89C5744400D6C9560717752C054FEB5BC72574440FC34EECD6F7752C0A3E6ABE4635744409E7AA4C16D7752C0D1949D7E50574440FE9C82FC6C7752C0E046CA16495744401E4FCB0F5C7752C09B53C90050574440D503E621537752C0E063B0E25457444037DC476E4D7752C032569BFF5757444070ED4449487752C0836C59BE2E57444066F50EB7437752C054C554FA0957444032022A1C417752C0713C9F01F55644404487C091407752C01F7EFE7BF05644406E4E2503407752C05D4C33DDEB56444088F546AD307752C03ECBF3E0EE5644401F0F7D772B7752C04835ECF7C4564440A33B889D297752C026AAB706B656444087A4164A267752C0938E72309B5644403B6F63B3237752C050FD834886564440D7F7E120217752C00D6C956071564440132A38BC207752C07A8A1C226E564440315D88D51F7752C07E8E8F1667564440D4F02DAC1B7752C0ADA415DF505644408D4468041B7752C0952BBCCB45564440B88D06F0167752C0BB46CB811E564440A435069D107752C0C8E88024EC554440C9703C9F017752C0F01307D0EF55444083DE1B43007752C0855D143DF05544404EB4AB90F27652C0A69718CBF45544401ABE8575E37652C0C214E5D2F8554440293C6876DD7652C0807D74EACA5544403FABCC94D67652C0F58079C8945544405AD76839D07652C0B41D537765554440849ECDAACF7652C0272D5C56615544405DA79196CA7652C0D87F9D9B36554440331477BCC97652C06A10E6762F554440B41F2922C37652C07B82C476F75444406F2C280CCA7652C030815B77F35444405164ADA1D47652C0BC202235ED544440685BCD3AE37652C0F4311F10E8544440D6E429ABE97652C04203B16CE65444408B4E965AEF7652C0A23F34F3E454444080BA8102EF7652C0C77DAB75E2544440B515FBCBEE7652C0B64604E3E05444407C992842EA7652C02DEC6987BF544440F9BA0CFFE97652C028637C98BD544440363B527DE77652C0001B1021AE544440A359D93EE47652C0378AAC359454444027BA2EFCE07652C05C8E57207A5444403A765089EB7652C0DB17D00B7754444064744012F67652C059A148F77354444027C0B0FCF97652C054185B0872544440D1C952EBFD7652C0200BD1217054444092AD2EA7047752C0E083D72E6D544440F488D1730B7752C0CF807A336A544440A6B73F170D7752C0357A3540695444406F287CB60E7752C0CAF78C4468544440B3D0CE69167752C0A9BD88B663544440F678211D1E7752C0888384285F544440834F73F2227752C0E3361AC05B544440C2F693313E7752C0C05AB56B42544440F834272F327752C06684B70721544440C4758C2B2E7752C03D0801F9125444408D959867257752C00E4A9869FB53444022C2BF081A7752C0247F30F0DC534440EF1CCA50157752C03599F1B6D2534440C0B2D2A4147752C06551D845D15344409048DBF8137752C09509BFD4CF53444067B5C01E137752C01F0DA7CCCD5344403E22A644127752C0D9942BBCCB534440A71FD4450A7752C029B16B7BBB534440C0AF9124087752C0E95DBC1FB75344400856D5CBEF7652C018062CB98A534440F71BEDB8E17652C098A0866F615344406403E962D37652C03197546D375344404A22FB20CB7652C0765089EB185344402A1900AAB87652C0BE0F070951524440E386DF4DB77652C01F63EE5A425244400F7D772B4B7652C005A568E55E524440FB3F87F9F27552C07D224F92AE5144405793A7ACA67552C0D7C0560916514440BEDA519CA37552C0A44FABE80F514440745B22179C7552C0E2CCAFE600514440DCD6169E977552C00B43E4F4F5504440A93121E6927552C05E807D74EA504440D13FC1C58A7552C056ED9A90D6504440096B63EC847552C0AB92C83EC8504440AE80423D7D7552C04127840EBA50444040F7E5CC767552C0D0967329AE504440632827DA557552C0DEE7F86871504440C8ED974F567552C05646239F57504440211FF46C567552C03674B33F5050444015713AC9567552C059DC7F643A5044404AB20E47577552C028B682A62550444037AB3E575B7552C0F7AE415F7A4F444045460724617552C0A94885B1854E4440F62686E4647552C02D978DCEF94D444036AE7FD7677552C018AE0E80B84D4440B9E00CFE7E7552C0B01F6283854D4440446B459BE37552C0C5E23785954C444012A27C410B7652C03C1405FA444C4440588B4F01307652C0B058C345EE4B4440A6457D923B7652C07C28D192C74B44402C9CA4F9637652C0A2957B81594B4440A81ABD1AA07652C0300C5872154B4440FBC8AD49B77652C035272F32014B44404127840EBA7652C02AE109BDFE4A44401DCBBBEA017752C02172FA7ABE4A4440130CE71A667752C0C6A2E9EC644A44400A4B3CA06C7752C0BEF8A23D5E4A4440A5D93C0E837752C06473D53C474A4440FDBCA948857752C06B98A1F1444A4440F0C000C2877752C0F0DE5163424A4440D8817346947752C04450357A354A4440BF28417FA17752C08099EFE0274A44400A2DEBFEB17752C0BCAE5FB01B4A44407FF8F9EFC17752C08C0DDDEC0F4A444053C90050C57752C0B14B546F0D4A44402E71E481C87752C0BF61A2410A4A44401EFB592C457852C09F39EB538E494440056D72F8A47852C06D8E739B7049444036AD1402B97852C0D68BA19C68494440F59F353FFE7852C0BAA0BE654E494440289A07B0C87952C0C58F31772D4944406133C005D97952C0D862B7CF2A494440E1783E03EA7952C04DDA54DD2349444046B3B27DC87A52C06A11514CDE4844402F185C73477B52C0FCE25295B6484440A26131EA5A7B52C06A696E85B04844408499B67F657B52C036902E36AD4844404F8F6D19707B52C0C1C760C5A94844402E1D739EB17B52C02BDCF29194484440F9122A38BC7B52C0B5132521914844401021AE9CBD7B52C080D250A39048444081CEA44DD57B52C0431B800D88484440BBB88D06F07B52C076A38FF980484440B5A50EF27A7C52C07780272D5C484440F7C77BD5CA7C52C08AE5965643484440614D6551D87C52C05CFDD8243F484440E84CDA54DD7C52C03F1878EE3D4844409947FE60E07C52C05774EB353D484440AF0793E2E37C52C0FF5C34643C48444065A54929E87C52C0C45E28603B484440EFAB72A1F27C52C01F12BEF737484440D07D39B35D7D52C0075F984C1548444025AB22DC647D52C03D0801F912484440C39E76F86B7D52C0861C5BCF104844401211FE45D07F52C0F2CEA10C55474440B804E09F528252C0785C548B884644407615527E528252C0DB85E63A8D464440E2E5E95C518252C0BB270F0BB546444089B48D3F518252C0A7203F1BB94644400858AB764D8252C0F294D5743D474440CD565EF23F8252C07D7555A0164944401B28F04E3E8252C0E9F010C64F494440AAB4C5353E8252C0BDC117265349444032CB9E04368252C0F6285C8FC24944405111A7936C8252C09FE238F06A4B44402252D32EA68252C0BC02D193324D44404C50C3B7B08252C0F9F36DC1524D4440D26F5F07CE8252C0E34F5436AC4D4440A774B0FECF8252C0C266800BB24D4440A626C11BD28252C007431D56B84D4440EDD286C3D28252C0DC476E4DBA4D44402638F581E48252C04A5F0839EF4D444074779D0DF98252C0E3C281902C4E4440890629780A8352C016DC0F78604E44408315A75A0B8352C0E5EFDE51634E4440EA793716148352C036E84B6F7F4E44404703780B248352C0C24CDBBFB24E44403046240A2D8352C09BE09BA6CF4E4440A4C00298328352C02D776682E14E444055F833BC598352C09F91088D604F4440B3B27DC85B8352C08922A46E674F444075E789E76C8352C066118AADA04F44400D52F014728352C051F355F2B14F4440C5ABAC6D8A8352C0D4D00660035044403D7E6FD39F8352C05C1ABFF04A5044405051F52B9D8352C042B28009DC504440 -(1 row) - - test3 -------- - -(1 row) - - test4 -------- - -(1 row) - - test5 ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - 0106000020E6100000010000000103000000010000003500000056EF703B347C52C054FF2092215B44401B9AB2D30F7C52C03FE1ECD6325B4440B14B546F0D7C52C0BBCE86FC335B4440730F09DFFB7B52C0B796C9703C5B4440108FC4CBD37B52C0B96C74CE4F5B444001C0B167CF7B52C0ED0BE8853B5B4440C843DFDDCA7B52C05DDDB1D8265B4440A73D25E7C47B52C0D53BDC0E0D5B4440BB5E9A22C07B52C0F8A3A833F75A4440355F251FBB7B52C0B64604E3E05A444008910C39B67B52C098BF42E6CA5A44405227A089B07B52C0F204C24EB15A444024F1F274AE7B52C069E4F38AA75A44402B4A09C1AA7B52C06B63EC84975A4440E199D024B17B52C0546F0D6C955A44403C873254C57B52C02EAC1BEF8E5A44402593533BC37B52C0588AE42B815A4440973AC8EBC17B52C087890629785A44407A6F0C01C07B52C0E1EB6B5D6A5A44401B9B1DA9BE7B52C03F6F2A52615A444088855AD3BC7B52C088669E5C535A4440E1EA0088BB7B52C0E6E95C514A5A44400CE6AF90B97B52C070D05E7D3C5A44401E85EB51B87B52C0B03A72A4335A4440BAF3C473B67B52C09929ADBF255A4440CD920035B57B52C0454AB3791C5A4440F78DAF3DB37B52C0E09BA6CF0E5A4440DBC2F352B17B52C0703FE081015A444015C440D7BE7B52C05E83BEF4F659444041446ADAC57B52C0EFDFBC38F15944405FB1868BDC7B52C0C03E3A75E559444034BC5983F77B52C0205ED72FD8594440EFFCA204FD7B52C07E384888F25944403ACAC16C027C52C00876FC17085A444056478E74067C52C00FECF82F105A44400FECF82F107C52C0876D8B321B5A4440BB438A01127C52C0DE1CAED51E5A4440B9C15087157C52C034643C4A255A444099F221A81A7C52C0D0EFFB372F5A44404AED45B41D7C52C0785DBF60375A4440373465A71F7C52C065A71FD4455A4440C558A65F227C52C0D80DDB16655A4440F92EA52E197C52C09BA73AE4665A4440DEE522BE137C52C00664AF777F5A44405698BED7107C52C04759BF99985A444012D90759167C52C09430D3F6AF5A444044679945287C52C01F680586AC5A444049F086342A7C52C09CC3B5DAC35A44401FF5D72B2C7C52C0CB811E6ADB5A4440247EC51A2E7C52C0548B8862F25A4440FF59F3E32F7C52C0CB290131095B4440F96871C6307C52C09605137F145B444056EF703B347C52C054FF2092215B4440 -(1 row) - - test6 -------- - -(1 row) - - obs_getgeometryid_test1 -------------------------- - 36047048500 -(1 row) - - obs_getgeometryid_test2 -------------------------- - 36047048500 -(1 row) - - obs_getgeometryid_test3 -------------------------- - 36047 -(1 row) - - obs_getgeometryid_test4 -------------------------- - -(1 row) - - obs_getgeometrybyid --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - 0106000020E6100000010000000103000000010000002C0200005051F52B9D8352C042B28009DC50444093C2BCC7998352C0E89E758D965144402EFD4B52998352C09A07B0C8AF514440E75086AA988352C022FAB5F5D351444027874F3A918352C0A46B26DF6C53444018E945ED7E8352C04D81CCCEA25344401346B3B27D8352C05D50DF32A753444068226C787A8352C08D25AC8DB153444015C8EC2C7A8352C004560E2DB2534440DF8618AF798352C00FD07D39B3534440FEB627486C8352C0DC9E20B1DD534440B98C9B1A688352C05D328E91EC5344408B8A389D648352C0929048DBF853444075CAA31B618352C0986A662D05544440EA758BC0588352C0D6C397892254444048DFA469508352C0151DC9E53F544440B67F65A5498352C0F73DEAAF575444401403249A408352C05E2A36E6755444402367614F3B8352C06DE2E47E8754444011FC6F253B8352C0431B800D885444403E7958A8358352C0DD0A6135965444401D739EB12F8352C093DFA293A5544440FB04508C2C8352C035289A07B05444401EA4A7C8218352C0347F4C6BD3544440D7C05609168352C05053CBD6FA544440AC8E1CE90C8352C0C9AA083719554440FC8D76DCF08252C0BD18CA897655444048895DDBDB8252C0C3B7B06EBC554440698995D1C88252C032207BBDFB55444004A73E90BC8252C0DB4C857824564440321F10E84C8252C08862F20698574440BB0853944B8252C09831056B9C57444080F0A1444B8252C0D32F116F9D574440C7629B54348252C0418177F2E9574440CEA44DD53D8152C04F1F813FFC564440A51133FB3C8152C0F607CA6DFB5644404D2EC6C03A8152C0DD43C2F7FE564440C5C6BC8E388152C0F3035779025744404B3E7617288152C0C1340C1F11574440C99063EB198152C0BB6070CD1D57444086E5CFB7058152C001D9EBDD1F574440DD770C8FFD8052C09F573CF548574440E69315C3D58052C0BCE47FF2775744404852D2C3D08052C0122C0E677E574440581EA4A7C88052C084F068E388574440187AC4E8B98052C0336C94F59B5744400E828E56B58052C0A80018CFA0574440B7B24467998052C0C8409E5DBE574440BEA085048C8052C032ACE28DCC5744401215AA9B8B8052C0A8A8FA95CE574440B9313D61898052C01F2A8D98D9574440C6DFF604898052C0A8C5E061DA574440AA622AFD848052C0B5F81400E3574440BD1B0B0A838052C012656F29E75744406C91B41B7D8052C0745AB741ED5744408C2C9963798052C0D2FA5B02F05744403315E291788052C079AF5A99F0574440412B3064758052C0128255F5F25744401329CDE6718052C0B7CEBF5DF6574440FEB3E6C75F8052C00876FC1708584440B70721205F8052C04374081C09584440A7CD380D518052C0C00303081F5844400133DFC14F8052C001BF469220584440EA211ADD418052C07570B03731584440CD3CB9A6408052C015342DB13258444020B1DD3D408052C0B03A72A433584440BA66F2CD368052C09F3D97A9495844400EDB1665368052C08C9E5BE84A584440F3AB3940308052C05376FA415D584440880FECF82F8052C0115322895E584440C6DD205A2B8052C0DC7F643A74584440FC389A232B8052C0F4A78DEA74584440990F0874268052C0FDD64E9484584440A5BDC117268052C02C27A1F4855844407218CC5F218052C0F9BB77D498584440F65E7CD11E8052C0E8A1B60DA3584440C1374D9F1D8052C0BC3E73D6A758444022DC6454198052C00629780AB95844406519E258178052C0FF03AC55BB584440FA5FAE450B8052C05704FF5BC9584440D7A3703D0A8052C0F25B74B2D458444036ACA92C0A8052C00A849D62D55844407FDAA84E078052C006BAF605F45844408B8862F2068052C017F19D98F558444006F1811DFF7F52C04DBD6E111859444048FAB48AFE7F52C0CF6740BD195944407A1A3048FA7F52C0E6AC4F3926594440382BA226FA7F52C08D614ED0265944407A34D593F97F52C0081B9E5E29594440F8A3A833F77F52C03A58FFE7305944402AAA7EA5F37F52C0643C4A253C594440A7E507AEF27F52C0321CCF674059444063EFC517ED7F52C0438D429259594440B1A6B228EC7F52C0185E49F25C5944400DC2DCEEE57F52C09BAA7B6473594440EA059FE6E47F52C0C3D50110775944403B8DB454DE7F52C059F5B9DA8A594440A06CCA15DE7F52C094F3C5DE8B5944408509A359D97F52C0910C39B69E594440244223D8B87F52C0FE7A8505F7594440EF004F5AB87F52C08DD31055F85944409CDA19A6B67F52C03F53AF5B045A4440F7730AF2B37F52C05A9C31CC095A444009C21550A87F52C0077C7E18215A44409E3F6D54A77F52C00C056C07235A4440C3499A3FA67F52C0586E6935245A44407020240B987F52C080B6D5AC335A4440DDD0949D7E7F52C07383A10E2B5A44404E417E36727F52C0207A5226355A4440F4A44C6A687F52C0A2410A9E425A4440E92ADD5D677F52C061527C7C425A44407905A227657F52C03D7C9928425A4440791C06F3577F52C0D9EA724A405A4440F2B4FCC0557F52C08690F3FE3F5A4440FE7C5BB0547F52C0209738F2405A444052F17F47547F52C014E97E4E415A4440350C1F11537F52C0AF230ED9405A444098158A743F7F52C08F519E79395A44401ABD1AA0347F52C0A3586E69355A4440EB5223F4337F52C0207A5226355A4440A8AAD0402C7F52C0D89942E7355A44407C5EF1D4237F52C0613596B0365A44400227DBC01D7F52C007EA9447375A4440567E198C117F52C084D72E6D385A44402C7DE882FA7E52C0249BABE6395A4440D72FD80DDB7E52C0955F0663445A44401F2A8D98D97E52C0CBA0DAE0445A4440ACC612D6C67E52C0771211FE455A444026FBE769C07E52C06B64575A465A44400B7BDAE1AF7E52C023D5777E515A44407E8AE3C0AB7E52C0EBC37AA3565A4440268DD13AAA7E52C04F55A181585A4440525F96766A7E52C02502D53F885A4440A69C2FF65E7E52C003B16CE6905A44403B342C465D7E52C0D8B5BDDD925A444002B859BC587E52C0B20FB22C985A4440B0912408577E52C0871403249A5A444039950C00557E52C021E7FD7F9C5A4440D3139678407E52C015731074B45A444080ED60C43E7E52C0BAF3C473B65A4440FB3BDBA3377E52C074CC79C6BE5A44401BB7989F1B7E52C042E73576895A4440B01A4B581B7E52C03D2AFEEF885A4440D68C0C72177E52C07C60C77F815A44407EA99F37157E52C0AE80423D7D5A444053910A630B7E52C04A2366F6795A4440B7EEE6A90E7E52C0670E492D945A44401A4CC3F0117E52C0D829560DC25A444064AE0CAA0D7E52C0D74CBED9E65A4440D3687231067E52C07405DB88275B4440158C4AEA047E52C08D7E349C325B4440AB5791D1017E52C048BF7D1D385B4440268C6665FB7D52C0548A1D8D435B44405C1B2AC6F97D52C065187783685B4440FA0B3D62F47D52C03FE08101845B4440E2E313B2F37D52C03196E997885B444038F4160FEF7D52C05D50DF32A75B4440109546CCEC7D52C07FDB1324B65B44401C261AA4E07D52C0BA641C23D95B44405A0EF450DB7D52C0081F4AB4E45B4440BBB20B06D77D52C06E693524EE5B4440CE6BEC12D57D52C0FB592C45F25B444073672618CE7D52C09A0645F3005C4440BB7B80EECB7D52C0C7BAB88D065C4440F5F411F8C37D52C057E9EE3A1B5C44407B8670CCB27D52C09AB4A9BA475C4440240B98C0AD7D52C0282A1BD6545C4440E4839ECDAA7D52C0FA5E43705C5C4440E4805D4D9E7D52C08AAA5FE97C5C44401B2AC6F99B7D52C01C2444F9825C4440D3122BA3917D52C059F8FA5A975C4440A7ACA6EB897D52C0FD2D01F8A75C444007B5DFDA897D52C04818062CB95C44401EF7ADD6897D52C0399A232BBF5C444036397CD2897D52C0904946CEC25C444001DE02098A7D52C08A58C4B0C35C4440CB68E4F38A7D52C0527B116DC75C4440AD4F39268B7D52C0AB92C83EC85C4440531EDD088B7D52C0EB19C231CB5C4440C5C551B9897D52C070EB6E9EEA5C444077F4BF5C8B7D52C090149161155D44409BE447FC8A7D52C0161406651A5D4440D13FC1C58A7D52C0F792C6681D5D4440E3DEFC86897D52C0836C59BE2E5D44407EFFE6C5897D52C087C1FC15325D444071033E3F8C7D52C0DBA6785C545D44407C6308008E7D52C03FA6B5696C5D4440F42F49658A7D52C054FEB5BC725D4440713788D68A7D52C0ED9C6681765D44403CDC0E0D8B7D52C0B036C64E785D44403B8E1F2A8D7D52C066A3737E8A5D4440D3F88557927D52C07D0569C6A25D44407D022846967D52C0E5D4CE30B55D4440BFF1B567967D52C07C0BEBC6BB5D44409B012EC8967D52C0DE1D19ABCD5D44400AF31E679A7D52C0081F4AB4E45D4440D47D00529B7D52C0EBE1CB44115E44403F00A94D9C7D52C068774831405E4440F7393E5A9C7D52C04339D1AE425E44409831056B9C7D52C090A2CEDC435E444003B4AD669D7D52C086CABF96575E44402670EB6E9E7D52C0048E041A6C5E44409C69C2F6937D52C03259DC7F645E4440DDED7A698A7D52C047C8409E5D5E44407842AF3F897D52C0EEB089CC5C5E4440B053AC1A847D52C0859675FF585E444033FCA71B287D52C04D4A41B7975E444042942F68217D52C03F00A94D9C5E44404885B185207D52C0E5B4A7E49C5E4440751C3F541A7D52C0E318C91EA15E4440C26856B60F7D52C03A94A12AA65E4440FA7953910A7D52C093DFA293A55E444057923CD7F77C52C0C63368E89F5E444003CE52B29C7C52C06C239EEC665E44409AB33EE5987C52C020EEEA55645E4440DFC0E446917C52C0CF6394675E5E4440A70183A44F7C52C0B60E0EF6265E44400E0F61FC347C52C0CE88D2DEE05D4440E1404816307C52C01FD95C35CF5D444091B6F1272A7C52C0A7069ACFB95D444014C95702297C52C0CC785BE9B55D4440807F4A95287C52C0567C43E1B35D4440CE3637A6277C52C047AD307DAF5D4440DAFE9595267C52C07D569929AD5D4440FB90B75CFD7B52C02159C0046E5D4440876EF607CA7B52C078B130444E5D4440438CD7BCAA7B52C0321CCF67405D44401DC9E53FA47B52C0938C9C853D5D4440BBED42739D7B52C0111615713A5D444026FF93BF7B7B52C02BBD361B2B5D444039ECBE63787B52C091B6F1272A5D4440F2599E07777B52C0D40D1478275D4440A3005130637B52C01DFF0582005D4440A3AF20CD587B52C08AC6DADFD95C4440EB8F300C587B52C050FC1873D75C444003ECA353577B52C0E6ADBA0ED55C444003AF963B337B52C04694F6065F5C4440D13AAA9A207B52C0F0A485CB2A5C4440486B0C3A217B52C0B9DE3653215C4440E814E467237B52C065C57075005C44404F73F222137B52C08EC70C54C65B4440020D36751E7B52C0367689EAAD5B4440669E5C53207B52C0EA7420EBA95B4440A92C0ABB287B52C0D6FF39CC975B4440C2BCC799267B52C0E9B5D958895B4440B3075A81217B52C04276DEC6665B44405DDA70581A7B52C0535C55F65D5B4440C70BE9F0107B52C03526C45C525B444093C7D3F2037B52C08B338639415B44407E8978EBFC7A52C0FC1BB4571F5B4440D4B32094F77A52C0D061BEBC005B444016BD5301F77A52C09C887E6DFD5A4440887E6DFDF47A52C07B82C476F75A4440ECA4BE2CED7A52C0AE0AD462F05A4440846055BDFC7A52C0EF3A1BF2CF5A4440C1E09A3BFA7A52C072FC5069C45A444068C9E369F97A52C0D95DA0A4C05A4440A94D9CDCEF7A52C050711C78B55A4440321AF9BCE27A52C0FD2D01F8A75A44400F0D8B51D77A52C0F566D47C955A4440A5F27684D37A52C0EB54F99E915A4440C843DFDDCA7A52C02BBF0CC6885A44402A36E675C47A52C0DB68006F815A44405C70067FBF7A52C03D4162BB7B5A44405DA45016BE7A52C05C8E57207A5A44408D25AC8DB17A52C0681F2BF86D5A44404C4D8237A47A52C063450DA6615A4440419C8713987A52C0185B0872505A4440B6476FB88F7A52C058C51B99475A4440B8C9A8328C7A52C0BF266BD4435A4440FA9B5088807A52C0D9CD8C7E345A4440A70A4625757A52C0AA605452275A4440B28174B1697A52C0DC63E943175A4440888384285F7A52C04240BE840A5A44405DA27A6B607A52C085CB2A6C065A4440764F1E166A7A52C0D175E107E759444011397D3D5F7A52C0F0D93A38D85944404C3448C1537A52C05DA79196CA594440419DF2E8467A52C0DC476E4DBA594440088F368E587A52C048A7AE7C96594440A84F72874D7A52C0F42F49658A594440BBEB6CC83F7A52C092E9D0E979594440AEB8382A377A52C0329067976F594440B5C01E13297A52C03A00E2AE5E5944408235CEA6237A52C026A8E15B58594440682096CD1C7A52C0BF29AC545059444019E42EC2147A52C0813E912749594440B0FD648C0F7A52C04910AE80425944403A014D840D7A52C062A06B5F405944405F0B7A6F0C7A52C0B62E35423F594440959A3DD00A7A52C06308008E3D594440A86DC328087A52C09BE5B2D1395944402DE8BD31047A52C00F290648345944404B1B0E4B037A52C021C84109335944406A82A8FB007A52C004E3E0D2315944401E335019FF7952C0996038D730594440BF44BC75FE7952C0A051BAF42F594440EFFCA204FD7952C0FAD005F52D59444074779D0DF97952C03E90BC73285944407B681F2BF87952C021AB5B3D275944406917D34CF77952C00A83328D265944404084B872F67952C0C3D66CE525594440FFAECF9CF57952C04CA60A4625594440350A4966F57952C03A3B191C255944405323F433F57952C0F94B8BFA2459444077137CD3F47952C0A6F10BAF24594440942C27A1F47952C064027E8D24594440560DC2DCEE7952C05DC0CB0C1B594440755AB741ED7952C0410FB56D18594440D47C957CEC7952C053AEF02E17594440B1DAFCBFEA7952C0EEE87FB9165944402368CC24EA7952C0DC7D8E8F165944405FB4C70BE97952C089230F4416594440D0419770E87952C077B81D1A1659444065A54929E87952C0D7C05609165944409B00C3F2E77952C036C98FF815594440D42B6519E27952C047E350BF0B594440B2F4A10BEA7952C05C01857AFA58444009A4C4AEED7952C066F6798CF258444021037976F97952C06E15C440D75844409DD32CD0EE7952C0A46DFC89CA584440CE8B135FED7952C05247C7D5C85844408BFD65F7E47952C009168733BF5844401C40BFEFDF7952C0CBF6216FB9584440B33F506EDB7952C0747B4963B4584440C8940F41D57952C0B96E4A79AD584440FF06EDD5C77952C0D349B6BA9C58444093331477BC7952C0B77BB94F8E5844400C0055DCB87952C03605323B8B584440F068E388B57952C0C6F99B50885844401E34BBEEAD7952C0179B560A8158444085B2F0F5B57952C0BCADF4DA6C584440BAD91F28B77952C0ACAA97DF69584440BABC395CAB7952C006B64AB03858444014EB54F99E7952C01188D7F50B584440A98592C9A97952C0691A14CD0358444093FDF334607952C06C205D6C5A574440170D198F527952C01A8524B37A57444005854199467952C0AD6C1FF2965744409F3A56293D7952C02C98F8A3A85744401230BABC397952C0B2632310AF574440DD2230D6377952C0691B7FA2B257444061FBC9181F7952C097A608707A5744403140A209147952C05017299485574440567E198C117952C02BD9B111885744407BBC900E0F7952C0D7169E978A5744407FDAA84E077952C002637D039357444083F8C08EFF7852C0FE2AC0779B57444087307E1AF77852C0E1968FA4A4574440B515FBCBEE7852C0E449D235935744407F69519FE47852C065A9F57EA3574440EACE13CFD97852C0B6847CD0B35744402B8716D9CE7852C0CB7EDDE9CE5744408F8D40BCAE7852C070D1C952EB574440AF08FEB7927852C0EF1989D0085844403FFD67CD8F7852C0719010E50B5844401C2785798F7852C0764D486B0C584440F697DD93877852C0ACAB02B51858444037363B527D7852C0093543AA28584440C3D50110777852C09355116E32584440EEE714E4677852C03387A4164A584440717500C45D7852C07EA5F3E1595844405791D101497852C09D7DE5417A5844401AC1C6F5EF7752C0B9162D40DB5844400F7C0C569C7752C03EE8D9ACFA58444005508C2C997752C09259BDC3ED584440AC38D55A987752C0D1217024D0584440533BC3D4967752C04B5645B8C9584440E7FF55478E7752C05DC2A1B7785844402FFA0AD28C7752C0581CCEFC6A584440DCB930D28B7752C021567F8461584440FB20CB82897752C062D7F6764B58444079909E22877752C0D89942E7355844408C63247B847752C0B58993FB1D584440ACE46377817752C0677E350708584440C6C210397D7752C0B2F4A10BEA57444074B680D07A7752C0909DB7B1D9574440DB317557767752C0077767EDB65744409A7631CD747752C02D7B12D89C5744400D6C9560717752C054FEB5BC72574440FC34EECD6F7752C0A3E6ABE4635744409E7AA4C16D7752C0D1949D7E50574440FE9C82FC6C7752C0E046CA16495744401E4FCB0F5C7752C09B53C90050574440D503E621537752C0E063B0E25457444037DC476E4D7752C032569BFF5757444070ED4449487752C0836C59BE2E57444066F50EB7437752C054C554FA0957444032022A1C417752C0713C9F01F55644404487C091407752C01F7EFE7BF05644406E4E2503407752C05D4C33DDEB56444088F546AD307752C03ECBF3E0EE5644401F0F7D772B7752C04835ECF7C4564440A33B889D297752C026AAB706B656444087A4164A267752C0938E72309B5644403B6F63B3237752C050FD834886564440D7F7E120217752C00D6C956071564440132A38BC207752C07A8A1C226E564440315D88D51F7752C07E8E8F1667564440D4F02DAC1B7752C0ADA415DF505644408D4468041B7752C0952BBCCB45564440B88D06F0167752C0BB46CB811E564440A435069D107752C0C8E88024EC554440C9703C9F017752C0F01307D0EF55444083DE1B43007752C0855D143DF05544404EB4AB90F27652C0A69718CBF45544401ABE8575E37652C0C214E5D2F8554440293C6876DD7652C0807D74EACA5544403FABCC94D67652C0F58079C8945544405AD76839D07652C0B41D537765554440849ECDAACF7652C0272D5C56615544405DA79196CA7652C0D87F9D9B36554440331477BCC97652C06A10E6762F554440B41F2922C37652C07B82C476F75444406F2C280CCA7652C030815B77F35444405164ADA1D47652C0BC202235ED544440685BCD3AE37652C0F4311F10E8544440D6E429ABE97652C04203B16CE65444408B4E965AEF7652C0A23F34F3E454444080BA8102EF7652C0C77DAB75E2544440B515FBCBEE7652C0B64604E3E05444407C992842EA7652C02DEC6987BF544440F9BA0CFFE97652C028637C98BD544440363B527DE77652C0001B1021AE544440A359D93EE47652C0378AAC359454444027BA2EFCE07652C05C8E57207A5444403A765089EB7652C0DB17D00B7754444064744012F67652C059A148F77354444027C0B0FCF97652C054185B0872544440D1C952EBFD7652C0200BD1217054444092AD2EA7047752C0E083D72E6D544440F488D1730B7752C0CF807A336A544440A6B73F170D7752C0357A3540695444406F287CB60E7752C0CAF78C4468544440B3D0CE69167752C0A9BD88B663544440F678211D1E7752C0888384285F544440834F73F2227752C0E3361AC05B544440C2F693313E7752C0C05AB56B42544440F834272F327752C06684B70721544440C4758C2B2E7752C03D0801F9125444408D959867257752C00E4A9869FB53444022C2BF081A7752C0247F30F0DC534440EF1CCA50157752C03599F1B6D2534440C0B2D2A4147752C06551D845D15344409048DBF8137752C09509BFD4CF53444067B5C01E137752C01F0DA7CCCD5344403E22A644127752C0D9942BBCCB534440A71FD4450A7752C029B16B7BBB534440C0AF9124087752C0E95DBC1FB75344400856D5CBEF7652C018062CB98A534440F71BEDB8E17652C098A0866F615344406403E962D37652C03197546D375344404A22FB20CB7652C0765089EB185344402A1900AAB87652C0BE0F070951524440E386DF4DB77652C01F63EE5A425244400F7D772B4B7652C005A568E55E524440FB3F87F9F27552C07D224F92AE5144405793A7ACA67552C0D7C0560916514440BEDA519CA37552C0A44FABE80F514440745B22179C7552C0E2CCAFE600514440DCD6169E977552C00B43E4F4F5504440A93121E6927552C05E807D74EA504440D13FC1C58A7552C056ED9A90D6504440096B63EC847552C0AB92C83EC8504440AE80423D7D7552C04127840EBA50444040F7E5CC767552C0D0967329AE504440632827DA557552C0DEE7F86871504440C8ED974F567552C05646239F57504440211FF46C567552C03674B33F5050444015713AC9567552C059DC7F643A5044404AB20E47577552C028B682A62550444037AB3E575B7552C0F7AE415F7A4F444045460724617552C0A94885B1854E4440F62686E4647552C02D978DCEF94D444036AE7FD7677552C018AE0E80B84D4440B9E00CFE7E7552C0B01F6283854D4440446B459BE37552C0C5E23785954C444012A27C410B7652C03C1405FA444C4440588B4F01307652C0B058C345EE4B4440A6457D923B7652C07C28D192C74B44402C9CA4F9637652C0A2957B81594B4440A81ABD1AA07652C0300C5872154B4440FBC8AD49B77652C035272F32014B44404127840EBA7652C02AE109BDFE4A44401DCBBBEA017752C02172FA7ABE4A4440130CE71A667752C0C6A2E9EC644A44400A4B3CA06C7752C0BEF8A23D5E4A4440A5D93C0E837752C06473D53C474A4440FDBCA948857752C06B98A1F1444A4440F0C000C2877752C0F0DE5163424A4440D8817346947752C04450357A354A4440BF28417FA17752C08099EFE0274A44400A2DEBFEB17752C0BCAE5FB01B4A44407FF8F9EFC17752C08C0DDDEC0F4A444053C90050C57752C0B14B546F0D4A44402E71E481C87752C0BF61A2410A4A44401EFB592C457852C09F39EB538E494440056D72F8A47852C06D8E739B7049444036AD1402B97852C0D68BA19C68494440F59F353FFE7852C0BAA0BE654E494440289A07B0C87952C0C58F31772D4944406133C005D97952C0D862B7CF2A494440E1783E03EA7952C04DDA54DD2349444046B3B27DC87A52C06A11514CDE4844402F185C73477B52C0FCE25295B6484440A26131EA5A7B52C06A696E85B04844408499B67F657B52C036902E36AD4844404F8F6D19707B52C0C1C760C5A94844402E1D739EB17B52C02BDCF29194484440F9122A38BC7B52C0B5132521914844401021AE9CBD7B52C080D250A39048444081CEA44DD57B52C0431B800D88484440BBB88D06F07B52C076A38FF980484440B5A50EF27A7C52C07780272D5C484440F7C77BD5CA7C52C08AE5965643484440614D6551D87C52C05CFDD8243F484440E84CDA54DD7C52C03F1878EE3D4844409947FE60E07C52C05774EB353D484440AF0793E2E37C52C0FF5C34643C48444065A54929E87C52C0C45E28603B484440EFAB72A1F27C52C01F12BEF737484440D07D39B35D7D52C0075F984C1548444025AB22DC647D52C03D0801F912484440C39E76F86B7D52C0861C5BCF104844401211FE45D07F52C0F2CEA10C55474440B804E09F528252C0785C548B884644407615527E528252C0DB85E63A8D464440E2E5E95C518252C0BB270F0BB546444089B48D3F518252C0A7203F1BB94644400858AB764D8252C0F294D5743D474440CD565EF23F8252C07D7555A0164944401B28F04E3E8252C0E9F010C64F494440AAB4C5353E8252C0BDC117265349444032CB9E04368252C0F6285C8FC24944405111A7936C8252C09FE238F06A4B44402252D32EA68252C0BC02D193324D44404C50C3B7B08252C0F9F36DC1524D4440D26F5F07CE8252C0E34F5436AC4D4440A774B0FECF8252C0C266800BB24D4440A626C11BD28252C007431D56B84D4440EDD286C3D28252C0DC476E4DBA4D44402638F581E48252C04A5F0839EF4D444074779D0DF98252C0E3C281902C4E4440890629780A8352C016DC0F78604E44408315A75A0B8352C0E5EFDE51634E4440EA793716148352C036E84B6F7F4E44404703780B248352C0C24CDBBFB24E44403046240A2D8352C09BE09BA6CF4E4440A4C00298328352C02D776682E14E444055F833BC598352C09F91088D604F4440B3B27DC85B8352C08922A46E674F444075E789E76C8352C066118AADA04F44400D52F014728352C051F355F2B14F4440C5ABAC6D8A8352C0D4D00660035044403D7E6FD39F8352C05C1ABFF04A5044405051F52B9D8352C042B28009DC504440 -(1 row) - - ?column? ----------- - t -(1 row) - - obs_getgeometrybyid ---------------------- - -(1 row) - -Dropping obs_table.sql fixture table... -Done. -Dropping obs_column.sql fixture table... -Done. -Dropping obs_column_table.sql fixture table... -Done. -Dropping obs_column_to_column.sql fixture table... -Done. -Dropping obs_85328201013baa14e8e8a4a57a01e6f6fbc5f9b1 fixture table... -Done. -Dropping obs_3e7cc9cfd403b912c57b42d5f9195af9ce2f3cdb fixture table... -Done. -Dropping obs_ab038198aaab3f3cb055758638ee4de28ad70146 fixture table... -Done. -Dropping obs_a92e1111ad3177676471d66bb8036e6d057f271b fixture table... -Done. -Dropping obs_11ee8b82c877c073438bc935a91d3dfccef875d1 fixture table... -Done. -Dropping obs_d34555209878e8c4b37cf0b2b3d072ff129ec470 fixture table... -Done. -Dropping obs_b0ef6dd68d5faddbf231fd7f02916b3d00ec43c4 fixture table... -Done. diff --git a/src/pg/test/expected/44_observatory_geometries_test.out b/src/pg/test/expected/44_observatory_geometries_test.out new file mode 100644 index 0000000..cbecc1f --- /dev/null +++ b/src/pg/test/expected/44_observatory_geometries_test.out @@ -0,0 +1,89 @@ +\i test/sql/load_fixtures.sql +SET client_min_messages TO WARNING; +\set ECHO none +Loading obs_table.sql fixture file... +Done. +Loading obs_column.sql fixture file... +Done. +Loading obs_column_table.sql fixture file... +Done. +Loading obs_column_to_column.sql fixture file... +Done. +Loading obs_85328201013baa14e8e8a4a57a01e6f6fbc5f9b1.sql fixture file... +Done. +Loading obs_3e7cc9cfd403b912c57b42d5f9195af9ce2f3cdb.sql fixture file... +Done. +Loading obs_ab038198aaab3f3cb055758638ee4de28ad70146.sql fixture file... +Done. +Loading obs_a92e1111ad3177676471d66bb8036e6d057f271b.sql fixture file... +Done. +Loading obs_11ee8b82c877c073438bc935a91d3dfccef875d1.sql fixture file... +Done. +Loading obs_d34555209878e8c4b37cf0b2b3d072ff129ec470.sql fixture file... +Done. +Loading obs_b0ef6dd68d5faddbf231fd7f02916b3d00ec43c4.sql fixture file... +Done. +obs_getgeometry_cartodb_census_tract +t +(1 row) +obs_getgeometry_cartodb_county +t +(1 row) +obs_getgeometry_non_existent_boundary_id +t +(1 row) +obs_getgeometry_null_island_census_tract +t +(1 row) +obs_getgeometry_year_census_tract +t +(1 row) +obs_getgeometry_unlisted_year +t +(1 row) +obs_getgeometryid_cartodb_census_tract +t +(1 row) +obs_getgeometryid_cartodb_census_tract_with_year +t +(1 row) +obs_getgeometryid_cartodb_county_with_year +t +(1 row) +obs_getgeometryid_null_island +t +(1 row) +obs_getgeometrybyid_cartodb_county +t +(1 row) +obs_getgeometrybyid_compared_with_obs_getgeometry +t +(1 row) +obs_getgeometrybyid_boundary_id_mismatch_geom_id +t +(1 row) +obs_getgeometrybyid_boundary_id_mismatch_geom_id +t +(1 row) +Dropping obs_table.sql fixture table... +Done. +Dropping obs_column.sql fixture table... +Done. +Dropping obs_column_table.sql fixture table... +Done. +Dropping obs_column_to_column.sql fixture table... +Done. +Dropping obs_85328201013baa14e8e8a4a57a01e6f6fbc5f9b1 fixture table... +Done. +Dropping obs_3e7cc9cfd403b912c57b42d5f9195af9ce2f3cdb fixture table... +Done. +Dropping obs_ab038198aaab3f3cb055758638ee4de28ad70146 fixture table... +Done. +Dropping obs_a92e1111ad3177676471d66bb8036e6d057f271b fixture table... +Done. +Dropping obs_11ee8b82c877c073438bc935a91d3dfccef875d1 fixture table... +Done. +Dropping obs_d34555209878e8c4b37cf0b2b3d072ff129ec470 fixture table... +Done. +Dropping obs_b0ef6dd68d5faddbf231fd7f02916b3d00ec43c4 fixture table... +Done. From 55bbe55b4ad7885377336492603d8f0a1e0931c4 Mon Sep 17 00:00:00 2001 From: Andy Eschbacher Date: Fri, 22 Apr 2016 21:21:18 -0400 Subject: [PATCH 24/41] adding tests for getgeometry* --- .../sql/44_observatory_geometries_test.sql | 115 ++++++++++++++++++ 1 file changed, 115 insertions(+) create mode 100644 src/pg/test/sql/44_observatory_geometries_test.sql diff --git a/src/pg/test/sql/44_observatory_geometries_test.sql b/src/pg/test/sql/44_observatory_geometries_test.sql new file mode 100644 index 0000000..5f24928 --- /dev/null +++ b/src/pg/test/sql/44_observatory_geometries_test.sql @@ -0,0 +1,115 @@ +\i test/sql/load_fixtures.sql +\pset format unaligned + +-- set up variables for use in testing + +\set cartodb_census_tract_geometry '0106000020E6100000010000000103000000010000003500000056EF703B347C52C054FF2092215B44401B9AB2D30F7C52C03FE1ECD6325B4440B14B546F0D7C52C0BBCE86FC335B4440730F09DFFB7B52C0B796C9703C5B4440108FC4CBD37B52C0B96C74CE4F5B444001C0B167CF7B52C0ED0BE8853B5B4440C843DFDDCA7B52C05DDDB1D8265B4440A73D25E7C47B52C0D53BDC0E0D5B4440BB5E9A22C07B52C0F8A3A833F75A4440355F251FBB7B52C0B64604E3E05A444008910C39B67B52C098BF42E6CA5A44405227A089B07B52C0F204C24EB15A444024F1F274AE7B52C069E4F38AA75A44402B4A09C1AA7B52C06B63EC84975A4440E199D024B17B52C0546F0D6C955A44403C873254C57B52C02EAC1BEF8E5A44402593533BC37B52C0588AE42B815A4440973AC8EBC17B52C087890629785A44407A6F0C01C07B52C0E1EB6B5D6A5A44401B9B1DA9BE7B52C03F6F2A52615A444088855AD3BC7B52C088669E5C535A4440E1EA0088BB7B52C0E6E95C514A5A44400CE6AF90B97B52C070D05E7D3C5A44401E85EB51B87B52C0B03A72A4335A4440BAF3C473B67B52C09929ADBF255A4440CD920035B57B52C0454AB3791C5A4440F78DAF3DB37B52C0E09BA6CF0E5A4440DBC2F352B17B52C0703FE081015A444015C440D7BE7B52C05E83BEF4F659444041446ADAC57B52C0EFDFBC38F15944405FB1868BDC7B52C0C03E3A75E559444034BC5983F77B52C0205ED72FD8594440EFFCA204FD7B52C07E384888F25944403ACAC16C027C52C00876FC17085A444056478E74067C52C00FECF82F105A44400FECF82F107C52C0876D8B321B5A4440BB438A01127C52C0DE1CAED51E5A4440B9C15087157C52C034643C4A255A444099F221A81A7C52C0D0EFFB372F5A44404AED45B41D7C52C0785DBF60375A4440373465A71F7C52C065A71FD4455A4440C558A65F227C52C0D80DDB16655A4440F92EA52E197C52C09BA73AE4665A4440DEE522BE137C52C00664AF777F5A44405698BED7107C52C04759BF99985A444012D90759167C52C09430D3F6AF5A444044679945287C52C01F680586AC5A444049F086342A7C52C09CC3B5DAC35A44401FF5D72B2C7C52C0CB811E6ADB5A4440247EC51A2E7C52C0548B8862F25A4440FF59F3E32F7C52C0CB290131095B4440F96871C6307C52C09605137F145B444056EF703B347C52C054FF2092215B4440' + +\set cartodb_county_geometry '0106000020E6100000010000000103000000010000002C0200005051F52B9D8352C042B28009DC50444093C2BCC7998352C0E89E758D965144402EFD4B52998352C09A07B0C8AF514440E75086AA988352C022FAB5F5D351444027874F3A918352C0A46B26DF6C53444018E945ED7E8352C04D81CCCEA25344401346B3B27D8352C05D50DF32A753444068226C787A8352C08D25AC8DB153444015C8EC2C7A8352C004560E2DB2534440DF8618AF798352C00FD07D39B3534440FEB627486C8352C0DC9E20B1DD534440B98C9B1A688352C05D328E91EC5344408B8A389D648352C0929048DBF853444075CAA31B618352C0986A662D05544440EA758BC0588352C0D6C397892254444048DFA469508352C0151DC9E53F544440B67F65A5498352C0F73DEAAF575444401403249A408352C05E2A36E6755444402367614F3B8352C06DE2E47E8754444011FC6F253B8352C0431B800D885444403E7958A8358352C0DD0A6135965444401D739EB12F8352C093DFA293A5544440FB04508C2C8352C035289A07B05444401EA4A7C8218352C0347F4C6BD3544440D7C05609168352C05053CBD6FA544440AC8E1CE90C8352C0C9AA083719554440FC8D76DCF08252C0BD18CA897655444048895DDBDB8252C0C3B7B06EBC554440698995D1C88252C032207BBDFB55444004A73E90BC8252C0DB4C857824564440321F10E84C8252C08862F20698574440BB0853944B8252C09831056B9C57444080F0A1444B8252C0D32F116F9D574440C7629B54348252C0418177F2E9574440CEA44DD53D8152C04F1F813FFC564440A51133FB3C8152C0F607CA6DFB5644404D2EC6C03A8152C0DD43C2F7FE564440C5C6BC8E388152C0F3035779025744404B3E7617288152C0C1340C1F11574440C99063EB198152C0BB6070CD1D57444086E5CFB7058152C001D9EBDD1F574440DD770C8FFD8052C09F573CF548574440E69315C3D58052C0BCE47FF2775744404852D2C3D08052C0122C0E677E574440581EA4A7C88052C084F068E388574440187AC4E8B98052C0336C94F59B5744400E828E56B58052C0A80018CFA0574440B7B24467998052C0C8409E5DBE574440BEA085048C8052C032ACE28DCC5744401215AA9B8B8052C0A8A8FA95CE574440B9313D61898052C01F2A8D98D9574440C6DFF604898052C0A8C5E061DA574440AA622AFD848052C0B5F81400E3574440BD1B0B0A838052C012656F29E75744406C91B41B7D8052C0745AB741ED5744408C2C9963798052C0D2FA5B02F05744403315E291788052C079AF5A99F0574440412B3064758052C0128255F5F25744401329CDE6718052C0B7CEBF5DF6574440FEB3E6C75F8052C00876FC1708584440B70721205F8052C04374081C09584440A7CD380D518052C0C00303081F5844400133DFC14F8052C001BF469220584440EA211ADD418052C07570B03731584440CD3CB9A6408052C015342DB13258444020B1DD3D408052C0B03A72A433584440BA66F2CD368052C09F3D97A9495844400EDB1665368052C08C9E5BE84A584440F3AB3940308052C05376FA415D584440880FECF82F8052C0115322895E584440C6DD205A2B8052C0DC7F643A74584440FC389A232B8052C0F4A78DEA74584440990F0874268052C0FDD64E9484584440A5BDC117268052C02C27A1F4855844407218CC5F218052C0F9BB77D498584440F65E7CD11E8052C0E8A1B60DA3584440C1374D9F1D8052C0BC3E73D6A758444022DC6454198052C00629780AB95844406519E258178052C0FF03AC55BB584440FA5FAE450B8052C05704FF5BC9584440D7A3703D0A8052C0F25B74B2D458444036ACA92C0A8052C00A849D62D55844407FDAA84E078052C006BAF605F45844408B8862F2068052C017F19D98F558444006F1811DFF7F52C04DBD6E111859444048FAB48AFE7F52C0CF6740BD195944407A1A3048FA7F52C0E6AC4F3926594440382BA226FA7F52C08D614ED0265944407A34D593F97F52C0081B9E5E29594440F8A3A833F77F52C03A58FFE7305944402AAA7EA5F37F52C0643C4A253C594440A7E507AEF27F52C0321CCF674059444063EFC517ED7F52C0438D429259594440B1A6B228EC7F52C0185E49F25C5944400DC2DCEEE57F52C09BAA7B6473594440EA059FE6E47F52C0C3D50110775944403B8DB454DE7F52C059F5B9DA8A594440A06CCA15DE7F52C094F3C5DE8B5944408509A359D97F52C0910C39B69E594440244223D8B87F52C0FE7A8505F7594440EF004F5AB87F52C08DD31055F85944409CDA19A6B67F52C03F53AF5B045A4440F7730AF2B37F52C05A9C31CC095A444009C21550A87F52C0077C7E18215A44409E3F6D54A77F52C00C056C07235A4440C3499A3FA67F52C0586E6935245A44407020240B987F52C080B6D5AC335A4440DDD0949D7E7F52C07383A10E2B5A44404E417E36727F52C0207A5226355A4440F4A44C6A687F52C0A2410A9E425A4440E92ADD5D677F52C061527C7C425A44407905A227657F52C03D7C9928425A4440791C06F3577F52C0D9EA724A405A4440F2B4FCC0557F52C08690F3FE3F5A4440FE7C5BB0547F52C0209738F2405A444052F17F47547F52C014E97E4E415A4440350C1F11537F52C0AF230ED9405A444098158A743F7F52C08F519E79395A44401ABD1AA0347F52C0A3586E69355A4440EB5223F4337F52C0207A5226355A4440A8AAD0402C7F52C0D89942E7355A44407C5EF1D4237F52C0613596B0365A44400227DBC01D7F52C007EA9447375A4440567E198C117F52C084D72E6D385A44402C7DE882FA7E52C0249BABE6395A4440D72FD80DDB7E52C0955F0663445A44401F2A8D98D97E52C0CBA0DAE0445A4440ACC612D6C67E52C0771211FE455A444026FBE769C07E52C06B64575A465A44400B7BDAE1AF7E52C023D5777E515A44407E8AE3C0AB7E52C0EBC37AA3565A4440268DD13AAA7E52C04F55A181585A4440525F96766A7E52C02502D53F885A4440A69C2FF65E7E52C003B16CE6905A44403B342C465D7E52C0D8B5BDDD925A444002B859BC587E52C0B20FB22C985A4440B0912408577E52C0871403249A5A444039950C00557E52C021E7FD7F9C5A4440D3139678407E52C015731074B45A444080ED60C43E7E52C0BAF3C473B65A4440FB3BDBA3377E52C074CC79C6BE5A44401BB7989F1B7E52C042E73576895A4440B01A4B581B7E52C03D2AFEEF885A4440D68C0C72177E52C07C60C77F815A44407EA99F37157E52C0AE80423D7D5A444053910A630B7E52C04A2366F6795A4440B7EEE6A90E7E52C0670E492D945A44401A4CC3F0117E52C0D829560DC25A444064AE0CAA0D7E52C0D74CBED9E65A4440D3687231067E52C07405DB88275B4440158C4AEA047E52C08D7E349C325B4440AB5791D1017E52C048BF7D1D385B4440268C6665FB7D52C0548A1D8D435B44405C1B2AC6F97D52C065187783685B4440FA0B3D62F47D52C03FE08101845B4440E2E313B2F37D52C03196E997885B444038F4160FEF7D52C05D50DF32A75B4440109546CCEC7D52C07FDB1324B65B44401C261AA4E07D52C0BA641C23D95B44405A0EF450DB7D52C0081F4AB4E45B4440BBB20B06D77D52C06E693524EE5B4440CE6BEC12D57D52C0FB592C45F25B444073672618CE7D52C09A0645F3005C4440BB7B80EECB7D52C0C7BAB88D065C4440F5F411F8C37D52C057E9EE3A1B5C44407B8670CCB27D52C09AB4A9BA475C4440240B98C0AD7D52C0282A1BD6545C4440E4839ECDAA7D52C0FA5E43705C5C4440E4805D4D9E7D52C08AAA5FE97C5C44401B2AC6F99B7D52C01C2444F9825C4440D3122BA3917D52C059F8FA5A975C4440A7ACA6EB897D52C0FD2D01F8A75C444007B5DFDA897D52C04818062CB95C44401EF7ADD6897D52C0399A232BBF5C444036397CD2897D52C0904946CEC25C444001DE02098A7D52C08A58C4B0C35C4440CB68E4F38A7D52C0527B116DC75C4440AD4F39268B7D52C0AB92C83EC85C4440531EDD088B7D52C0EB19C231CB5C4440C5C551B9897D52C070EB6E9EEA5C444077F4BF5C8B7D52C090149161155D44409BE447FC8A7D52C0161406651A5D4440D13FC1C58A7D52C0F792C6681D5D4440E3DEFC86897D52C0836C59BE2E5D44407EFFE6C5897D52C087C1FC15325D444071033E3F8C7D52C0DBA6785C545D44407C6308008E7D52C03FA6B5696C5D4440F42F49658A7D52C054FEB5BC725D4440713788D68A7D52C0ED9C6681765D44403CDC0E0D8B7D52C0B036C64E785D44403B8E1F2A8D7D52C066A3737E8A5D4440D3F88557927D52C07D0569C6A25D44407D022846967D52C0E5D4CE30B55D4440BFF1B567967D52C07C0BEBC6BB5D44409B012EC8967D52C0DE1D19ABCD5D44400AF31E679A7D52C0081F4AB4E45D4440D47D00529B7D52C0EBE1CB44115E44403F00A94D9C7D52C068774831405E4440F7393E5A9C7D52C04339D1AE425E44409831056B9C7D52C090A2CEDC435E444003B4AD669D7D52C086CABF96575E44402670EB6E9E7D52C0048E041A6C5E44409C69C2F6937D52C03259DC7F645E4440DDED7A698A7D52C047C8409E5D5E44407842AF3F897D52C0EEB089CC5C5E4440B053AC1A847D52C0859675FF585E444033FCA71B287D52C04D4A41B7975E444042942F68217D52C03F00A94D9C5E44404885B185207D52C0E5B4A7E49C5E4440751C3F541A7D52C0E318C91EA15E4440C26856B60F7D52C03A94A12AA65E4440FA7953910A7D52C093DFA293A55E444057923CD7F77C52C0C63368E89F5E444003CE52B29C7C52C06C239EEC665E44409AB33EE5987C52C020EEEA55645E4440DFC0E446917C52C0CF6394675E5E4440A70183A44F7C52C0B60E0EF6265E44400E0F61FC347C52C0CE88D2DEE05D4440E1404816307C52C01FD95C35CF5D444091B6F1272A7C52C0A7069ACFB95D444014C95702297C52C0CC785BE9B55D4440807F4A95287C52C0567C43E1B35D4440CE3637A6277C52C047AD307DAF5D4440DAFE9595267C52C07D569929AD5D4440FB90B75CFD7B52C02159C0046E5D4440876EF607CA7B52C078B130444E5D4440438CD7BCAA7B52C0321CCF67405D44401DC9E53FA47B52C0938C9C853D5D4440BBED42739D7B52C0111615713A5D444026FF93BF7B7B52C02BBD361B2B5D444039ECBE63787B52C091B6F1272A5D4440F2599E07777B52C0D40D1478275D4440A3005130637B52C01DFF0582005D4440A3AF20CD587B52C08AC6DADFD95C4440EB8F300C587B52C050FC1873D75C444003ECA353577B52C0E6ADBA0ED55C444003AF963B337B52C04694F6065F5C4440D13AAA9A207B52C0F0A485CB2A5C4440486B0C3A217B52C0B9DE3653215C4440E814E467237B52C065C57075005C44404F73F222137B52C08EC70C54C65B4440020D36751E7B52C0367689EAAD5B4440669E5C53207B52C0EA7420EBA95B4440A92C0ABB287B52C0D6FF39CC975B4440C2BCC799267B52C0E9B5D958895B4440B3075A81217B52C04276DEC6665B44405DDA70581A7B52C0535C55F65D5B4440C70BE9F0107B52C03526C45C525B444093C7D3F2037B52C08B338639415B44407E8978EBFC7A52C0FC1BB4571F5B4440D4B32094F77A52C0D061BEBC005B444016BD5301F77A52C09C887E6DFD5A4440887E6DFDF47A52C07B82C476F75A4440ECA4BE2CED7A52C0AE0AD462F05A4440846055BDFC7A52C0EF3A1BF2CF5A4440C1E09A3BFA7A52C072FC5069C45A444068C9E369F97A52C0D95DA0A4C05A4440A94D9CDCEF7A52C050711C78B55A4440321AF9BCE27A52C0FD2D01F8A75A44400F0D8B51D77A52C0F566D47C955A4440A5F27684D37A52C0EB54F99E915A4440C843DFDDCA7A52C02BBF0CC6885A44402A36E675C47A52C0DB68006F815A44405C70067FBF7A52C03D4162BB7B5A44405DA45016BE7A52C05C8E57207A5A44408D25AC8DB17A52C0681F2BF86D5A44404C4D8237A47A52C063450DA6615A4440419C8713987A52C0185B0872505A4440B6476FB88F7A52C058C51B99475A4440B8C9A8328C7A52C0BF266BD4435A4440FA9B5088807A52C0D9CD8C7E345A4440A70A4625757A52C0AA605452275A4440B28174B1697A52C0DC63E943175A4440888384285F7A52C04240BE840A5A44405DA27A6B607A52C085CB2A6C065A4440764F1E166A7A52C0D175E107E759444011397D3D5F7A52C0F0D93A38D85944404C3448C1537A52C05DA79196CA594440419DF2E8467A52C0DC476E4DBA594440088F368E587A52C048A7AE7C96594440A84F72874D7A52C0F42F49658A594440BBEB6CC83F7A52C092E9D0E979594440AEB8382A377A52C0329067976F594440B5C01E13297A52C03A00E2AE5E5944408235CEA6237A52C026A8E15B58594440682096CD1C7A52C0BF29AC545059444019E42EC2147A52C0813E912749594440B0FD648C0F7A52C04910AE80425944403A014D840D7A52C062A06B5F405944405F0B7A6F0C7A52C0B62E35423F594440959A3DD00A7A52C06308008E3D594440A86DC328087A52C09BE5B2D1395944402DE8BD31047A52C00F290648345944404B1B0E4B037A52C021C84109335944406A82A8FB007A52C004E3E0D2315944401E335019FF7952C0996038D730594440BF44BC75FE7952C0A051BAF42F594440EFFCA204FD7952C0FAD005F52D59444074779D0DF97952C03E90BC73285944407B681F2BF87952C021AB5B3D275944406917D34CF77952C00A83328D265944404084B872F67952C0C3D66CE525594440FFAECF9CF57952C04CA60A4625594440350A4966F57952C03A3B191C255944405323F433F57952C0F94B8BFA2459444077137CD3F47952C0A6F10BAF24594440942C27A1F47952C064027E8D24594440560DC2DCEE7952C05DC0CB0C1B594440755AB741ED7952C0410FB56D18594440D47C957CEC7952C053AEF02E17594440B1DAFCBFEA7952C0EEE87FB9165944402368CC24EA7952C0DC7D8E8F165944405FB4C70BE97952C089230F4416594440D0419770E87952C077B81D1A1659444065A54929E87952C0D7C05609165944409B00C3F2E77952C036C98FF815594440D42B6519E27952C047E350BF0B594440B2F4A10BEA7952C05C01857AFA58444009A4C4AEED7952C066F6798CF258444021037976F97952C06E15C440D75844409DD32CD0EE7952C0A46DFC89CA584440CE8B135FED7952C05247C7D5C85844408BFD65F7E47952C009168733BF5844401C40BFEFDF7952C0CBF6216FB9584440B33F506EDB7952C0747B4963B4584440C8940F41D57952C0B96E4A79AD584440FF06EDD5C77952C0D349B6BA9C58444093331477BC7952C0B77BB94F8E5844400C0055DCB87952C03605323B8B584440F068E388B57952C0C6F99B50885844401E34BBEEAD7952C0179B560A8158444085B2F0F5B57952C0BCADF4DA6C584440BAD91F28B77952C0ACAA97DF69584440BABC395CAB7952C006B64AB03858444014EB54F99E7952C01188D7F50B584440A98592C9A97952C0691A14CD0358444093FDF334607952C06C205D6C5A574440170D198F527952C01A8524B37A57444005854199467952C0AD6C1FF2965744409F3A56293D7952C02C98F8A3A85744401230BABC397952C0B2632310AF574440DD2230D6377952C0691B7FA2B257444061FBC9181F7952C097A608707A5744403140A209147952C05017299485574440567E198C117952C02BD9B111885744407BBC900E0F7952C0D7169E978A5744407FDAA84E077952C002637D039357444083F8C08EFF7852C0FE2AC0779B57444087307E1AF77852C0E1968FA4A4574440B515FBCBEE7852C0E449D235935744407F69519FE47852C065A9F57EA3574440EACE13CFD97852C0B6847CD0B35744402B8716D9CE7852C0CB7EDDE9CE5744408F8D40BCAE7852C070D1C952EB574440AF08FEB7927852C0EF1989D0085844403FFD67CD8F7852C0719010E50B5844401C2785798F7852C0764D486B0C584440F697DD93877852C0ACAB02B51858444037363B527D7852C0093543AA28584440C3D50110777852C09355116E32584440EEE714E4677852C03387A4164A584440717500C45D7852C07EA5F3E1595844405791D101497852C09D7DE5417A5844401AC1C6F5EF7752C0B9162D40DB5844400F7C0C569C7752C03EE8D9ACFA58444005508C2C997752C09259BDC3ED584440AC38D55A987752C0D1217024D0584440533BC3D4967752C04B5645B8C9584440E7FF55478E7752C05DC2A1B7785844402FFA0AD28C7752C0581CCEFC6A584440DCB930D28B7752C021567F8461584440FB20CB82897752C062D7F6764B58444079909E22877752C0D89942E7355844408C63247B847752C0B58993FB1D584440ACE46377817752C0677E350708584440C6C210397D7752C0B2F4A10BEA57444074B680D07A7752C0909DB7B1D9574440DB317557767752C0077767EDB65744409A7631CD747752C02D7B12D89C5744400D6C9560717752C054FEB5BC72574440FC34EECD6F7752C0A3E6ABE4635744409E7AA4C16D7752C0D1949D7E50574440FE9C82FC6C7752C0E046CA16495744401E4FCB0F5C7752C09B53C90050574440D503E621537752C0E063B0E25457444037DC476E4D7752C032569BFF5757444070ED4449487752C0836C59BE2E57444066F50EB7437752C054C554FA0957444032022A1C417752C0713C9F01F55644404487C091407752C01F7EFE7BF05644406E4E2503407752C05D4C33DDEB56444088F546AD307752C03ECBF3E0EE5644401F0F7D772B7752C04835ECF7C4564440A33B889D297752C026AAB706B656444087A4164A267752C0938E72309B5644403B6F63B3237752C050FD834886564440D7F7E120217752C00D6C956071564440132A38BC207752C07A8A1C226E564440315D88D51F7752C07E8E8F1667564440D4F02DAC1B7752C0ADA415DF505644408D4468041B7752C0952BBCCB45564440B88D06F0167752C0BB46CB811E564440A435069D107752C0C8E88024EC554440C9703C9F017752C0F01307D0EF55444083DE1B43007752C0855D143DF05544404EB4AB90F27652C0A69718CBF45544401ABE8575E37652C0C214E5D2F8554440293C6876DD7652C0807D74EACA5544403FABCC94D67652C0F58079C8945544405AD76839D07652C0B41D537765554440849ECDAACF7652C0272D5C56615544405DA79196CA7652C0D87F9D9B36554440331477BCC97652C06A10E6762F554440B41F2922C37652C07B82C476F75444406F2C280CCA7652C030815B77F35444405164ADA1D47652C0BC202235ED544440685BCD3AE37652C0F4311F10E8544440D6E429ABE97652C04203B16CE65444408B4E965AEF7652C0A23F34F3E454444080BA8102EF7652C0C77DAB75E2544440B515FBCBEE7652C0B64604E3E05444407C992842EA7652C02DEC6987BF544440F9BA0CFFE97652C028637C98BD544440363B527DE77652C0001B1021AE544440A359D93EE47652C0378AAC359454444027BA2EFCE07652C05C8E57207A5444403A765089EB7652C0DB17D00B7754444064744012F67652C059A148F77354444027C0B0FCF97652C054185B0872544440D1C952EBFD7652C0200BD1217054444092AD2EA7047752C0E083D72E6D544440F488D1730B7752C0CF807A336A544440A6B73F170D7752C0357A3540695444406F287CB60E7752C0CAF78C4468544440B3D0CE69167752C0A9BD88B663544440F678211D1E7752C0888384285F544440834F73F2227752C0E3361AC05B544440C2F693313E7752C0C05AB56B42544440F834272F327752C06684B70721544440C4758C2B2E7752C03D0801F9125444408D959867257752C00E4A9869FB53444022C2BF081A7752C0247F30F0DC534440EF1CCA50157752C03599F1B6D2534440C0B2D2A4147752C06551D845D15344409048DBF8137752C09509BFD4CF53444067B5C01E137752C01F0DA7CCCD5344403E22A644127752C0D9942BBCCB534440A71FD4450A7752C029B16B7BBB534440C0AF9124087752C0E95DBC1FB75344400856D5CBEF7652C018062CB98A534440F71BEDB8E17652C098A0866F615344406403E962D37652C03197546D375344404A22FB20CB7652C0765089EB185344402A1900AAB87652C0BE0F070951524440E386DF4DB77652C01F63EE5A425244400F7D772B4B7652C005A568E55E524440FB3F87F9F27552C07D224F92AE5144405793A7ACA67552C0D7C0560916514440BEDA519CA37552C0A44FABE80F514440745B22179C7552C0E2CCAFE600514440DCD6169E977552C00B43E4F4F5504440A93121E6927552C05E807D74EA504440D13FC1C58A7552C056ED9A90D6504440096B63EC847552C0AB92C83EC8504440AE80423D7D7552C04127840EBA50444040F7E5CC767552C0D0967329AE504440632827DA557552C0DEE7F86871504440C8ED974F567552C05646239F57504440211FF46C567552C03674B33F5050444015713AC9567552C059DC7F643A5044404AB20E47577552C028B682A62550444037AB3E575B7552C0F7AE415F7A4F444045460724617552C0A94885B1854E4440F62686E4647552C02D978DCEF94D444036AE7FD7677552C018AE0E80B84D4440B9E00CFE7E7552C0B01F6283854D4440446B459BE37552C0C5E23785954C444012A27C410B7652C03C1405FA444C4440588B4F01307652C0B058C345EE4B4440A6457D923B7652C07C28D192C74B44402C9CA4F9637652C0A2957B81594B4440A81ABD1AA07652C0300C5872154B4440FBC8AD49B77652C035272F32014B44404127840EBA7652C02AE109BDFE4A44401DCBBBEA017752C02172FA7ABE4A4440130CE71A667752C0C6A2E9EC644A44400A4B3CA06C7752C0BEF8A23D5E4A4440A5D93C0E837752C06473D53C474A4440FDBCA948857752C06B98A1F1444A4440F0C000C2877752C0F0DE5163424A4440D8817346947752C04450357A354A4440BF28417FA17752C08099EFE0274A44400A2DEBFEB17752C0BCAE5FB01B4A44407FF8F9EFC17752C08C0DDDEC0F4A444053C90050C57752C0B14B546F0D4A44402E71E481C87752C0BF61A2410A4A44401EFB592C457852C09F39EB538E494440056D72F8A47852C06D8E739B7049444036AD1402B97852C0D68BA19C68494440F59F353FFE7852C0BAA0BE654E494440289A07B0C87952C0C58F31772D4944406133C005D97952C0D862B7CF2A494440E1783E03EA7952C04DDA54DD2349444046B3B27DC87A52C06A11514CDE4844402F185C73477B52C0FCE25295B6484440A26131EA5A7B52C06A696E85B04844408499B67F657B52C036902E36AD4844404F8F6D19707B52C0C1C760C5A94844402E1D739EB17B52C02BDCF29194484440F9122A38BC7B52C0B5132521914844401021AE9CBD7B52C080D250A39048444081CEA44DD57B52C0431B800D88484440BBB88D06F07B52C076A38FF980484440B5A50EF27A7C52C07780272D5C484440F7C77BD5CA7C52C08AE5965643484440614D6551D87C52C05CFDD8243F484440E84CDA54DD7C52C03F1878EE3D4844409947FE60E07C52C05774EB353D484440AF0793E2E37C52C0FF5C34643C48444065A54929E87C52C0C45E28603B484440EFAB72A1F27C52C01F12BEF737484440D07D39B35D7D52C0075F984C1548444025AB22DC647D52C03D0801F912484440C39E76F86B7D52C0861C5BCF104844401211FE45D07F52C0F2CEA10C55474440B804E09F528252C0785C548B884644407615527E528252C0DB85E63A8D464440E2E5E95C518252C0BB270F0BB546444089B48D3F518252C0A7203F1BB94644400858AB764D8252C0F294D5743D474440CD565EF23F8252C07D7555A0164944401B28F04E3E8252C0E9F010C64F494440AAB4C5353E8252C0BDC117265349444032CB9E04368252C0F6285C8FC24944405111A7936C8252C09FE238F06A4B44402252D32EA68252C0BC02D193324D44404C50C3B7B08252C0F9F36DC1524D4440D26F5F07CE8252C0E34F5436AC4D4440A774B0FECF8252C0C266800BB24D4440A626C11BD28252C007431D56B84D4440EDD286C3D28252C0DC476E4DBA4D44402638F581E48252C04A5F0839EF4D444074779D0DF98252C0E3C281902C4E4440890629780A8352C016DC0F78604E44408315A75A0B8352C0E5EFDE51634E4440EA793716148352C036E84B6F7F4E44404703780B248352C0C24CDBBFB24E44403046240A2D8352C09BE09BA6CF4E4440A4C00298328352C02D776682E14E444055F833BC598352C09F91088D604F4440B3B27DC85B8352C08922A46E674F444075E789E76C8352C066118AADA04F44400D52F014728352C051F355F2B14F4440C5ABAC6D8A8352C0D4D00660035044403D7E6FD39F8352C05C1ABFF04A5044405051F52B9D8352C042B28009DC504440' + +-- OBS_GetGeometry tests + +-- expect most recent census tract boundary at cartodb nyc +-- timespan implictly null +SELECT cdb_observatory.OBS_GetGeometry( + cdb_observatory._TestPoint(), + '"us.census.tiger".census_tract' +) = :'cartodb_census_tract_geometry' As OBS_GetGeometry_cartodb_census_tract; + +-- expect most recent census county boundary (brooklyn) at cartodb nyc +-- timespan implictly null +SELECT cdb_observatory.OBS_GetGeometry( + cdb_observatory._TestPoint(), + '"us.census.tiger".county' +) = :'cartodb_county_geometry' As OBS_GetGeometry_cartodb_county; + +-- expect null geometry since boundary_id is null +-- timespan implictly null +SELECT cdb_observatory.OBS_GetGeometry( + cdb_observatory._TestPoint(), + '"us.census.tiger".non_existent' +) IS NULL As OBS_GetGeometry_non_existent_boundary_id; + +-- expect null geometry since there are no census tracts at null island +-- timespan implictly null +SELECT cdb_observatory.OBS_GetGeometry( + CDB_LatLng(0, 0), + '"us.census.tiger".census_tract' +) IS NULL As OBS_GetGeometry_null_island_census_tract; + +-- expect census tract boundary at cartodb nyc from 2013 +SELECT cdb_observatory.OBS_GetGeometry( + cdb_observatory._TestPoint(), + '"us.census.tiger".census_tract', + '2013' +) = :'cartodb_census_tract_geometry' As OBS_GetGeometry_year_census_tract; + +-- should return null +-- look for census tracts a year before census released them +SELECT cdb_observatory.OBS_GetGeometry( + cdb_observatory._TestPoint(), + '"us.census.tiger".census_tract', + '1988' +) IS NULL As OBS_GetGeometry_unlisted_year; + +-- OBS_GetGeometryId tests + +-- should give back '36047048500', the geoid of cartodb's census tract +SELECT cdb_observatory.OBS_GetGeometryId( + cdb_observatory._TestPoint(), + '"us.census.tiger".census_tract' +) = '36047048500'::text As OBS_GetGeometryId_cartodb_census_tract; + +-- should give back '36047048500', the geoid of cartodb's census tract +SELECT cdb_observatory.OBS_GetGeometryId( + cdb_observatory._TestPoint(), + '"us.census.tiger".census_tract', + '2013' +) = '36047048500'::text As OBS_GetGeometryId_cartodb_census_tract_with_year; + +-- should give back '36047', the geoid of cartodb's county (King's/ +-- Brooklyn, NY) +SELECT cdb_observatory.OBS_GetGeometryId( + cdb_observatory._TestPoint(), + '"us.census.tiger".county', + '2013' +) = '36047'::text As OBS_GetGeometryId_cartodb_county_with_year; + +-- should give back null since there is not a census tract at null island +SELECT cdb_observatory.OBS_GetGeometryId( + CDB_LatLng(0, 0), + '"us.census.tiger".census_tract' +) IS NULL As OBS_GetGeometryId_null_island; + +-- OBS_GetGeometryById + +-- should give geometry of King's County/Brooklyn, NY + +SELECT cdb_observatory.OBS_GetGeometryById( + '36047', + '"us.census.tiger".county' +) = :'cartodb_county_geometry' As OBS_GetGeometryById_cartodb_county; + +-- Should match output of GetGeometry on similar inputs +SELECT cdb_observatory.OBS_GetGeometryById( + '36047', -- cartodb's county + '"us.census.tiger".county' +) = cdb_observatory.OBS_GetGeometry( + cdb_observatory._TestPoint(), -- CartoDB's office + '"us.census.tiger".county' +) As OBS_GetGeometryById_compared_with_obs_getgeometry; + +-- should give null since boundary_id does not match geometry reference id +SELECT cdb_observatory.OBS_GetGeometryById( + '36047', + '"us.census.tiger".county', + '2013' +) = :'cartodb_county_geometry' OBS_GetGeometryById_boundary_id_mismatch_geom_id; + +-- should give null since boundary_id does not match geometry reference id +SELECT cdb_observatory.OBS_GetGeometryById( + '36047', + '"us.census.tiger".census_tract' +) IS NULL As OBS_GetGeometryById_boundary_id_mismatch_geom_id; + +\i test/sql/drop_fixtures.sql From 6709ce1589ff07b1bd9d2447c39a12e5d972cd58 Mon Sep 17 00:00:00 2001 From: Stuart Lynn Date: Mon, 25 Apr 2016 09:24:25 -0400 Subject: [PATCH 25/41] removing extra json in function causing bug --- src/pg/sql/41_observatory_augmentation.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pg/sql/41_observatory_augmentation.sql b/src/pg/sql/41_observatory_augmentation.sql index 9899829..02dafb0 100644 --- a/src/pg/sql/41_observatory_augmentation.sql +++ b/src/pg/sql/41_observatory_augmentation.sql @@ -710,7 +710,7 @@ BEGIN END IF; execute' - select array_agg( _obs_getcolumndatajson) from cdb_observatory._OBS_GetColumnDataJSON($1, + select array_agg( _obs_getcolumndata) from cdb_observatory._OBS_GetColumnDataJSON($1, $2, $3);' INTO data_table_info From 68f5bce80bb12f5417f743c97ab193e30b891c25 Mon Sep 17 00:00:00 2001 From: Stuart Lynn Date: Mon, 25 Apr 2016 09:52:34 -0400 Subject: [PATCH 26/41] updating get census functions to work with new json internals --- src/pg/sql/41_observatory_augmentation.sql | 31 +++++++++++++++++++--- 1 file changed, 28 insertions(+), 3 deletions(-) diff --git a/src/pg/sql/41_observatory_augmentation.sql b/src/pg/sql/41_observatory_augmentation.sql index 02dafb0..ff46e47 100644 --- a/src/pg/sql/41_observatory_augmentation.sql +++ b/src/pg/sql/41_observatory_augmentation.sql @@ -247,7 +247,7 @@ CREATE OR REPLACE FUNCTION cdb_observatory._OBS_GetCensus( time_span text DEFAULT '2009 - 2013', geometry_level text DEFAULT '"us.census.tiger".block_group' ) -RETURNS TABLE(dimension text[], dimension_value NUMERIC[]) +RETURNS SETOF JSON AS $$ DECLARE ids text[]; @@ -256,10 +256,35 @@ BEGIN ids := cdb_observatory._OBS_LookupCensusHuman(dimension_names); RETURN QUERY - SELECT names, vals FROM cdb_observatory._OBS_Get(geom, ids, time_span, geometry_level); + SELECT * FROM cdb_observatory._OBS_Get(geom, ids, time_span, geometry_level); END; $$ LANGUAGE plpgsql; +CREATE OR REPLACE FUNCTION cdb_observatory._OBS_GetCensus( + geom geometry, + dimension_name text, + time_span text DEFAULT '2009 - 2013', + geometry_level text DEFAULT '"us.census.tiger".block_group' +) +RETURNS NUMERIC +AS $$ +DECLARE + ids Text[]; + result_json json; + result Numeric; +BEGIN + + ids := cdb_observatory._OBS_LookupCensusHuman(Array[dimension_name]); + result_json := (SELECT a FROM cdb_observatory._OBS_Get(geom, ids, time_span, geometry_level) as a limit 1); + EXECUTE + format('select $1::numeric as "%s"', result_json->>'name') + INTO result + USING + result_json->>'value'; + + return result; +END; +$$ LANGUAGE plpgsql; -- Base augmentation fucntion. @@ -710,7 +735,7 @@ BEGIN END IF; execute' - select array_agg( _obs_getcolumndata) from cdb_observatory._OBS_GetColumnDataJSON($1, + select array_agg( _obs_getcolumndata) from cdb_observatory._OBS_GetColumnData($1, $2, $3);' INTO data_table_info From 07b678e448861a27b916e1ab9fe6dd91898abdc3 Mon Sep 17 00:00:00 2001 From: Stuart Lynn Date: Mon, 25 Apr 2016 10:12:43 -0400 Subject: [PATCH 27/41] test for obs get census --- .../41_observatory_augmentation_test.out | 18 +++---- .../sql/41_observatory_augmentation_test.sql | 52 ++++++++++++------- 2 files changed, 42 insertions(+), 28 deletions(-) diff --git a/src/pg/test/expected/41_observatory_augmentation_test.out b/src/pg/test/expected/41_observatory_augmentation_test.out index 5b13d3e..1a14f88 100644 --- a/src/pg/test/expected/41_observatory_augmentation_test.out +++ b/src/pg/test/expected/41_observatory_augmentation_test.out @@ -26,19 +26,19 @@ Done. 9516.27915900609 | 6152.51885204623 | 3363.76030695986 | 28.8 | 5301.51624447348 | 149.500458087105 | 230.000704749392 | 3835.26175169611 | 0 | 0 | 0 | 5681.01740730998 | 3323.51018362871 | 7107.02177675621 | 1040.753188991 | 69.0002114248176 | 793.502431385402 | 327.751004267883 | 2742.7584041365 | 931.502854235037 | 66304 | 0.3494 | 28291 | 3662.76122313407 | 339.251039505353 | 120.750369993431 | 0 | 1764 | 35.3 | 339.251039505353 | 0 | 224.250687130657 | 6549.27006773893 | 327.751004267883 | 28.750088093674 | 201.250616655718 | 621.001902823358 | 373.751145217762 | 1851.5056732326 | 1414.50433420876 | 1115.50341803455 | 615.251885204623 | | 57.500176187348 | 0 | 212.750651893187 | 408.251250930171 | 0 | 155.25047570584 | 109.250334755961 | 92.0002818997568 | 63.2501938060828 | 184.000563799514 | 621.001902823358 | 552.001691398541 | 327.751004267883 | 333.501021886618 | 126.500387612166 | | (1 row) - dimension | dimension_value -----------------------+------------------------------------- - {total_pop,male_pop} | {9516.27915900609,6152.51885204623} +test_obsgetcensuswithtestpointand2variables +--------------------------------------------- +t (1 row) - dimension | dimension_value ------------------------+----------------- - {female_pop,male_pop} | {NULL,NULL} +test_obsgetcensuswithnullislandarea +------------------------------------- +t (1 row) - dimension | dimension_value ------------------------+----------------- - {female_pop,male_pop} | {} +test_obsgetcensuswithnullisland +--------------------------------- +t (1 row) obs_get_gini_index_at_test_point diff --git a/src/pg/test/sql/41_observatory_augmentation_test.sql b/src/pg/test/sql/41_observatory_augmentation_test.sql index 137b021..ad7cf1a 100644 --- a/src/pg/test/sql/41_observatory_augmentation_test.sql +++ b/src/pg/test/sql/41_observatory_augmentation_test.sql @@ -13,28 +13,42 @@ SELECT * FROM -- total_pop | 9516.27915900609 -- male_pop | 6152.51885204623 -SELECT * -FROM - cdb_observatory._OBS_GetCensus( - cdb_observatory._TestPoint(), - Array['total_pop','male_pop']::text[] - ); - +WITH result as ( + SELECT array_agg(_obs_getcensus->>'value') as b + FROM( select * from + cdb_observatory._OBS_GetCensus( + cdb_observatory._TestPoint(), + Array['total_pop','male_pop']::text[] + )) a +) +select b='{9516.27915900609,6152.51885204623}' + as test_obsGetCensusWithTestPointAnd2Variables + from result; -- what happens on null island? -- expect nulls back: {female_pop, male_pop} | {NULL, NULL} -SELECT * -FROM - cdb_observatory._OBS_GetCensus( - ST_Buffer(CDB_LatLng(0, 0)::geography, 5000)::geometry, - Array['female_pop','male_pop']::text[] - ); + +WITH result as ( + SELECT count(vals) non_null + FROM( select _OBS_GetCensus->>'value' vals from + cdb_observatory._OBS_GetCensus( + ST_Buffer(CDB_LatLng(0, 0)::geography, 5000)::geometry, + Array['total_pop','male_pop']::text[] + )) a +) +SELECT non_null = 0 as test_obsGetCensusWithNullIslandArea +FROM result; + -- expect nulls back {female_pop, male_pop} | {NULL, NULL} -SELECT * -FROM - cdb_observatory._OBS_GetCensus( - CDB_LatLng(0, 0), - Array['female_pop', 'male_pop']::text[] - ); +WITH result as ( + SELECT count(vals) non_null + FROM( select _OBS_GetCensus->>'value' vals from + cdb_observatory._OBS_GetCensus( + CDB_LatLng(0, 0), + Array['total_pop','male_pop']::text[] + )) a +) +SELECT non_null = 0 as test_obsGetCensusWithNullIsland +FROM result; -- -- names | vals From 511a15d9939cdaba82bb2651098134d9a71349d5 Mon Sep 17 00:00:00 2001 From: Stuart Lynn Date: Mon, 25 Apr 2016 10:15:08 -0400 Subject: [PATCH 28/41] removing extra test statment --- src/pg/test/sql/40_observatory_utility_test.sql | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/pg/test/sql/40_observatory_utility_test.sql b/src/pg/test/sql/40_observatory_utility_test.sql index abdab50..6093624 100644 --- a/src/pg/test/sql/40_observatory_utility_test.sql +++ b/src/pg/test/sql/40_observatory_utility_test.sql @@ -40,8 +40,7 @@ SELECT '2009 - 2013') a ) select (expected)[1]::text = '{"colname":"geoid","tablename":"obs_d34555209878e8c4b37cf0b2b3d072ff129ec470","aggregate":null,"name":"US Census Tract Geoids","type":"Text","description":""}' as test_get_obs_column_with_geoid_and_census_1, - (expected)[2]::text = '{"colname":"geoid","tablename":"obs_ab038198aaab3f3cb055758638ee4de28ad70146","aggregate":null,"name":"US Census Tract Geoids","type":"Text","description":""}' as test_get_obs_column_with_geoid_and_census_2, - (expected)[3]::text = '{"colname":"geoid","tablename":"obs_65f29658e096ca1485bf683f65fdbc9f05ec3c5d","aggregate":null,"name":"US Census Tract Geoids","type":"Text","description":""}' as test_get_obs_column_with_geoid_and_census_3 + (expected)[2]::text = '{"colname":"geoid","tablename":"obs_ab038198aaab3f3cb055758638ee4de28ad70146","aggregate":null,"name":"US Census Tract Geoids","type":"Text","description":""}' as test_get_obs_column_with_geoid_and_census_2 from result; From 20ec7ef25a2de1a07b54755fbc5fc605d77b8de1 Mon Sep 17 00:00:00 2001 From: Stuart Lynn Date: Mon, 25 Apr 2016 10:18:18 -0400 Subject: [PATCH 29/41] whitespace fix --- .../expected/40_observatory_utility_test.out | 60 +++++++++++++++---- 1 file changed, 49 insertions(+), 11 deletions(-) diff --git a/src/pg/test/expected/40_observatory_utility_test.out b/src/pg/test/expected/40_observatory_utility_test.out index 5cc88e7..f24f5f3 100644 --- a/src/pg/test/expected/40_observatory_utility_test.out +++ b/src/pg/test/expected/40_observatory_utility_test.out @@ -46,14 +46,46 @@ SELECT (1 row) -test_get_obs_column_with_geoid_and_census_1 | test_get_obs_column_with_geoid_and_census_2 | test_get_obs_column_with_geoid_and_census_3 ----------------------------------------------+---------------------------------------------+--------------------------------------------- -t | t | t +-- future test: give back nulls when geometry doesn't intersect +-- SELECT +-- cdb_observatory._OBS_GeomTable( +-- CDB_LatLng(0,0), -- should give back null since it's in the ocean? +-- '"us.census.tiger".census_tract' +-- ); +-- OBS_GetColumnData +-- should give back: +-- colname | tablename | aggregate +-- -----------|-----------------|----------- +-- geoid | obs_{hex table} | null +-- total_pop | obs_{hex table} | sum +WITH result as ( +SELECT + array_agg(a) expected from cdb_observatory._OBS_GetColumnData( + '"us.census.tiger".census_tract', + Array['"us.census.tiger".census_tract_geoid', '"us.census.acs".B01001001'], + '2009 - 2013') a +) +select (expected)[1]::text = '{"colname":"geoid","tablename":"obs_d34555209878e8c4b37cf0b2b3d072ff129ec470","aggregate":null,"name":"US Census Tract Geoids","type":"Text","description":""}' as test_get_obs_column_with_geoid_and_census_1, + (expected)[2]::text = '{"colname":"geoid","tablename":"obs_ab038198aaab3f3cb055758638ee4de28ad70146","aggregate":null,"name":"US Census Tract Geoids","type":"Text","description":""}' as test_get_obs_column_with_geoid_and_census_2 +from result; + test_get_obs_column_with_geoid_and_census_1 | test_get_obs_column_with_geoid_and_census_2 +---------------------------------------------+--------------------------------------------- + t | t (1 row) -obs_getcolumndatajson_missing_measure ---------------------------------------- -t +-- should be null-valued +WITH result as ( +SELECT + array_agg(a) expected from cdb_observatory._OBS_GetColumnData( + '"us.census.tiger".census_tract', + Array['"us.census.tiger".baloney'], + '2009 - 2013') a +) +select expected is null as OBS_GetColumnData_missing_measure +from result; + obs_getcolumndata_missing_measure +----------------------------------- + t (1 row) -- OBS_LookupCensusHuman @@ -98,11 +130,17 @@ SELECT SELECT vals[1] As mandarin_orange (1 row) --- should give back a normalized name - SELECT cdb_observatory._OBS_NormalizeMeasureName('test 343 %% 2 qqq }}{{}}'); -_obs_normalizemeasurename ---------------------------- -test_343_2_qqq +SELECT cdb_observatory._OBS_GetRelatedColumn( + Array[ + '"es.ine".pop_0_4', + '"us.census.acs".B01001001', + '"us.census.acs".B01001002' + ], + 'denominator' + ); + _obs_getrelatedcolumn +------------------------------------------------------------- + {"\"es.ine\".total_pop",NULL,"\"us.census.acs\".B01001001"} (1 row) \i test/sql/drop_fixtures.sql From ace34f6ad820bbbc7b3ff1cbdfbdffa411f09c0d Mon Sep 17 00:00:00 2001 From: Stuart Lynn Date: Mon, 25 Apr 2016 10:45:54 -0400 Subject: [PATCH 30/41] removing table returning census snapshot function for json returning one for now --- src/pg/sql/41_observatory_augmentation.sql | 508 +++++++++++------- .../sql/41_observatory_augmentation_test.sql | 12 +- 2 files changed, 307 insertions(+), 213 deletions(-) diff --git a/src/pg/sql/41_observatory_augmentation.sql b/src/pg/sql/41_observatory_augmentation.sql index ff46e47..c958fe2 100644 --- a/src/pg/sql/41_observatory_augmentation.sql +++ b/src/pg/sql/41_observatory_augmentation.sql @@ -22,217 +22,313 @@ -- Creates a table of demographic snapshot -CREATE OR REPLACE FUNCTION cdb_observatory.OBS_GetDemographicSnapshot(geom geometry, time_span text default '2009 - 2013', geometry_level text default '"us.census.tiger".block_group') -RETURNS json +CREATE OR REPLACE FUNCTION cdb_observatory.OBS_GetDemographicSnapshotJ(geom geometry, time_span text default '2009 - 2013', geometry_level text default '"us.census.tiger".block_group') +RETURNS SETOF JSON AS $$ + DECLARE + target_cols text[]; BEGIN - RETURN row_to_json(cdb_observatory._OBS_GetDemographicSnapshot(geom, time_span, geometry_level)); + target_cols := Array['total_pop', + 'male_pop', + 'female_pop', + 'median_age', + 'white_pop', + 'black_pop', + 'asian_pop', + 'hispanic_pop', + 'amerindian_pop', + 'other_race_pop', + 'two_or_more_races_pop', + 'not_hispanic_pop', + --'not_us_citizen_pop', + --'workers_16_and_over', + --'commuters_by_car_truck_van', + --'commuters_drove_alone', + --'commuters_by_carpool', + --'commuters_by_public_transportation', + --'commuters_by_bus', + --'commuters_by_subway_or_elevated', + --'walked_to_work', + --'worked_at_home', + --'children', + 'households', + --'population_3_years_over', + --'in_school', + --'in_grades_1_to_4', + --'in_grades_5_to_8', + --'in_grades_9_to_12', + --'in_undergrad_college', + 'pop_25_years_over', + 'high_school_diploma', + 'less_one_year_college', + 'one_year_more_college', + 'associates_degree', + 'bachelors_degree', + 'masters_degree', + --'pop_5_years_over', + --'speak_only_english_at_home', + --'speak_spanish_at_home', + --'pop_determined_poverty_status', + --'poverty', + 'median_income', + 'gini_index', + 'income_per_capita', + 'housing_units', + 'vacant_housing_units', + 'vacant_housing_units_for_rent', + 'vacant_housing_units_for_sale', + 'median_rent', + 'percent_income_spent_on_rent', + 'owner_occupied_housing_units', + 'million_dollar_housing_units', + 'mortgaged_housing_units', + --'pop_15_and_over', + --'pop_never_married', + --'pop_now_married', + --'pop_separated', + --'pop_widowed', + --'pop_divorced', + 'commuters_16_over', + 'commute_less_10_mins', + 'commute_10_14_mins', + 'commute_15_19_mins', + 'commute_20_24_mins', + 'commute_25_29_mins', + 'commute_30_34_mins', + 'commute_35_44_mins', + 'commute_45_59_mins', + 'commute_60_more_mins', + 'aggregate_travel_time_to_work', + 'income_less_10000', + 'income_10000_14999', + 'income_15000_19999', + 'income_20000_24999', + 'income_25000_29999', + 'income_30000_34999', + 'income_35000_39999', + 'income_40000_44999', + 'income_45000_49999', + 'income_50000_59999', + 'income_60000_74999', + 'income_75000_99999', + 'income_100000_124999', + 'income_125000_149999', + 'income_150000_199999', + 'income_200000_or_more', + 'land_area']; + RETURN QUERY + 'select * from cdb_observatory._OBS_GetCensus($1, $2 )' + USING geom, target_cols + RETURN; END; $$ LANGUAGE plpgsql; -CREATE OR REPLACE FUNCTION cdb_observatory._OBS_GetDemographicSnapshot(geom geometry, time_span text default '2009 - 2013', geometry_level text default '"us.census.tiger".block_group' ) -RETURNS TABLE( - total_pop NUMERIC, - male_pop NUMERIC, - female_pop NUMERIC, - median_age NUMERIC, - white_pop NUMERIC, - black_pop NUMERIC, - asian_pop NUMERIC, - hispanic_pop NUMERIC, - amerindian_pop NUMERIC, - other_race_pop NUMERIC, - two_or_more_races_pop NUMERIC, - not_hispanic_pop NUMERIC, - --not_us_citizen_pop NUMERIC, - --workers_16_and_over NUMERIC, - --commuters_by_car_truck_van NUMERIC, - --commuters_drove_alone NUMERIC, - --commuters_by_carpool NUMERIC, - --commuters_by_public_transportation NUMERIC, - --commuters_by_bus NUMERIC, - --commuters_by_subway_or_elevated NUMERIC, - --walked_to_work NUMERIC, - --worked_at_home NUMERIC, - --children NUMERIC, -- TODO we should be able to get this at BG - households NUMERIC, - --population_3_years_over NUMERIC, - --in_school NUMERIC, - --in_grades_1_to_4 NUMERIC, - --in_grades_5_to_8 NUMERIC, - --in_grades_9_to_12 NUMERIC, - --in_undergrad_college NUMERIC, - pop_25_years_over NUMERIC, - high_school_diploma NUMERIC, - less_one_year_college NUMERIC, - one_year_more_college NUMERIC, - associates_degree NUMERIC, - bachelors_degree NUMERIC, - masters_degree NUMERIC, - --pop_5_years_over NUMERIC, - --speak_only_english_at_home NUMERIC, - --speak_spanish_at_home NUMERIC, - --pop_determined_poverty_status NUMERIC, - --poverty NUMERIC, - median_income NUMERIC, - gini_index NUMERIC, - income_per_capita NUMERIC, - housing_units NUMERIC, - vacant_housing_units NUMERIC, - vacant_housing_units_for_rent NUMERIC, - vacant_housing_units_for_sale NUMERIC, - median_rent NUMERIC, - percent_income_spent_on_rent NUMERIC, - owner_occupied_housing_units NUMERIC, - million_dollar_housing_units NUMERIC, - mortgaged_housing_units NUMERIC, - --pop_15_and_over NUMERIC, - --pop_never_married NUMERIC, - --pop_now_married NUMERIC, - --pop_separated NUMERIC, - --pop_widowed NUMERIC, - --pop_divorced NUMERIC, - commuters_16_over NUMERIC, - commute_less_10_mins NUMERIC, - commute_10_14_mins NUMERIC, - commute_15_19_mins NUMERIC, - commute_20_24_mins NUMERIC, - commute_25_29_mins NUMERIC, - commute_30_34_mins NUMERIC, - commute_35_44_mins NUMERIC, - commute_45_59_mins NUMERIC, - commute_60_more_mins NUMERIC, - aggregate_travel_time_to_work NUMERIC, - income_less_10000 NUMERIC, - income_10000_14999 NUMERIC, - income_15000_19999 NUMERIC, - income_20000_24999 NUMERIC, - income_25000_29999 NUMERIC, - income_30000_34999 NUMERIC, - income_35000_39999 NUMERIC, - income_40000_44999 NUMERIC, - income_45000_49999 NUMERIC, - income_50000_59999 NUMERIC, - income_60000_74999 NUMERIC, - income_75000_99999 NUMERIC, - income_100000_124999 NUMERIC, - income_125000_149999 NUMERIC, - income_150000_199999 NUMERIC, - income_200000_or_more NUMERIC, - land_area NUMERIC) -AS $$ -DECLARE - target_cols text[]; - names text[]; - vals NUMERIC[]; - q text; -BEGIN - target_cols := Array['total_pop', - 'male_pop', - 'female_pop', - 'median_age', - 'white_pop', - 'black_pop', - 'asian_pop', - 'hispanic_pop', - 'amerindian_pop', - 'other_race_pop', - 'two_or_more_races_pop', - 'not_hispanic_pop', - --'not_us_citizen_pop', - --'workers_16_and_over', - --'commuters_by_car_truck_van', - --'commuters_drove_alone', - --'commuters_by_carpool', - --'commuters_by_public_transportation', - --'commuters_by_bus', - --'commuters_by_subway_or_elevated', - --'walked_to_work', - --'worked_at_home', - --'children', - 'households', - --'population_3_years_over', - --'in_school', - --'in_grades_1_to_4', - --'in_grades_5_to_8', - --'in_grades_9_to_12', - --'in_undergrad_college', - 'pop_25_years_over', - 'high_school_diploma', - 'less_one_year_college', - 'one_year_more_college', - 'associates_degree', - 'bachelors_degree', - 'masters_degree', - --'pop_5_years_over', - --'speak_only_english_at_home', - --'speak_spanish_at_home', - --'pop_determined_poverty_status', - --'poverty', - 'median_income', - 'gini_index', - 'income_per_capita', - 'housing_units', - 'vacant_housing_units', - 'vacant_housing_units_for_rent', - 'vacant_housing_units_for_sale', - 'median_rent', - 'percent_income_spent_on_rent', - 'owner_occupied_housing_units', - 'million_dollar_housing_units', - 'mortgaged_housing_units', - --'pop_15_and_over', - --'pop_never_married', - --'pop_now_married', - --'pop_separated', - --'pop_widowed', - --'pop_divorced', - 'commuters_16_over', - 'commute_less_10_mins', - 'commute_10_14_mins', - 'commute_15_19_mins', - 'commute_20_24_mins', - 'commute_25_29_mins', - 'commute_30_34_mins', - 'commute_35_44_mins', - 'commute_45_59_mins', - 'commute_60_more_mins', - 'aggregate_travel_time_to_work', - 'income_less_10000', - 'income_10000_14999', - 'income_15000_19999', - 'income_20000_24999', - 'income_25000_29999', - 'income_30000_34999', - 'income_35000_39999', - 'income_40000_44999', - 'income_45000_49999', - 'income_50000_59999', - 'income_60000_74999', - 'income_75000_99999', - 'income_100000_124999', - 'income_125000_149999', - 'income_150000_199999', - 'income_200000_or_more', - 'land_area']; - - q := 'WITH a As ( - SELECT - dimension As names, - dimension_value As vals - FROM cdb_observatory._OBS_GetCensus($1,$2,$3,$4) - )' || - cdb_observatory._OBS_BuildSnapshotQuery(target_cols) || - ' FROM a'; - - RETURN QUERY - EXECUTE - q - USING geom, target_cols, time_span, geometry_level; - - RETURN; -END; -$$ LANGUAGE plpgsql; +-- CREATE OR REPLACE FUNCTION cdb_observatory._OBS_GetDemographicSnapshot(geom geometry, time_span text default '2009 - 2013', geometry_level text default '"us.census.tiger".block_group' ) +-- RETURNS TABLE( +-- total_pop NUMERIC, +-- male_pop NUMERIC, +-- female_pop NUMERIC, +-- median_age NUMERIC, +-- white_pop NUMERIC, +-- black_pop NUMERIC, +-- asian_pop NUMERIC, +-- hispanic_pop NUMERIC, +-- amerindian_pop NUMERIC, +-- other_race_pop NUMERIC, +-- two_or_more_races_pop NUMERIC, +-- not_hispanic_pop NUMERIC, +-- --not_us_citizen_pop NUMERIC, +-- --workers_16_and_over NUMERIC, +-- --commuters_by_car_truck_van NUMERIC, +-- --commuters_drove_alone NUMERIC, +-- --commuters_by_carpool NUMERIC, +-- --commuters_by_public_transportation NUMERIC, +-- --commuters_by_bus NUMERIC, +-- --commuters_by_subway_or_elevated NUMERIC, +-- --walked_to_work NUMERIC, +-- --worked_at_home NUMERIC, +-- --children NUMERIC, -- TODO we should be able to get this at BG +-- households NUMERIC, +-- --population_3_years_over NUMERIC, +-- --in_school NUMERIC, +-- --in_grades_1_to_4 NUMERIC, +-- --in_grades_5_to_8 NUMERIC, +-- --in_grades_9_to_12 NUMERIC, +-- --in_undergrad_college NUMERIC, +-- pop_25_years_over NUMERIC, +-- high_school_diploma NUMERIC, +-- less_one_year_college NUMERIC, +-- one_year_more_college NUMERIC, +-- associates_degree NUMERIC, +-- bachelors_degree NUMERIC, +-- masters_degree NUMERIC, +-- --pop_5_years_over NUMERIC, +-- --speak_only_english_at_home NUMERIC, +-- --speak_spanish_at_home NUMERIC, +-- --pop_determined_poverty_status NUMERIC, +-- --poverty NUMERIC, +-- median_income NUMERIC, +-- gini_index NUMERIC, +-- income_per_capita NUMERIC, +-- housing_units NUMERIC, +-- vacant_housing_units NUMERIC, +-- vacant_housing_units_for_rent NUMERIC, +-- vacant_housing_units_for_sale NUMERIC, +-- median_rent NUMERIC, +-- percent_income_spent_on_rent NUMERIC, +-- owner_occupied_housing_units NUMERIC, +-- million_dollar_housing_units NUMERIC, +-- mortgaged_housing_units NUMERIC, +-- --pop_15_and_over NUMERIC, +-- --pop_never_married NUMERIC, +-- --pop_now_married NUMERIC, +-- --pop_separated NUMERIC, +-- --pop_widowed NUMERIC, +-- --pop_divorced NUMERIC, +-- commuters_16_over NUMERIC, +-- commute_less_10_mins NUMERIC, +-- commute_10_14_mins NUMERIC, +-- commute_15_19_mins NUMERIC, +-- commute_20_24_mins NUMERIC, +-- commute_25_29_mins NUMERIC, +-- commute_30_34_mins NUMERIC, +-- commute_35_44_mins NUMERIC, +-- commute_45_59_mins NUMERIC, +-- commute_60_more_mins NUMERIC, +-- aggregate_travel_time_to_work NUMERIC, +-- income_less_10000 NUMERIC, +-- income_10000_14999 NUMERIC, +-- income_15000_19999 NUMERIC, +-- income_20000_24999 NUMERIC, +-- income_25000_29999 NUMERIC, +-- income_30000_34999 NUMERIC, +-- income_35000_39999 NUMERIC, +-- income_40000_44999 NUMERIC, +-- income_45000_49999 NUMERIC, +-- income_50000_59999 NUMERIC, +-- income_60000_74999 NUMERIC, +-- income_75000_99999 NUMERIC, +-- income_100000_124999 NUMERIC, +-- income_125000_149999 NUMERIC, +-- income_150000_199999 NUMERIC, +-- income_200000_or_more NUMERIC, +-- land_area NUMERIC) +-- AS $$ +-- DECLARE +-- target_cols text[]; +-- names text[]; +-- vals NUMERIC[]; +-- q text; +-- BEGIN +-- target_cols := Array['total_pop', +-- 'male_pop', +-- 'female_pop', +-- 'median_age', +-- 'white_pop', +-- 'black_pop', +-- 'asian_pop', +-- 'hispanic_pop', +-- 'amerindian_pop', +-- 'other_race_pop', +-- 'two_or_more_races_pop', +-- 'not_hispanic_pop', +-- --'not_us_citizen_pop', +-- --'workers_16_and_over', +-- --'commuters_by_car_truck_van', +-- --'commuters_drove_alone', +-- --'commuters_by_carpool', +-- --'commuters_by_public_transportation', +-- --'commuters_by_bus', +-- --'commuters_by_subway_or_elevated', +-- --'walked_to_work', +-- --'worked_at_home', +-- --'children', +-- 'households', +-- --'population_3_years_over', +-- --'in_school', +-- --'in_grades_1_to_4', +-- --'in_grades_5_to_8', +-- --'in_grades_9_to_12', +-- --'in_undergrad_college', +-- 'pop_25_years_over', +-- 'high_school_diploma', +-- 'less_one_year_college', +-- 'one_year_more_college', +-- 'associates_degree', +-- 'bachelors_degree', +-- 'masters_degree', +-- --'pop_5_years_over', +-- --'speak_only_english_at_home', +-- --'speak_spanish_at_home', +-- --'pop_determined_poverty_status', +-- --'poverty', +-- 'median_income', +-- 'gini_index', +-- 'income_per_capita', +-- 'housing_units', +-- 'vacant_housing_units', +-- 'vacant_housing_units_for_rent', +-- 'vacant_housing_units_for_sale', +-- 'median_rent', +-- 'percent_income_spent_on_rent', +-- 'owner_occupied_housing_units', +-- 'million_dollar_housing_units', +-- 'mortgaged_housing_units', +-- --'pop_15_and_over', +-- --'pop_never_married', +-- --'pop_now_married', +-- --'pop_separated', +-- --'pop_widowed', +-- --'pop_divorced', +-- 'commuters_16_over', +-- 'commute_less_10_mins', +-- 'commute_10_14_mins', +-- 'commute_15_19_mins', +-- 'commute_20_24_mins', +-- 'commute_25_29_mins', +-- 'commute_30_34_mins', +-- 'commute_35_44_mins', +-- 'commute_45_59_mins', +-- 'commute_60_more_mins', +-- 'aggregate_travel_time_to_work', +-- 'income_less_10000', +-- 'income_10000_14999', +-- 'income_15000_19999', +-- 'income_20000_24999', +-- 'income_25000_29999', +-- 'income_30000_34999', +-- 'income_35000_39999', +-- 'income_40000_44999', +-- 'income_45000_49999', +-- 'income_50000_59999', +-- 'income_60000_74999', +-- 'income_75000_99999', +-- 'income_100000_124999', +-- 'income_125000_149999', +-- 'income_150000_199999', +-- 'income_200000_or_more', +-- 'land_area']; +-- +-- q := +-- $query$ +-- WITH a As ( +-- SELECT +-- array_agg(_OBS_GetCensusJ->>'name') As names, +-- array_agg(_OBS_GetCensusJ->>'value') As vals +-- FROM cdb_observatory._OBS_GetCensusJ($1,$2,$3,$4) +-- )$query$ || +-- cdb_observatory._OBS_BuildSnapshotQuery(target_cols) || +-- ' FROM a' +-- ; +-- +-- RETURN QUERY +-- EXECUTE +-- q +-- USING geom, target_cols, time_span, geometry_level; +-- +-- RETURN; +-- END; +-- $$ LANGUAGE plpgsql; --Base functions for performing augmentation diff --git a/src/pg/test/sql/41_observatory_augmentation_test.sql b/src/pg/test/sql/41_observatory_augmentation_test.sql index ad7cf1a..04699be 100644 --- a/src/pg/test/sql/41_observatory_augmentation_test.sql +++ b/src/pg/test/sql/41_observatory_augmentation_test.sql @@ -1,12 +1,10 @@ \i test/sql/load_fixtures.sql -- -SELECT * FROM - cdb_observatory._OBS_GetDemographicSnapshot( - cdb_observatory._TestPoint(), - '2009 - 2013', - '"us.census.tiger".block_group' - ) As snapshot; - +WITH result as( + Select count(OBS_GetDemographicSnapshot->>'value') expected_columns + FROM cdb_observatory.OBS_GetDemographicSnapshot(_test_point()) +) select expected_columns ='58' as OBS_GetDemographicSnapshot_test_no_returns +FROM result -- -- dimension | dimension_value -- ----------|---------------- From eda10dfa61bb84fac3670ffe7a024c92788eda2a Mon Sep 17 00:00:00 2001 From: "Andrew W. Hill" Date: Mon, 25 Apr 2016 10:48:01 -0400 Subject: [PATCH 31/41] Update methods.md removed JSON response stuff --- doc/methods.md | 38 ++++++++++++++------------------------ 1 file changed, 14 insertions(+), 24 deletions(-) diff --git a/doc/methods.md b/doc/methods.md index 8d52e44..8e1ae08 100644 --- a/doc/methods.md +++ b/doc/methods.md @@ -18,27 +18,24 @@ normalize | for measures that are are **sums** (e.g. population) the default nor #### Returns -A JSON object containing the following properties +A NUMERIC value containing the following properties Key | Description --- | --- value | the raw or normalized measure -name | the human readable name of the measure -description | a brief description of the measure -type | the data type (text, number, boolean) #### Example Add a Measure to an empty column based on point locations in your table ```SQL -UPDATE tablename SET local_male_population = OBS_GetUSCensusMeasure(the_geom, 'Male Population') -> 'value' +UPDATE tablename SET local_male_population = OBS_GetUSCensusMeasure(the_geom, 'Male Population') ``` Get a measure at a single point location ```SQL -SELECT * FROM json_each(OBS_GetUSCensusMeasure(CDB_LatLng(40.7, -73.9), 'Male Population')) +SELECT OBS_GetUSCensusMeasure(CDB_LatLng(40.7, -73.9), 'Male Population') ``` + +## OBS_GetUSCensusCategory(point_geometry, measure_name); + +The ```OBS_GetUSCensusCategory(point_geometry, category_name)``` method returns a categorical measure based on a subset of the US Census variables at a point location. It requires a different function from ```OBS_GetUSCensusMeasure``` because this function will always return TEXT, whereas ```OBS_GetUSCensusMeasure``` will always returna NUMERIC value. + +#### Arguments + +Name |Description +--- | --- +point_geometry | a WGS84 point geometry (the_geom) +measure_name | a human readable string name of a US Census variable. The glossary of measure_names is [available below]('measure_name table'). +#### Returns + +A NUMERIC value containing the following properties + +Key | Description +--- | --- +value | the raw or normalized measure + +#### Example + +Add a Measure to an empty column based on point locations in your table + +```SQL +UPDATE tablename SET local_male_population = OBS_GetUSCensusCategory(the_geom, 'Spielman Singleton Category 10') +``` + +Get a measure at a single point location + +```SQL +SELECT OBS_GetUSCensusCategory(CDB_LatLng(40.7, -73.9), 'Spielman Singleton Category 10') +``` + + + ## OBS_GetMeasure(point_geometry, measure_id); The ```OBS_GetMeasure(point_geometry, measure_id)``` method returns any Data Observatory measure at a point location. From 21d306898be80f29e1522e0965769b989a40c57f Mon Sep 17 00:00:00 2001 From: Stuart Lynn Date: Mon, 25 Apr 2016 13:24:39 -0400 Subject: [PATCH 33/41] typo --- src/pg/sql/41_observatory_augmentation.sql | 87 ++++++---------------- 1 file changed, 21 insertions(+), 66 deletions(-) diff --git a/src/pg/sql/41_observatory_augmentation.sql b/src/pg/sql/41_observatory_augmentation.sql index c958fe2..0c157aa 100644 --- a/src/pg/sql/41_observatory_augmentation.sql +++ b/src/pg/sql/41_observatory_augmentation.sql @@ -117,6 +117,7 @@ AS $$ 'income_200000_or_more', 'land_area']; RETURN QUERY + EXECUTE 'select * from cdb_observatory._OBS_GetCensus($1, $2 )' USING geom, target_cols RETURN; @@ -653,71 +654,21 @@ BEGIN END; $$ LANGUAGE plpgsql; -CREATE OR REPLACE FUNCTION OBS_GetSegmentSnapshot(geom geometry, geometry_level text default '"us.census.tiger".census_tract') -RETURNS json -AS $$ - BEGIN - RETURN row_to_json(cdb_observatory._OBS_GetSegmentSnapshot(geom, geometry_level)); -END; -$$ LANGUAGE plpgsql; -CREATE OR REPLACE FUNCTION _OBS_GetSegmentSnapshot( + +CREATE OR REPLACE FUNCTION cdb_observatory.OBS_GetSegmentSnapshot( geom geometry, geometry_level text DEFAULT '"us.census.tiger".census_tract' - ) -RETURNS TABLE( - segment_name TEXT, - total_pop_quantile NUMERIC, - male_pop_quantile NUMERIC, - female_pop_quantile NUMERIC, - median_age_quantile NUMERIC, - white_pop_quantile NUMERIC, - black_pop_quantile NUMERIC, - asian_pop_quantile NUMERIC, - hispanic_pop_quantile NUMERIC, - not_us_citizen_pop_quantile NUMERIC, - workers_16_and_over_quantile NUMERIC, - commuters_by_car_truck_van_quantile NUMERIC, - commuters_by_public_transportation_quantile NUMERIC, - commuters_by_bus_quantile NUMERIC, - commuters_by_subway_or_elevated_quantile NUMERIC, - walked_to_work_quantile NUMERIC, - worked_at_home_quantile NUMERIC, - children_quantile NUMERIC, - households_quantile NUMERIC, - population_3_years_over_quantile NUMERIC, - in_school_quantile NUMERIC, - in_grades_1_to_4_quantile NUMERIC, - in_grades_5_to_8_quantile NUMERIC, - in_grades_9_to_12_quantile NUMERIC, - in_undergrad_college_quantile NUMERIC, - pop_25_years_over_quantile NUMERIC, - high_school_diploma_quantile NUMERIC, - bachelors_degree_quantile NUMERIC, - masters_degree_quantile NUMERIC, - pop_5_years_over_quantile NUMERIC, - speak_only_english_at_home_quantile NUMERIC, - speak_spanish_at_home_quantile NUMERIC, - pop_determined_poverty_status_quantile NUMERIC, - poverty_quantile NUMERIC, - median_income_quantile NUMERIC, - gini_index_quantile NUMERIC, - income_per_capita_quantile NUMERIC, - housing_units_quantile NUMERIC, - vacant_housing_units_quantile NUMERIC, - vacant_housing_units_for_rent_quantile NUMERIC, - vacant_housing_units_for_sale_quantile NUMERIC, - median_rent_quantile NUMERIC, - percent_income_spent_on_rent_quantile NUMERIC, - owner_occupied_housing_units_quantile NUMERIC, - million_dollar_housing_units_quantile NUMERIC -) +) +RETURNS JSON AS $$ DECLARE target_cols text[]; - seg_name Text; - geom_id Text; - q Text; + result json; + seg_name Text; + geom_id Text; + q Text; + segment_name Text; BEGIN target_cols := Array[ '"us.census.acs".B01001001_quantile', @@ -768,7 +719,7 @@ target_cols := Array[ EXECUTE $query$ - SELECT (categories)[1] + SELECT (_OBS_GetCategories)->>'name' FROM cdb_observatory._OBS_GetCategories( $1, Array['"us.census.spielman_singleton_segments".X10'], @@ -782,8 +733,8 @@ target_cols := Array[ format($query$ WITH a As ( SELECT - names As names, - vals As vals + array_agg(_OBS_GET->>'name') As names, + array_agg(_OBS_GET->>'value') As vals FROM cdb_observatory._OBS_Get($1, $2, '2009 - 2013', @@ -792,14 +743,18 @@ target_cols := Array[ ), percentiles As ( %s FROM a) - SELECT $4, percentiles.* - FROM percentiles - $query$, cdb_observatory._OBS_BuildSnapshotQuery(target_cols)); + SELECT row_to_json(r) FROM + ( SELECT $4 as segment_name, percentiles.* + FROM percentiles) r + $query$, cdb_observatory._OBS_BuildSnapshotQuery(target_cols)) results; - RETURN QUERY + EXECUTE q + into result USING geom, target_cols, geometry_level, segment_name; + + return result; END; $$ LANGUAGE plpgsql; From 82a838ff74383c22bfabb52b5b0fe3c399796c31 Mon Sep 17 00:00:00 2001 From: John Krauss Date: Mon, 25 Apr 2016 14:56:45 -0400 Subject: [PATCH 34/41] whitespace fixes --- .../41_observatory_augmentation_test.out | 44 +++++++++---------- 1 file changed, 22 insertions(+), 22 deletions(-) diff --git a/src/pg/test/expected/41_observatory_augmentation_test.out b/src/pg/test/expected/41_observatory_augmentation_test.out index 1a14f88..1836a52 100644 --- a/src/pg/test/expected/41_observatory_augmentation_test.out +++ b/src/pg/test/expected/41_observatory_augmentation_test.out @@ -26,49 +26,49 @@ Done. 9516.27915900609 | 6152.51885204623 | 3363.76030695986 | 28.8 | 5301.51624447348 | 149.500458087105 | 230.000704749392 | 3835.26175169611 | 0 | 0 | 0 | 5681.01740730998 | 3323.51018362871 | 7107.02177675621 | 1040.753188991 | 69.0002114248176 | 793.502431385402 | 327.751004267883 | 2742.7584041365 | 931.502854235037 | 66304 | 0.3494 | 28291 | 3662.76122313407 | 339.251039505353 | 120.750369993431 | 0 | 1764 | 35.3 | 339.251039505353 | 0 | 224.250687130657 | 6549.27006773893 | 327.751004267883 | 28.750088093674 | 201.250616655718 | 621.001902823358 | 373.751145217762 | 1851.5056732326 | 1414.50433420876 | 1115.50341803455 | 615.251885204623 | | 57.500176187348 | 0 | 212.750651893187 | 408.251250930171 | 0 | 155.25047570584 | 109.250334755961 | 92.0002818997568 | 63.2501938060828 | 184.000563799514 | 621.001902823358 | 552.001691398541 | 327.751004267883 | 333.501021886618 | 126.500387612166 | | (1 row) -test_obsgetcensuswithtestpointand2variables + test_obsgetcensuswithtestpointand2variables --------------------------------------------- -t + t (1 row) -test_obsgetcensuswithnullislandarea + test_obsgetcensuswithnullislandarea ------------------------------------- -t + t (1 row) -test_obsgetcensuswithnullisland + test_obsgetcensuswithnullisland --------------------------------- -t + t (1 row) -obs_get_gini_index_at_test_point + obs_get_gini_index_at_test_point ---------------------------------- -t + t (1 row) -obs_get_gini_index_at_null_island + obs_get_gini_index_at_null_island ----------------------------------- -t + t (1 row) -obs_getpoints_for_test_point + obs_getpoints_for_test_point ------------------------------ -t + t (1 row) -obs_getpoints_for_null_island + obs_getpoints_for_null_island ------------------------------- -t + t (1 row) -obs_getpolygons_for_test_point + obs_getpolygons_for_test_point -------------------------------- -t + t (1 row) -obs_getpolygons_for_null_island + obs_getpolygons_for_null_island --------------------------------- -t + t (1 row) segment_name | total_pop_quantile | male_pop_quantile | female_pop_quantile | median_age_quantile | white_pop_quantile | black_pop_quantile | asian_pop_quantile | hispanic_pop_quantile | not_us_citizen_pop_quantile | workers_16_and_over_quantile | commuters_by_car_truck_van_quantile | commuters_by_public_transportation_quantile | commuters_by_bus_quantile | commuters_by_subway_or_elevated_quantile | walked_to_work_quantile | worked_at_home_quantile | children_quantile | households_quantile | population_3_years_over_quantile | in_school_quantile | in_grades_1_to_4_quantile | in_grades_5_to_8_quantile | in_grades_9_to_12_quantile | in_undergrad_college_quantile | pop_25_years_over_quantile | high_school_diploma_quantile | bachelors_degree_quantile | masters_degree_quantile | pop_5_years_over_quantile | speak_only_english_at_home_quantile | speak_spanish_at_home_quantile | pop_determined_poverty_status_quantile | poverty_quantile | median_income_quantile | gini_index_quantile | income_per_capita_quantile | housing_units_quantile | vacant_housing_units_quantile | vacant_housing_units_for_rent_quantile | vacant_housing_units_for_sale_quantile | median_rent_quantile | percent_income_spent_on_rent_quantile | owner_occupied_housing_units_quantile | million_dollar_housing_units_quantile @@ -81,14 +81,14 @@ t | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (1 row) -getcategories_at_test_point_1 | getcategories_at_test_point_2 + getcategories_at_test_point_1 | getcategories_at_test_point_2 -------------------------------+------------------------------- -t | t + t | t (1 row) -getcategories_at_null_island + getcategories_at_null_island ------------------------------ -t + t (1 row) From 0535d3e305465f10eafcbb8c96340e72422917cc Mon Sep 17 00:00:00 2001 From: John Krauss Date: Mon, 25 Apr 2016 15:00:56 -0400 Subject: [PATCH 35/41] fixes for first test in 41 --- src/pg/test/sql/41_observatory_augmentation_test.sql | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/pg/test/sql/41_observatory_augmentation_test.sql b/src/pg/test/sql/41_observatory_augmentation_test.sql index 04699be..9b89436 100644 --- a/src/pg/test/sql/41_observatory_augmentation_test.sql +++ b/src/pg/test/sql/41_observatory_augmentation_test.sql @@ -2,9 +2,9 @@ -- WITH result as( Select count(OBS_GetDemographicSnapshot->>'value') expected_columns - FROM cdb_observatory.OBS_GetDemographicSnapshot(_test_point()) + FROM cdb_observatory.OBS_GetDemographicSnapshot(cdb_observatory._TestPoint()) ) select expected_columns ='58' as OBS_GetDemographicSnapshot_test_no_returns -FROM result +FROM result; -- -- dimension | dimension_value -- ----------|---------------- From 0d811f6eb3a09d074f2b1f6afc8cd35cd2080944 Mon Sep 17 00:00:00 2001 From: John Krauss Date: Mon, 25 Apr 2016 15:10:09 -0400 Subject: [PATCH 36/41] uncomment some public-facing code --- src/pg/sql/41_observatory_augmentation.sql | 2 +- src/pg/test/expected/41_observatory_augmentation_test.out | 4 ---- src/pg/test/sql/41_observatory_augmentation_test.sql | 5 ++--- 3 files changed, 3 insertions(+), 8 deletions(-) diff --git a/src/pg/sql/41_observatory_augmentation.sql b/src/pg/sql/41_observatory_augmentation.sql index 0c157aa..a736fb5 100644 --- a/src/pg/sql/41_observatory_augmentation.sql +++ b/src/pg/sql/41_observatory_augmentation.sql @@ -22,7 +22,7 @@ -- Creates a table of demographic snapshot -CREATE OR REPLACE FUNCTION cdb_observatory.OBS_GetDemographicSnapshotJ(geom geometry, time_span text default '2009 - 2013', geometry_level text default '"us.census.tiger".block_group') +CREATE OR REPLACE FUNCTION cdb_observatory.OBS_GetDemographicSnapshot(geom geometry, time_span text default '2009 - 2013', geometry_level text default '"us.census.tiger".block_group') RETURNS SETOF JSON AS $$ DECLARE diff --git a/src/pg/test/expected/41_observatory_augmentation_test.out b/src/pg/test/expected/41_observatory_augmentation_test.out index 1836a52..27ab610 100644 --- a/src/pg/test/expected/41_observatory_augmentation_test.out +++ b/src/pg/test/expected/41_observatory_augmentation_test.out @@ -21,10 +21,6 @@ Loading obs_11ee8b82c877c073438bc935a91d3dfccef875d1.sql fixture file... Done. Loading obs_d34555209878e8c4b37cf0b2b3d072ff129ec470.sql fixture file... Done. - total_pop | male_pop | female_pop | median_age | white_pop | black_pop | asian_pop | hispanic_pop | amerindian_pop | other_race_pop | two_or_more_races_pop | not_hispanic_pop | households | pop_25_years_over | high_school_diploma | less_one_year_college | one_year_more_college | associates_degree | bachelors_degree | masters_degree | median_income | gini_index | income_per_capita | housing_units | vacant_housing_units | vacant_housing_units_for_rent | vacant_housing_units_for_sale | median_rent | percent_income_spent_on_rent | owner_occupied_housing_units | million_dollar_housing_units | mortgaged_housing_units | commuters_16_over | commute_less_10_mins | commute_10_14_mins | commute_15_19_mins | commute_20_24_mins | commute_25_29_mins | commute_30_34_mins | commute_35_44_mins | commute_45_59_mins | commute_60_more_mins | aggregate_travel_time_to_work | income_less_10000 | income_10000_14999 | income_15000_19999 | income_20000_24999 | income_25000_29999 | income_30000_34999 | income_35000_39999 | income_40000_44999 | income_45000_49999 | income_50000_59999 | income_60000_74999 | income_75000_99999 | income_100000_124999 | income_125000_149999 | income_150000_199999 | income_200000_or_more | land_area -------------------+------------------+------------------+------------+------------------+------------------+------------------+------------------+----------------+----------------+-----------------------+------------------+------------------+-------------------+---------------------+-----------------------+-----------------------+-------------------+------------------+------------------+---------------+------------+-------------------+------------------+----------------------+-------------------------------+-------------------------------+-------------+------------------------------+------------------------------+------------------------------+-------------------------+-------------------+----------------------+--------------------+--------------------+--------------------+--------------------+--------------------+--------------------+--------------------+----------------------+-------------------------------+-------------------+--------------------+--------------------+--------------------+--------------------+--------------------+--------------------+--------------------+--------------------+--------------------+--------------------+--------------------+----------------------+----------------------+----------------------+-----------------------+----------- - 9516.27915900609 | 6152.51885204623 | 3363.76030695986 | 28.8 | 5301.51624447348 | 149.500458087105 | 230.000704749392 | 3835.26175169611 | 0 | 0 | 0 | 5681.01740730998 | 3323.51018362871 | 7107.02177675621 | 1040.753188991 | 69.0002114248176 | 793.502431385402 | 327.751004267883 | 2742.7584041365 | 931.502854235037 | 66304 | 0.3494 | 28291 | 3662.76122313407 | 339.251039505353 | 120.750369993431 | 0 | 1764 | 35.3 | 339.251039505353 | 0 | 224.250687130657 | 6549.27006773893 | 327.751004267883 | 28.750088093674 | 201.250616655718 | 621.001902823358 | 373.751145217762 | 1851.5056732326 | 1414.50433420876 | 1115.50341803455 | 615.251885204623 | | 57.500176187348 | 0 | 212.750651893187 | 408.251250930171 | 0 | 155.25047570584 | 109.250334755961 | 92.0002818997568 | 63.2501938060828 | 184.000563799514 | 621.001902823358 | 552.001691398541 | 327.751004267883 | 333.501021886618 | 126.500387612166 | | -(1 row) test_obsgetcensuswithtestpointand2variables --------------------------------------------- diff --git a/src/pg/test/sql/41_observatory_augmentation_test.sql b/src/pg/test/sql/41_observatory_augmentation_test.sql index 9b89436..ee6c46c 100644 --- a/src/pg/test/sql/41_observatory_augmentation_test.sql +++ b/src/pg/test/sql/41_observatory_augmentation_test.sql @@ -122,14 +122,14 @@ SELECT as OBS_GetPolygons_for_null_island; SELECT * FROM - cdb_observatory._OBS_GetSegmentSnapshot( + cdb_observatory.OBS_GetSegmentSnapshot( cdb_observatory._TestPoint(), '"us.census.tiger".census_tract' ); -- segmentation around null island SELECT * FROM - cdb_observatory._OBS_GetSegmentSnapshot( + cdb_observatory.OBS_GetSegmentSnapshot( CDB_LatLng(0, 0), '"us.census.tiger".census_tract' ); @@ -149,7 +149,6 @@ WITH result as ( WITH result as ( SELECT array_agg(_OBS_GetCategories) as expected FROM cdb_observatory._OBS_GetCategories( - -- cdb_observatory._TestPoint(), CDB_LatLng(0,0), Array['"us.census.spielman_singleton_segments".X10'], '"us.census.tiger".census_tract' From 3e99b2deeb6bdc3b91f2701ddf2f818c518d9c8d Mon Sep 17 00:00:00 2001 From: John Krauss Date: Mon, 25 Apr 2016 15:19:38 -0400 Subject: [PATCH 37/41] add in missing test --- src/pg/test/expected/41_observatory_augmentation_test.out | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/pg/test/expected/41_observatory_augmentation_test.out b/src/pg/test/expected/41_observatory_augmentation_test.out index 27ab610..f4a39d6 100644 --- a/src/pg/test/expected/41_observatory_augmentation_test.out +++ b/src/pg/test/expected/41_observatory_augmentation_test.out @@ -21,6 +21,10 @@ Loading obs_11ee8b82c877c073438bc935a91d3dfccef875d1.sql fixture file... Done. Loading obs_d34555209878e8c4b37cf0b2b3d072ff129ec470.sql fixture file... Done. + obs_getdemographicsnapshot_test_no_returns +-------------------------------------------- + t +(1 row) test_obsgetcensuswithtestpointand2variables --------------------------------------------- From b93ea03786ae0d6f542d7d2d1ff170faba16a166 Mon Sep 17 00:00:00 2001 From: John Krauss Date: Mon, 25 Apr 2016 15:31:39 -0400 Subject: [PATCH 38/41] update tests for segmentation to work with JSON --- .../expected/41_observatory_augmentation_test.out | 12 ++++++------ src/pg/test/sql/41_observatory_augmentation_test.sql | 10 ++++------ 2 files changed, 10 insertions(+), 12 deletions(-) diff --git a/src/pg/test/expected/41_observatory_augmentation_test.out b/src/pg/test/expected/41_observatory_augmentation_test.out index f4a39d6..7e06252 100644 --- a/src/pg/test/expected/41_observatory_augmentation_test.out +++ b/src/pg/test/expected/41_observatory_augmentation_test.out @@ -71,14 +71,14 @@ Done. t (1 row) - segment_name | total_pop_quantile | male_pop_quantile | female_pop_quantile | median_age_quantile | white_pop_quantile | black_pop_quantile | asian_pop_quantile | hispanic_pop_quantile | not_us_citizen_pop_quantile | workers_16_and_over_quantile | commuters_by_car_truck_van_quantile | commuters_by_public_transportation_quantile | commuters_by_bus_quantile | commuters_by_subway_or_elevated_quantile | walked_to_work_quantile | worked_at_home_quantile | children_quantile | households_quantile | population_3_years_over_quantile | in_school_quantile | in_grades_1_to_4_quantile | in_grades_5_to_8_quantile | in_grades_9_to_12_quantile | in_undergrad_college_quantile | pop_25_years_over_quantile | high_school_diploma_quantile | bachelors_degree_quantile | masters_degree_quantile | pop_5_years_over_quantile | speak_only_english_at_home_quantile | speak_spanish_at_home_quantile | pop_determined_poverty_status_quantile | poverty_quantile | median_income_quantile | gini_index_quantile | income_per_capita_quantile | housing_units_quantile | vacant_housing_units_quantile | vacant_housing_units_for_rent_quantile | vacant_housing_units_for_sale_quantile | median_rent_quantile | percent_income_spent_on_rent_quantile | owner_occupied_housing_units_quantile | million_dollar_housing_units_quantile ------------------------------+--------------------+-------------------+---------------------+---------------------+--------------------+--------------------+--------------------+-----------------------+-----------------------------+------------------------------+-------------------------------------+---------------------------------------------+---------------------------+------------------------------------------+-------------------------+-------------------------+--------------------+---------------------+----------------------------------+--------------------+---------------------------+---------------------------+----------------------------+-------------------------------+----------------------------+------------------------------+---------------------------+-------------------------+---------------------------+-------------------------------------+--------------------------------+----------------------------------------+-------------------+------------------------+---------------------+----------------------------+------------------------+-------------------------------+----------------------------------------+----------------------------------------+----------------------+---------------------------------------+---------------------------------------+--------------------------------------- - Wealthy, urban without Kids | 0.234783783783784 | 0.422405405405405 | 0.0987567567567568 | 0.0715 | 0.295310810810811 | 0.407189189189189 | 0.625608108108108 | 0.795202702702703 | 0.703797297297297 | 0.59227027027027 | 0.0180540540540541 | 0.993756756756757 | 0.728162162162162 | 0.995972972972973 | 0.929135135135135 | 0.625432432432432 | 0.0386081081081081 | 0.157121621621622 | 0.241878378378378 | 0.173783783783784 | 0.0380675675675676 | 0.0308108108108108 | 0.0486216216216216 | 0.479743243243243 | 0.297675675675676 | 0.190351351351351 | 0.802513513513514 | 0.757148648648649 | 0.255405405405405 | 0.196094594594595 | 0.816851351351351 | 0.252513513513514 | 0.560054054054054 | 0.777472972972973 | 0.336932432432432 | 0.655378378378378 | 0.141810810810811 | 0.362824324324324 | 0.463837837837838 | 0 | 0.939040540540541 | 0.419445945945946 | 0.0387972972972973 | 0 + test_point_segmentation +------------------------- + t (1 row) - segment_name | total_pop_quantile | male_pop_quantile | female_pop_quantile | median_age_quantile | white_pop_quantile | black_pop_quantile | asian_pop_quantile | hispanic_pop_quantile | not_us_citizen_pop_quantile | workers_16_and_over_quantile | commuters_by_car_truck_van_quantile | commuters_by_public_transportation_quantile | commuters_by_bus_quantile | commuters_by_subway_or_elevated_quantile | walked_to_work_quantile | worked_at_home_quantile | children_quantile | households_quantile | population_3_years_over_quantile | in_school_quantile | in_grades_1_to_4_quantile | in_grades_5_to_8_quantile | in_grades_9_to_12_quantile | in_undergrad_college_quantile | pop_25_years_over_quantile | high_school_diploma_quantile | bachelors_degree_quantile | masters_degree_quantile | pop_5_years_over_quantile | speak_only_english_at_home_quantile | speak_spanish_at_home_quantile | pop_determined_poverty_status_quantile | poverty_quantile | median_income_quantile | gini_index_quantile | income_per_capita_quantile | housing_units_quantile | vacant_housing_units_quantile | vacant_housing_units_for_rent_quantile | vacant_housing_units_for_sale_quantile | median_rent_quantile | percent_income_spent_on_rent_quantile | owner_occupied_housing_units_quantile | million_dollar_housing_units_quantile ---------------+--------------------+-------------------+---------------------+---------------------+--------------------+--------------------+--------------------+-----------------------+-----------------------------+------------------------------+-------------------------------------+---------------------------------------------+---------------------------+------------------------------------------+-------------------------+-------------------------+-------------------+---------------------+----------------------------------+--------------------+---------------------------+---------------------------+----------------------------+-------------------------------+----------------------------+------------------------------+---------------------------+-------------------------+---------------------------+-------------------------------------+--------------------------------+----------------------------------------+------------------+------------------------+---------------------+----------------------------+------------------------+-------------------------------+----------------------------------------+----------------------------------------+----------------------+---------------------------------------+---------------------------------------+--------------------------------------- - | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | + null_island_segmentation +-------------------------- + t (1 row) getcategories_at_test_point_1 | getcategories_at_test_point_2 diff --git a/src/pg/test/sql/41_observatory_augmentation_test.sql b/src/pg/test/sql/41_observatory_augmentation_test.sql index ee6c46c..5675ca7 100644 --- a/src/pg/test/sql/41_observatory_augmentation_test.sql +++ b/src/pg/test/sql/41_observatory_augmentation_test.sql @@ -121,18 +121,16 @@ SELECT )[1]->>'value' is null as OBS_GetPolygons_for_null_island; -SELECT * FROM - cdb_observatory.OBS_GetSegmentSnapshot( +SELECT cdb_observatory.OBS_GetSegmentSnapshot( cdb_observatory._TestPoint(), '"us.census.tiger".census_tract' -); +)::text = '{"segment_name":"SS_segment_10_clusters","\"us.census.acs\".B01001001_quantile":"0.234783783783784","\"us.census.acs\".B01001002_quantile":"0.422405405405405","\"us.census.acs\".B01001026_quantile":"0.0987567567567568","\"us.census.acs\".B01002001_quantile":"0.0715","\"us.census.acs\".B03002003_quantile":"0.295310810810811","\"us.census.acs\".B03002004_quantile":"0.407189189189189","\"us.census.acs\".B03002006_quantile":"0.625608108108108","\"us.census.acs\".B03002012_quantile":"0.795202702702703","\"us.census.acs\".B05001006_quantile":"0.703797297297297","\"us.census.acs\".B08006001_quantile":"0.59227027027027","\"us.census.acs\".B08006002_quantile":"0.0180540540540541","\"us.census.acs\".B08006008_quantile":"0.993756756756757","\"us.census.acs\".B08006009_quantile":"0.728162162162162","\"us.census.acs\".B08006011_quantile":"0.995972972972973","\"us.census.acs\".B08006015_quantile":"0.929135135135135","\"us.census.acs\".B08006017_quantile":"0.625432432432432","\"us.census.acs\".B09001001_quantile":"0.0386081081081081","\"us.census.acs\".B11001001_quantile":"0.157121621621622","\"us.census.acs\".B14001001_quantile":"0.241878378378378","\"us.census.acs\".B14001002_quantile":"0.173783783783784","\"us.census.acs\".B14001005_quantile":"0.0380675675675676","\"us.census.acs\".B14001006_quantile":"0.0308108108108108","\"us.census.acs\".B14001007_quantile":"0.0486216216216216","\"us.census.acs\".B14001008_quantile":"0.479743243243243","\"us.census.acs\".B15003001_quantile":"0.297675675675676","\"us.census.acs\".B15003017_quantile":"0.190351351351351","\"us.census.acs\".B15003022_quantile":"0.802513513513514","\"us.census.acs\".B15003023_quantile":"0.757148648648649","\"us.census.acs\".B16001001_quantile":"0.255405405405405","\"us.census.acs\".B16001002_quantile":"0.196094594594595","\"us.census.acs\".B16001003_quantile":"0.816851351351351","\"us.census.acs\".B17001001_quantile":"0.252513513513514","\"us.census.acs\".B17001002_quantile":"0.560054054054054","\"us.census.acs\".B19013001_quantile":"0.777472972972973","\"us.census.acs\".B19083001_quantile":"0.336932432432432","\"us.census.acs\".B19301001_quantile":"0.655378378378378","\"us.census.acs\".B25001001_quantile":"0.141810810810811","\"us.census.acs\".B25002003_quantile":"0.362824324324324","\"us.census.acs\".B25004002_quantile":"0.463837837837838","\"us.census.acs\".B25004004_quantile":"0","\"us.census.acs\".B25058001_quantile":"0.939040540540541","\"us.census.acs\".B25071001_quantile":"0.419445945945946","\"us.census.acs\".B25075001_quantile":"0.0387972972972973","\"us.census.acs\".B25075025_quantile":"0"}' as test_point_segmentation; -- segmentation around null island -SELECT * FROM - cdb_observatory.OBS_GetSegmentSnapshot( +SELECT cdb_observatory.OBS_GetSegmentSnapshot( CDB_LatLng(0, 0), '"us.census.tiger".census_tract' -); +)::text = '{"segment_name":null,"\"us.census.acs\".B01001001_quantile":null,"\"us.census.acs\".B01001002_quantile":null,"\"us.census.acs\".B01001026_quantile":null,"\"us.census.acs\".B01002001_quantile":null,"\"us.census.acs\".B03002003_quantile":null,"\"us.census.acs\".B03002004_quantile":null,"\"us.census.acs\".B03002006_quantile":null,"\"us.census.acs\".B03002012_quantile":null,"\"us.census.acs\".B05001006_quantile":null,"\"us.census.acs\".B08006001_quantile":null,"\"us.census.acs\".B08006002_quantile":null,"\"us.census.acs\".B08006008_quantile":null,"\"us.census.acs\".B08006009_quantile":null,"\"us.census.acs\".B08006011_quantile":null,"\"us.census.acs\".B08006015_quantile":null,"\"us.census.acs\".B08006017_quantile":null,"\"us.census.acs\".B09001001_quantile":null,"\"us.census.acs\".B11001001_quantile":null,"\"us.census.acs\".B14001001_quantile":null,"\"us.census.acs\".B14001002_quantile":null,"\"us.census.acs\".B14001005_quantile":null,"\"us.census.acs\".B14001006_quantile":null,"\"us.census.acs\".B14001007_quantile":null,"\"us.census.acs\".B14001008_quantile":null,"\"us.census.acs\".B15003001_quantile":null,"\"us.census.acs\".B15003017_quantile":null,"\"us.census.acs\".B15003022_quantile":null,"\"us.census.acs\".B15003023_quantile":null,"\"us.census.acs\".B16001001_quantile":null,"\"us.census.acs\".B16001002_quantile":null,"\"us.census.acs\".B16001003_quantile":null,"\"us.census.acs\".B17001001_quantile":null,"\"us.census.acs\".B17001002_quantile":null,"\"us.census.acs\".B19013001_quantile":null,"\"us.census.acs\".B19083001_quantile":null,"\"us.census.acs\".B19301001_quantile":null,"\"us.census.acs\".B25001001_quantile":null,"\"us.census.acs\".B25002003_quantile":null,"\"us.census.acs\".B25004002_quantile":null,"\"us.census.acs\".B25004004_quantile":null,"\"us.census.acs\".B25058001_quantile":null,"\"us.census.acs\".B25071001_quantile":null,"\"us.census.acs\".B25075001_quantile":null,"\"us.census.acs\".B25075025_quantile":null}' as null_island_segmentation; WITH result as ( SELECT array_agg(_OBS_GetCategories) as expected FROM From c45b2cfdd51a687e97aab2b5c2420030408c8e99 Mon Sep 17 00:00:00 2001 From: John Krauss Date: Mon, 25 Apr 2016 15:49:59 -0400 Subject: [PATCH 39/41] fixing test errors --- .../expected/40_observatory_utility_test.out | 4 + .../41_observatory_augmentation_test.out | 4 + .../42_observatory_exploration_test.out | 83 +++++++++---------- 3 files changed, 47 insertions(+), 44 deletions(-) diff --git a/src/pg/test/expected/40_observatory_utility_test.out b/src/pg/test/expected/40_observatory_utility_test.out index f3a9e9c..2729b69 100644 --- a/src/pg/test/expected/40_observatory_utility_test.out +++ b/src/pg/test/expected/40_observatory_utility_test.out @@ -21,6 +21,8 @@ Loading obs_11ee8b82c877c073438bc935a91d3dfccef875d1.sql fixture file... Done. Loading obs_d34555209878e8c4b37cf0b2b3d072ff129ec470.sql fixture file... Done. +Loading obs_b0ef6dd68d5faddbf231fd7f02916b3d00ec43c4.sql fixture file... +Done. -- OBS_GeomTable -- get table with known geometry_id -- should give back a table like obs_{hex hash} @@ -173,3 +175,5 @@ Dropping obs_11ee8b82c877c073438bc935a91d3dfccef875d1 fixture table... Done. Dropping obs_d34555209878e8c4b37cf0b2b3d072ff129ec470 fixture table... Done. +Dropping obs_b0ef6dd68d5faddbf231fd7f02916b3d00ec43c4 fixture table... +Done. diff --git a/src/pg/test/expected/41_observatory_augmentation_test.out b/src/pg/test/expected/41_observatory_augmentation_test.out index 7e06252..17a6853 100644 --- a/src/pg/test/expected/41_observatory_augmentation_test.out +++ b/src/pg/test/expected/41_observatory_augmentation_test.out @@ -20,6 +20,8 @@ Done. Loading obs_11ee8b82c877c073438bc935a91d3dfccef875d1.sql fixture file... Done. Loading obs_d34555209878e8c4b37cf0b2b3d072ff129ec470.sql fixture file... +Done. +Loading obs_b0ef6dd68d5faddbf231fd7f02916b3d00ec43c4.sql fixture file... Done. obs_getdemographicsnapshot_test_no_returns -------------------------------------------- @@ -122,3 +124,5 @@ Dropping obs_11ee8b82c877c073438bc935a91d3dfccef875d1 fixture table... Done. Dropping obs_d34555209878e8c4b37cf0b2b3d072ff129ec470 fixture table... Done. +Dropping obs_b0ef6dd68d5faddbf231fd7f02916b3d00ec43c4 fixture table... +Done. diff --git a/src/pg/test/expected/42_observatory_exploration_test.out b/src/pg/test/expected/42_observatory_exploration_test.out index e165f40..7d831d7 100644 --- a/src/pg/test/expected/42_observatory_exploration_test.out +++ b/src/pg/test/expected/42_observatory_exploration_test.out @@ -30,6 +30,45 @@ t|t _obs_searchtables_timespan_does_not_match t (1 row) +obs_search +("""es.ine"".total_pop","The total number of all people living in a geographic area.","Total Population",sum,es.ine) +("""us.census.acs"".B01001001","The total number of all people living in a given geographic area. This is a very useful catch-all denominator when calculating rates.","Total Population",sum,us.census.acs) +("""us.census.acs"".B01001001_quantile","The total number of all people living in a given geographic area. This is a very useful catch-all denominator when calculating rates.","Quantile:Total Population",quantile,us.census.acs) +(3 rows) +boundary_id|description|time_span|tablename +"us.census.tiger".block_group|Block groups (BGs) are statistical divisions of census tracts, are generally defined to contain between 600 and 3,000 people, and are used to present data and control block numbering. A block group consists of clusters of blocks within the same census tract that have the same first digit of their four-digit census block number. For example, blocks 3001, 3002, 3003, ..., 3999 in census tract 1210.02 belong to BG 3 in that census tract. Most BGs were delineated by local participants in the Census Bureau\u2019s Participant Statistical Areas Program. The Census Bureau delineated BGs only where a local or tribal government declined to participate, and a regional organization or State Data Center was not available to participate. + +A BG usually covers a contiguous area. Each census tract contains at least one BG, and BGs are uniquely numbered within the census tract. Within the standard census geographic hierarchy, BGs never cross state, county, or census tract boundaries but may cross the boundaries of any other geographic entity. Tribal census tracts and tribal BGs are separate and unique geographic areas defined within federally recognized American Indian reservations and can cross state and county boundaries (see \u201cTribal Census Tract\u201d and \u201cTribal Block Group\u201d). The tribal census tracts and tribal block groups may be completely different from the census tracts and block groups defined by state and county.|2013|obs_85328201013baa14e8e8a4a57a01e6f6fbc5f9b1 +"us.census.tiger".census_tract|Census tracts are identified by an up to four-digit integer number and may have an optional two-digit suffix; for example 1457.02 or 23. The census tract codes consist of six digits with an implied decimal between the fourth and fifth digit corresponding to the basic census tract number but with leading zeroes and trailing zeroes for census tracts without a suffix. The tract number examples above would have codes of 145702 and 002300, respectively. + +Some ranges of census tract numbers in the 2010 Census are used to identify distinctive types of census tracts. The code range in the 9400s is used for those census tracts with a majority of population, housing, or land area associated with an American Indian area and matches the numbering used in Census 2000. The code range in the 9800s is new for 2010 and is used to specifically identify special land-use census tracts; that is, census tracts defined to encompass a large area with little or no residential population with special characteristics, such as large parks or employment areas. The range of census tracts in the 9900s represents census tracts delineated specifically to cover large bodies of water. This is different from Census 2000 when water-only census tracts were assigned codes of all zeroes (000000); 000000 is no longer used as a census tract code for the 2010 Census. + +The Census Bureau uses suffixes to help identify census tract changes for comparison purposes. Census tract suffixes may range from .01 to .98. As part of local review of existing census tracts before each census, some census tracts may have grown enough in population size to qualify as more than one census tract. When a census tract is split, the split parts usually retain the basic number but receive different suffixes. For example, if census tract 14 is split, the new tract numbers would be 14.01 and 14.02. In a few counties, local participants request major changes to, and renumbering of, the census tracts; however, this is generally discouraged. Changes to individual census tract boundaries usually do not result in census tract numbering changes. + +The Census Bureau introduced the concept of tribal census tracts for the first time for Census 2000. Tribal census tracts for that census consisted of the standard county-based census tracts tabulated within American Indian areas, thus allowing for the tracts to ignore state and county boundaries for tabulation. The Census Bureau assigned the 9400 range of numbers to identify specific tribal census tracts; however, not all tribal census tracts used this numbering scheme. For the 2010 Census, tribal census tracts no longer are tied to or numbered in the same way as the county-based census tracts (see \u201cTribal Census Tract\u201d).|2013|obs_a92e1111ad3177676471d66bb8036e6d057f271b +"us.census.tiger".state|States and Equivalent Entities are the primary governmental divisions of the United States. In addition to the 50 states, the Census Bureau treats the District of Columbia, Puerto Rico, American Samoa, the Commonwealth of the Northern Mariana Islands, Guam, and the U.S. Virgin Islands as the statistical equivalents of states for the purpose of data presentation.|2013|obs_f3f0912fe24bc0c976e837b5a116d0c803cc01ce +"us.census.tiger".puma|PUMAs are geographic areas for which the Census Bureau provides selected extracts of raw data from a small sample of census records that are screened to protect confidentiality. These extracts are referred to as public use microdata sample (PUMS) files. + +For the 2010 Census, each state, the District of Columbia, Puerto Rico, and some Island Area participants delineated PUMAs for use in presenting PUMS data based on a 5 percent sample of decennial census or American Community Survey data. These areas are required to contain at least 100,000 people. This is different from Census 2000 when two types of PUMAs were defined: a 5 percent PUMA as for 2010 and an additional super-PUMA designed to provide a 1 percent sample. The PUMAs are identified by a five-digit census code unique within state.|2013|obs_0008b162b516c295d7204c9ba043ab5dbc67c59c +"us.census.tiger".zcta5|ZCTAs are approximate area representations of U.S. Postal Service (USPS) five-digit ZIP Code service areas that the Census Bureau creates using whole blocks to present statistical data from censuses and surveys. The Census Bureau defines ZCTAs by allocating each block that contains addresses to a single ZCTA, usually to the ZCTA that reflects the most frequently occurring ZIP Code for the addresses within that tabulation block. Blocks that do not contain addresses but are completely surrounded by a single ZCTA (enclaves) are assigned to the surrounding ZCTA; those surrounded by multiple ZCTAs will be added to a single ZCTA based on limited buffering performed between multiple ZCTAs. The Census Bureau identifies five-digit ZCTAs using a five-character numeric code that represents the most frequently occurring USPS ZIP Code within that ZCTA, and this code may contain leading zeros. + +There are significant changes to the 2010 ZCTA delineation from that used in 2000. Coverage was extended to include the Island Areas for 2010 so that the United States, Puerto Rico, and the Island Areas have ZCTAs. Unlike 2000, when areas that could not be assigned to a ZCTA were given a generic code ending in \u201cXX\u201d (land area) or \u201cHH\u201d (water area), for 2010 there is no universal coverage by ZCTAs, and only legitimate five-digit areas are defined. The 2010 ZCTAs will better represent the actual Zip Code service areas because the Census Bureau initiated a process before creation of 2010 blocks to add block boundaries that split polygons with large numbers of addresses using different Zip Codes. + +Data users should not use ZCTAs to identify the official USPS ZIP Code for mail delivery. The USPS makes periodic changes to ZIP Codes to support more efficient mail delivery. The ZCTAs process used primarily residential addresses and was biased towards Zip Codes used for city-style mail delivery, thus there may be Zip Codes that are primarily nonresidential or boxes only that may not have a corresponding ZCTA.|2013|obs_d483723c5cc76c107d9e0af279d1e7056df3c2be +"us.census.tiger".county|The primary legal divisions of most states are termed counties. In Louisiana, these divisions are known as parishes. In Alaska, which has no counties, the equivalent entities are the organized boroughs, city and boroughs, municipalities, and census areas; the latter of which are delineated cooperatively for statistical purposes by the state of Alaska and the Census Bureau. In four states (Maryland, Missouri, Nevada, and Virginia), there are one or more incorporated places that are independent of any county organization and thus constitute primary divisions of their states. These incorporated places are known as independent cities and are treated as equivalent entities for purposes of data presentation. The District of Columbia and Guam have no primary divisions, and each area is considered an equivalent entity for purposes of data presentation. All of the counties in Connecticut and Rhode Island and nine counties in Massachusetts were dissolved as functioning governmental entities; however, the Census Bureau continues to present data for these historical entities in order to provide comparable geographic units at the county level of the geographic hierarchy for these states and represents them as nonfunctioning legal entities in data products. The Census Bureau treats the following entities as equivalents of counties for purposes of data presentation: municipios in Puerto Rico, districts and islands in American Samoa, municipalities in the Commonwealth of the Northern Mariana Islands, and islands in the U.S. Virgin Islands. Each county or statistically equivalent entity is assigned a three-character numeric Federal Information Processing Series (FIPS) code based on alphabetical sequence that is unique within state and an eight-digit National Standard feature identifier.|2013|obs_b0ef6dd68d5faddbf231fd7f02916b3d00ec43c4 +"us.census.tiger".state|States and Equivalent Entities are the primary governmental divisions of the United States. In addition to the 50 states, the Census Bureau treats the District of Columbia, Puerto Rico, American Samoa, the Commonwealth of the Northern Mariana Islands, Guam, and the U.S. Virgin Islands as the statistical equivalents of states for the purpose of data presentation.|2013|obs_a20f5260b618a2fe2eb95fc1e23febe0db7db096 +"us.census.tiger".county|The primary legal divisions of most states are termed counties. In Louisiana, these divisions are known as parishes. In Alaska, which has no counties, the equivalent entities are the organized boroughs, city and boroughs, municipalities, and census areas; the latter of which are delineated cooperatively for statistical purposes by the state of Alaska and the Census Bureau. In four states (Maryland, Missouri, Nevada, and Virginia), there are one or more incorporated places that are independent of any county organization and thus constitute primary divisions of their states. These incorporated places are known as independent cities and are treated as equivalent entities for purposes of data presentation. The District of Columbia and Guam have no primary divisions, and each area is considered an equivalent entity for purposes of data presentation. All of the counties in Connecticut and Rhode Island and nine counties in Massachusetts were dissolved as functioning governmental entities; however, the Census Bureau continues to present data for these historical entities in order to provide comparable geographic units at the county level of the geographic hierarchy for these states and represents them as nonfunctioning legal entities in data products. The Census Bureau treats the following entities as equivalents of counties for purposes of data presentation: municipios in Puerto Rico, districts and islands in American Samoa, municipalities in the Commonwealth of the Northern Mariana Islands, and islands in the U.S. Virgin Islands. Each county or statistically equivalent entity is assigned a three-character numeric Federal Information Processing Series (FIPS) code based on alphabetical sequence that is unique within state and an eight-digit National Standard feature identifier.|2013|obs_23da37d4e66e9de2f525572967f8618bde99a8c0 +"us.census.tiger".census_tract|Census tracts are identified by an up to four-digit integer number and may have an optional two-digit suffix; for example 1457.02 or 23. The census tract codes consist of six digits with an implied decimal between the fourth and fifth digit corresponding to the basic census tract number but with leading zeroes and trailing zeroes for census tracts without a suffix. The tract number examples above would have codes of 145702 and 002300, respectively. + +Some ranges of census tract numbers in the 2010 Census are used to identify distinctive types of census tracts. The code range in the 9400s is used for those census tracts with a majority of population, housing, or land area associated with an American Indian area and matches the numbering used in Census 2000. The code range in the 9800s is new for 2010 and is used to specifically identify special land-use census tracts; that is, census tracts defined to encompass a large area with little or no residential population with special characteristics, such as large parks or employment areas. The range of census tracts in the 9900s represents census tracts delineated specifically to cover large bodies of water. This is different from Census 2000 when water-only census tracts were assigned codes of all zeroes (000000); 000000 is no longer used as a census tract code for the 2010 Census. + +The Census Bureau uses suffixes to help identify census tract changes for comparison purposes. Census tract suffixes may range from .01 to .98. As part of local review of existing census tracts before each census, some census tracts may have grown enough in population size to qualify as more than one census tract. When a census tract is split, the split parts usually retain the basic number but receive different suffixes. For example, if census tract 14 is split, the new tract numbers would be 14.01 and 14.02. In a few counties, local participants request major changes to, and renumbering of, the census tracts; however, this is generally discouraged. Changes to individual census tract boundaries usually do not result in census tract numbering changes. + +The Census Bureau introduced the concept of tribal census tracts for the first time for Census 2000. Tribal census tracts for that census consisted of the standard county-based census tracts tabulated within American Indian areas, thus allowing for the tracts to ignore state and county boundaries for tabulation. The Census Bureau assigned the 9400 range of numbers to identify specific tribal census tracts; however, not all tribal census tracts used this numbering scheme. For the 2010 Census, tribal census tracts no longer are tied to or numbered in the same way as the county-based census tracts (see \u201cTribal Census Tract\u201d).|2013|obs_d125aeef87aaa23287a40b454519ece22ee25acf +"us.census.tiger".block_group|Block groups (BGs) are statistical divisions of census tracts, are generally defined to contain between 600 and 3,000 people, and are used to present data and control block numbering. A block group consists of clusters of blocks within the same census tract that have the same first digit of their four-digit census block number. For example, blocks 3001, 3002, 3003, ..., 3999 in census tract 1210.02 belong to BG 3 in that census tract. Most BGs were delineated by local participants in the Census Bureau\u2019s Participant Statistical Areas Program. The Census Bureau delineated BGs only where a local or tribal government declined to participate, and a regional organization or State Data Center was not available to participate. + +A BG usually covers a contiguous area. Each census tract contains at least one BG, and BGs are uniquely numbered within the census tract. Within the standard census geographic hierarchy, BGs never cross state, county, or census tract boundaries but may cross the boundaries of any other geographic entity. Tribal census tracts and tribal BGs are separate and unique geographic areas defined within federally recognized American Indian reservations and can cross state and county boundaries (see \u201cTribal Census Tract\u201d and \u201cTribal Block Group\u201d). The tribal census tracts and tribal block groups may be completely different from the census tracts and block groups defined by state and county.|2013|obs_d610cb3225f282693b8d4dcd98d2c2e2078354c6 +(10 rows) Dropping obs_table.sql fixture table... Done. Dropping obs_column.sql fixture table... @@ -52,47 +91,3 @@ Dropping obs_d34555209878e8c4b37cf0b2b3d072ff129ec470 fixture table... Done. Dropping obs_b0ef6dd68d5faddbf231fd7f02916b3d00ec43c4 fixture table... Done. - - obs_search --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - ("""es.ine"".total_pop","The total number of all people living in a geographic area.","Total Population",sum,es.ine) - ("""us.census.acs"".B01001001","The total number of all people living in a given geographic area. This is a very useful catch-all denominator when calculating rates.","Total Population",sum,us.census.acs) - ("""us.census.acs"".B01001001_quantile","The total number of all people living in a given geographic area. This is a very useful catch-all denominator when calculating rates.","Quantile:Total Population",quantile,us.census.acs) -(3 rows) - - boundary_id | description | time_span | tablename ---------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-----------+---------------------------------------------- - "us.census.tiger".block_group | Block groups (BGs) are statistical divisions of census tracts, are generally defined to contain between 600 and 3,000 people, and are used to present data and control block numbering. A block group consists of clusters of blocks within the same census tract that have the same first digit of their four-digit census block number. For example, blocks 3001, 3002, 3003, ..., 3999 in census tract 1210.02 belong to BG 3 in that census tract. Most BGs were delineated by local participants in the Census Bureau\u2019s Participant Statistical Areas Program. The Census Bureau delineated BGs only where a local or tribal government declined to participate, and a regional organization or State Data Center was not available to participate.\r +| 2013 | obs_85328201013baa14e8e8a4a57a01e6f6fbc5f9b1 - | \r +| | - | A BG usually covers a contiguous area. Each census tract contains at least one BG, and BGs are uniquely numbered within the census tract. Within the standard census geographic hierarchy, BGs never cross state, county, or census tract boundaries but may cross the boundaries of any other geographic entity. Tribal census tracts and tribal BGs are separate and unique geographic areas defined within federally recognized American Indian reservations and can cross state and county boundaries (see \u201cTribal Census Tract\u201d and \u201cTribal Block Group\u201d). The tribal census tracts and tribal block groups may be completely different from the census tracts and block groups defined by state and county. | | - "us.census.tiger".census_tract | Census tracts are identified by an up to four-digit integer number and may have an optional two-digit suffix; for example 1457.02 or 23. The census tract codes consist of six digits with an implied decimal between the fourth and fifth digit corresponding to the basic census tract number but with leading zeroes and trailing zeroes for census tracts without a suffix. The tract number examples above would have codes of 145702 and 002300, respectively.\r +| 2013 | obs_a92e1111ad3177676471d66bb8036e6d057f271b - | \r +| | - | Some ranges of census tract numbers in the 2010 Census are used to identify distinctive types of census tracts. The code range in the 9400s is used for those census tracts with a majority of population, housing, or land area associated with an American Indian area and matches the numbering used in Census 2000. The code range in the 9800s is new for 2010 and is used to specifically identify special land-use census tracts; that is, census tracts defined to encompass a large area with little or no residential population with special characteristics, such as large parks or employment areas. The range of census tracts in the 9900s represents census tracts delineated specifically to cover large bodies of water. This is different from Census 2000 when water-only census tracts were assigned codes of all zeroes (000000); 000000 is no longer used as a census tract code for the 2010 Census.\r +| | - | \r +| | - | The Census Bureau uses suffixes to help identify census tract changes for comparison purposes. Census tract suffixes may range from .01 to .98. As part of local review of existing census tracts before each census, some census tracts may have grown enough in population size to qualify as more than one census tract. When a census tract is split, the split parts usually retain the basic number but receive different suffixes. For example, if census tract 14 is split, the new tract numbers would be 14.01 and 14.02. In a few counties, local participants request major changes to, and renumbering of, the census tracts; however, this is generally discouraged. Changes to individual census tract boundaries usually do not result in census tract numbering changes.\r +| | - | \r +| | - | The Census Bureau introduced the concept of tribal census tracts for the first time for Census 2000. Tribal census tracts for that census consisted of the standard county-based census tracts tabulated within American Indian areas, thus allowing for the tracts to ignore state and county boundaries for tabulation. The Census Bureau assigned the 9400 range of numbers to identify specific tribal census tracts; however, not all tribal census tracts used this numbering scheme. For the 2010 Census, tribal census tracts no longer are tied to or numbered in the same way as the county-based census tracts (see \u201cTribal Census Tract\u201d). | | - "us.census.tiger".state | States and Equivalent Entities are the primary governmental divisions of the United States. In addition to the 50 states, the Census Bureau treats the District of Columbia, Puerto Rico, American Samoa, the Commonwealth of the Northern Mariana Islands, Guam, and the U.S. Virgin Islands as the statistical equivalents of states for the purpose of data presentation. | 2013 | obs_f3f0912fe24bc0c976e837b5a116d0c803cc01ce - "us.census.tiger".puma | PUMAs are geographic areas for which the Census Bureau provides selected extracts of raw data from a small sample of census records that are screened to protect confidentiality. These extracts are referred to as public use microdata sample (PUMS) files.\r +| 2013 | obs_0008b162b516c295d7204c9ba043ab5dbc67c59c - | \r +| | - | For the 2010 Census, each state, the District of Columbia, Puerto Rico, and some Island Area participants delineated PUMAs for use in presenting PUMS data based on a 5 percent sample of decennial census or American Community Survey data. These areas are required to contain at least 100,000 people. This is different from Census 2000 when two types of PUMAs were defined: a 5 percent PUMA as for 2010 and an additional super-PUMA designed to provide a 1 percent sample. The PUMAs are identified by a five-digit census code unique within state. | | - "us.census.tiger".zcta5 | ZCTAs are approximate area representations of U.S. Postal Service (USPS) five-digit ZIP Code service areas that the Census Bureau creates using whole blocks to present statistical data from censuses and surveys. The Census Bureau defines ZCTAs by allocating each block that contains addresses to a single ZCTA, usually to the ZCTA that reflects the most frequently occurring ZIP Code for the addresses within that tabulation block. Blocks that do not contain addresses but are completely surrounded by a single ZCTA (enclaves) are assigned to the surrounding ZCTA; those surrounded by multiple ZCTAs will be added to a single ZCTA based on limited buffering performed between multiple ZCTAs. The Census Bureau identifies five-digit ZCTAs using a five-character numeric code that represents the most frequently occurring USPS ZIP Code within that ZCTA, and this code may contain leading zeros.\r +| 2013 | obs_d483723c5cc76c107d9e0af279d1e7056df3c2be - | \r +| | - | There are significant changes to the 2010 ZCTA delineation from that used in 2000. Coverage was extended to include the Island Areas for 2010 so that the United States, Puerto Rico, and the Island Areas have ZCTAs. Unlike 2000, when areas that could not be assigned to a ZCTA were given a generic code ending in \u201cXX\u201d (land area) or \u201cHH\u201d (water area), for 2010 there is no universal coverage by ZCTAs, and only legitimate five-digit areas are defined. The 2010 ZCTAs will better represent the actual Zip Code service areas because the Census Bureau initiated a process before creation of 2010 blocks to add block boundaries that split polygons with large numbers of addresses using different Zip Codes.\r +| | - | \r +| | - | Data users should not use ZCTAs to identify the official USPS ZIP Code for mail delivery. The USPS makes periodic changes to ZIP Codes to support more efficient mail delivery. The ZCTAs process used primarily residential addresses and was biased towards Zip Codes used for city-style mail delivery, thus there may be Zip Codes that are primarily nonresidential or boxes only that may not have a corresponding ZCTA. | | - "us.census.tiger".county | The primary legal divisions of most states are termed counties. In Louisiana, these divisions are known as parishes. In Alaska, which has no counties, the equivalent entities are the organized boroughs, city and boroughs, municipalities, and census areas; the latter of which are delineated cooperatively for statistical purposes by the state of Alaska and the Census Bureau. In four states (Maryland, Missouri, Nevada, and Virginia), there are one or more incorporated places that are independent of any county organization and thus constitute primary divisions of their states. These incorporated places are known as independent cities and are treated as equivalent entities for purposes of data presentation. The District of Columbia and Guam have no primary divisions, and each area is considered an equivalent entity for purposes of data presentation. All of the counties in Connecticut and Rhode Island and nine counties in Massachusetts were dissolved as functioning governmental entities; however, the Census Bureau continues to present data for these historical entities in order to provide comparable geographic units at the county level of the geographic hierarchy for these states and represents them as nonfunctioning legal entities in data products. The Census Bureau treats the following entities as equivalents of counties for purposes of data presentation: municipios in Puerto Rico, districts and islands in American Samoa, municipalities in the Commonwealth of the Northern Mariana Islands, and islands in the U.S. Virgin Islands. Each county or statistically equivalent entity is assigned a three-character numeric Federal Information Processing Series (FIPS) code based on alphabetical sequence that is unique within state and an eight-digit National Standard feature identifier. | 2013 | obs_b0ef6dd68d5faddbf231fd7f02916b3d00ec43c4 - "us.census.tiger".state | States and Equivalent Entities are the primary governmental divisions of the United States. In addition to the 50 states, the Census Bureau treats the District of Columbia, Puerto Rico, American Samoa, the Commonwealth of the Northern Mariana Islands, Guam, and the U.S. Virgin Islands as the statistical equivalents of states for the purpose of data presentation. | 2013 | obs_a20f5260b618a2fe2eb95fc1e23febe0db7db096 - "us.census.tiger".county | The primary legal divisions of most states are termed counties. In Louisiana, these divisions are known as parishes. In Alaska, which has no counties, the equivalent entities are the organized boroughs, city and boroughs, municipalities, and census areas; the latter of which are delineated cooperatively for statistical purposes by the state of Alaska and the Census Bureau. In four states (Maryland, Missouri, Nevada, and Virginia), there are one or more incorporated places that are independent of any county organization and thus constitute primary divisions of their states. These incorporated places are known as independent cities and are treated as equivalent entities for purposes of data presentation. The District of Columbia and Guam have no primary divisions, and each area is considered an equivalent entity for purposes of data presentation. All of the counties in Connecticut and Rhode Island and nine counties in Massachusetts were dissolved as functioning governmental entities; however, the Census Bureau continues to present data for these historical entities in order to provide comparable geographic units at the county level of the geographic hierarchy for these states and represents them as nonfunctioning legal entities in data products. The Census Bureau treats the following entities as equivalents of counties for purposes of data presentation: municipios in Puerto Rico, districts and islands in American Samoa, municipalities in the Commonwealth of the Northern Mariana Islands, and islands in the U.S. Virgin Islands. Each county or statistically equivalent entity is assigned a three-character numeric Federal Information Processing Series (FIPS) code based on alphabetical sequence that is unique within state and an eight-digit National Standard feature identifier. | 2013 | obs_23da37d4e66e9de2f525572967f8618bde99a8c0 - "us.census.tiger".census_tract | Census tracts are identified by an up to four-digit integer number and may have an optional two-digit suffix; for example 1457.02 or 23. The census tract codes consist of six digits with an implied decimal between the fourth and fifth digit corresponding to the basic census tract number but with leading zeroes and trailing zeroes for census tracts without a suffix. The tract number examples above would have codes of 145702 and 002300, respectively.\r +| 2013 | obs_d125aeef87aaa23287a40b454519ece22ee25acf - | \r +| | - | Some ranges of census tract numbers in the 2010 Census are used to identify distinctive types of census tracts. The code range in the 9400s is used for those census tracts with a majority of population, housing, or land area associated with an American Indian area and matches the numbering used in Census 2000. The code range in the 9800s is new for 2010 and is used to specifically identify special land-use census tracts; that is, census tracts defined to encompass a large area with little or no residential population with special characteristics, such as large parks or employment areas. The range of census tracts in the 9900s represents census tracts delineated specifically to cover large bodies of water. This is different from Census 2000 when water-only census tracts were assigned codes of all zeroes (000000); 000000 is no longer used as a census tract code for the 2010 Census.\r +| | - | \r +| | - | The Census Bureau uses suffixes to help identify census tract changes for comparison purposes. Census tract suffixes may range from .01 to .98. As part of local review of existing census tracts before each census, some census tracts may have grown enough in population size to qualify as more than one census tract. When a census tract is split, the split parts usually retain the basic number but receive different suffixes. For example, if census tract 14 is split, the new tract numbers would be 14.01 and 14.02. In a few counties, local participants request major changes to, and renumbering of, the census tracts; however, this is generally discouraged. Changes to individual census tract boundaries usually do not result in census tract numbering changes.\r +| | - | \r +| | - | The Census Bureau introduced the concept of tribal census tracts for the first time for Census 2000. Tribal census tracts for that census consisted of the standard county-based census tracts tabulated within American Indian areas, thus allowing for the tracts to ignore state and county boundaries for tabulation. The Census Bureau assigned the 9400 range of numbers to identify specific tribal census tracts; however, not all tribal census tracts used this numbering scheme. For the 2010 Census, tribal census tracts no longer are tied to or numbered in the same way as the county-based census tracts (see \u201cTribal Census Tract\u201d). | | - "us.census.tiger".block_group | Block groups (BGs) are statistical divisions of census tracts, are generally defined to contain between 600 and 3,000 people, and are used to present data and control block numbering. A block group consists of clusters of blocks within the same census tract that have the same first digit of their four-digit census block number. For example, blocks 3001, 3002, 3003, ..., 3999 in census tract 1210.02 belong to BG 3 in that census tract. Most BGs were delineated by local participants in the Census Bureau\u2019s Participant Statistical Areas Program. The Census Bureau delineated BGs only where a local or tribal government declined to participate, and a regional organization or State Data Center was not available to participate.\r +| 2013 | obs_d610cb3225f282693b8d4dcd98d2c2e2078354c6 - | \r +| | - | A BG usually covers a contiguous area. Each census tract contains at least one BG, and BGs are uniquely numbered within the census tract. Within the standard census geographic hierarchy, BGs never cross state, county, or census tract boundaries but may cross the boundaries of any other geographic entity. Tribal census tracts and tribal BGs are separate and unique geographic areas defined within federally recognized American Indian reservations and can cross state and county boundaries (see \u201cTribal Census Tract\u201d and \u201cTribal Block Group\u201d). The tribal census tracts and tribal block groups may be completely different from the census tracts and block groups defined by state and county. | | -(10 rows) - From 34e2fdd284403a12a272bbd97e8006dd25c4d6e9 Mon Sep 17 00:00:00 2001 From: John Krauss Date: Mon, 25 Apr 2016 16:10:10 -0400 Subject: [PATCH 40/41] carriage return for multiline --- .../42_observatory_exploration_test.out | 34 ++++--------------- 1 file changed, 6 insertions(+), 28 deletions(-) diff --git a/src/pg/test/expected/42_observatory_exploration_test.out b/src/pg/test/expected/42_observatory_exploration_test.out index 7d831d7..5168738 100644 --- a/src/pg/test/expected/42_observatory_exploration_test.out +++ b/src/pg/test/expected/42_observatory_exploration_test.out @@ -36,38 +36,16 @@ obs_search ("""us.census.acs"".B01001001_quantile","The total number of all people living in a given geographic area. This is a very useful catch-all denominator when calculating rates.","Quantile:Total Population",quantile,us.census.acs) (3 rows) boundary_id|description|time_span|tablename -"us.census.tiger".block_group|Block groups (BGs) are statistical divisions of census tracts, are generally defined to contain between 600 and 3,000 people, and are used to present data and control block numbering. A block group consists of clusters of blocks within the same census tract that have the same first digit of their four-digit census block number. For example, blocks 3001, 3002, 3003, ..., 3999 in census tract 1210.02 belong to BG 3 in that census tract. Most BGs were delineated by local participants in the Census Bureau\u2019s Participant Statistical Areas Program. The Census Bureau delineated BGs only where a local or tribal government declined to participate, and a regional organization or State Data Center was not available to participate. - -A BG usually covers a contiguous area. Each census tract contains at least one BG, and BGs are uniquely numbered within the census tract. Within the standard census geographic hierarchy, BGs never cross state, county, or census tract boundaries but may cross the boundaries of any other geographic entity. Tribal census tracts and tribal BGs are separate and unique geographic areas defined within federally recognized American Indian reservations and can cross state and county boundaries (see \u201cTribal Census Tract\u201d and \u201cTribal Block Group\u201d). The tribal census tracts and tribal block groups may be completely different from the census tracts and block groups defined by state and county.|2013|obs_85328201013baa14e8e8a4a57a01e6f6fbc5f9b1 -"us.census.tiger".census_tract|Census tracts are identified by an up to four-digit integer number and may have an optional two-digit suffix; for example 1457.02 or 23. The census tract codes consist of six digits with an implied decimal between the fourth and fifth digit corresponding to the basic census tract number but with leading zeroes and trailing zeroes for census tracts without a suffix. The tract number examples above would have codes of 145702 and 002300, respectively. - -Some ranges of census tract numbers in the 2010 Census are used to identify distinctive types of census tracts. The code range in the 9400s is used for those census tracts with a majority of population, housing, or land area associated with an American Indian area and matches the numbering used in Census 2000. The code range in the 9800s is new for 2010 and is used to specifically identify special land-use census tracts; that is, census tracts defined to encompass a large area with little or no residential population with special characteristics, such as large parks or employment areas. The range of census tracts in the 9900s represents census tracts delineated specifically to cover large bodies of water. This is different from Census 2000 when water-only census tracts were assigned codes of all zeroes (000000); 000000 is no longer used as a census tract code for the 2010 Census. - -The Census Bureau uses suffixes to help identify census tract changes for comparison purposes. Census tract suffixes may range from .01 to .98. As part of local review of existing census tracts before each census, some census tracts may have grown enough in population size to qualify as more than one census tract. When a census tract is split, the split parts usually retain the basic number but receive different suffixes. For example, if census tract 14 is split, the new tract numbers would be 14.01 and 14.02. In a few counties, local participants request major changes to, and renumbering of, the census tracts; however, this is generally discouraged. Changes to individual census tract boundaries usually do not result in census tract numbering changes. - -The Census Bureau introduced the concept of tribal census tracts for the first time for Census 2000. Tribal census tracts for that census consisted of the standard county-based census tracts tabulated within American Indian areas, thus allowing for the tracts to ignore state and county boundaries for tabulation. The Census Bureau assigned the 9400 range of numbers to identify specific tribal census tracts; however, not all tribal census tracts used this numbering scheme. For the 2010 Census, tribal census tracts no longer are tied to or numbered in the same way as the county-based census tracts (see \u201cTribal Census Tract\u201d).|2013|obs_a92e1111ad3177676471d66bb8036e6d057f271b +"us.census.tiger".block_group|Block groups (BGs) are statistical divisions of census tracts, are generally defined to contain between 600 and 3,000 people, and are used to present data and control block numbering. A block group consists of clusters of blocks within the same census tract that have the same first digit of their four-digit census block number. For example, blocks 3001, 3002, 3003, ..., 3999 in census tract 1210.02 belong to BG 3 in that census tract. Most BGs were delineated by local participants in the Census Bureau\u2019s Participant Statistical Areas Program. The Census Bureau delineated BGs only where a local or tribal government declined to participate, and a regional organization or State Data Center was not available to participate. A BG usually covers a contiguous area. Each census tract contains at least one BG, and BGs are uniquely numbered within the census tract. Within the standard census geographic hierarchy, BGs never cross state, county, or census tract boundaries but may cross the boundaries of any other geographic entity. Tribal census tracts and tribal BGs are separate and unique geographic areas defined within federally recognized American Indian reservations and can cross state and county boundaries (see \u201cTribal Census Tract\u201d and \u201cTribal Block Group\u201d). The tribal census tracts and tribal block groups may be completely different from the census tracts and block groups defined by state and county.|2013|obs_85328201013baa14e8e8a4a57a01e6f6fbc5f9b1 +"us.census.tiger".census_tract|Census tracts are identified by an up to four-digit integer number and may have an optional two-digit suffix; for example 1457.02 or 23. The census tract codes consist of six digits with an implied decimal between the fourth and fifth digit corresponding to the basic census tract number but with leading zeroes and trailing zeroes for census tracts without a suffix. The tract number examples above would have codes of 145702 and 002300, respectively. Some ranges of census tract numbers in the 2010 Census are used to identify distinctive types of census tracts. The code range in the 9400s is used for those census tracts with a majority of population, housing, or land area associated with an American Indian area and matches the numbering used in Census 2000. The code range in the 9800s is new for 2010 and is used to specifically identify special land-use census tracts; that is, census tracts defined to encompass a large area with little or no residential population with special characteristics, such as large parks or employment areas. The range of census tracts in the 9900s represents census tracts delineated specifically to cover large bodies of water. This is different from Census 2000 when water-only census tracts were assigned codes of all zeroes (000000); 000000 is no longer used as a census tract code for the 2010 Census. The Census Bureau uses suffixes to help identify census tract changes for comparison purposes. Census tract suffixes may range from .01 to .98. As part of local review of existing census tracts before each census, some census tracts may have grown enough in population size to qualify as more than one census tract. When a census tract is split, the split parts usually retain the basic number but receive different suffixes. For example, if census tract 14 is split, the new tract numbers would be 14.01 and 14.02. In a few counties, local participants request major changes to, and renumbering of, the census tracts; however, this is generally discouraged. Changes to individual census tract boundaries usually do not result in census tract numbering changes. The Census Bureau introduced the concept of tribal census tracts for the first time for Census 2000. Tribal census tracts for that census consisted of the standard county-based census tracts tabulated within American Indian areas, thus allowing for the tracts to ignore state and county boundaries for tabulation. The Census Bureau assigned the 9400 range of numbers to identify specific tribal census tracts; however, not all tribal census tracts used this numbering scheme. For the 2010 Census, tribal census tracts no longer are tied to or numbered in the same way as the county-based census tracts (see \u201cTribal Census Tract\u201d).|2013|obs_a92e1111ad3177676471d66bb8036e6d057f271b "us.census.tiger".state|States and Equivalent Entities are the primary governmental divisions of the United States. In addition to the 50 states, the Census Bureau treats the District of Columbia, Puerto Rico, American Samoa, the Commonwealth of the Northern Mariana Islands, Guam, and the U.S. Virgin Islands as the statistical equivalents of states for the purpose of data presentation.|2013|obs_f3f0912fe24bc0c976e837b5a116d0c803cc01ce -"us.census.tiger".puma|PUMAs are geographic areas for which the Census Bureau provides selected extracts of raw data from a small sample of census records that are screened to protect confidentiality. These extracts are referred to as public use microdata sample (PUMS) files. - -For the 2010 Census, each state, the District of Columbia, Puerto Rico, and some Island Area participants delineated PUMAs for use in presenting PUMS data based on a 5 percent sample of decennial census or American Community Survey data. These areas are required to contain at least 100,000 people. This is different from Census 2000 when two types of PUMAs were defined: a 5 percent PUMA as for 2010 and an additional super-PUMA designed to provide a 1 percent sample. The PUMAs are identified by a five-digit census code unique within state.|2013|obs_0008b162b516c295d7204c9ba043ab5dbc67c59c -"us.census.tiger".zcta5|ZCTAs are approximate area representations of U.S. Postal Service (USPS) five-digit ZIP Code service areas that the Census Bureau creates using whole blocks to present statistical data from censuses and surveys. The Census Bureau defines ZCTAs by allocating each block that contains addresses to a single ZCTA, usually to the ZCTA that reflects the most frequently occurring ZIP Code for the addresses within that tabulation block. Blocks that do not contain addresses but are completely surrounded by a single ZCTA (enclaves) are assigned to the surrounding ZCTA; those surrounded by multiple ZCTAs will be added to a single ZCTA based on limited buffering performed between multiple ZCTAs. The Census Bureau identifies five-digit ZCTAs using a five-character numeric code that represents the most frequently occurring USPS ZIP Code within that ZCTA, and this code may contain leading zeros. - -There are significant changes to the 2010 ZCTA delineation from that used in 2000. Coverage was extended to include the Island Areas for 2010 so that the United States, Puerto Rico, and the Island Areas have ZCTAs. Unlike 2000, when areas that could not be assigned to a ZCTA were given a generic code ending in \u201cXX\u201d (land area) or \u201cHH\u201d (water area), for 2010 there is no universal coverage by ZCTAs, and only legitimate five-digit areas are defined. The 2010 ZCTAs will better represent the actual Zip Code service areas because the Census Bureau initiated a process before creation of 2010 blocks to add block boundaries that split polygons with large numbers of addresses using different Zip Codes. - -Data users should not use ZCTAs to identify the official USPS ZIP Code for mail delivery. The USPS makes periodic changes to ZIP Codes to support more efficient mail delivery. The ZCTAs process used primarily residential addresses and was biased towards Zip Codes used for city-style mail delivery, thus there may be Zip Codes that are primarily nonresidential or boxes only that may not have a corresponding ZCTA.|2013|obs_d483723c5cc76c107d9e0af279d1e7056df3c2be +"us.census.tiger".puma|PUMAs are geographic areas for which the Census Bureau provides selected extracts of raw data from a small sample of census records that are screened to protect confidentiality. These extracts are referred to as public use microdata sample (PUMS) files. For the 2010 Census, each state, the District of Columbia, Puerto Rico, and some Island Area participants delineated PUMAs for use in presenting PUMS data based on a 5 percent sample of decennial census or American Community Survey data. These areas are required to contain at least 100,000 people. This is different from Census 2000 when two types of PUMAs were defined: a 5 percent PUMA as for 2010 and an additional super-PUMA designed to provide a 1 percent sample. The PUMAs are identified by a five-digit census code unique within state.|2013|obs_0008b162b516c295d7204c9ba043ab5dbc67c59c +"us.census.tiger".zcta5|ZCTAs are approximate area representations of U.S. Postal Service (USPS) five-digit ZIP Code service areas that the Census Bureau creates using whole blocks to present statistical data from censuses and surveys. The Census Bureau defines ZCTAs by allocating each block that contains addresses to a single ZCTA, usually to the ZCTA that reflects the most frequently occurring ZIP Code for the addresses within that tabulation block. Blocks that do not contain addresses but are completely surrounded by a single ZCTA (enclaves) are assigned to the surrounding ZCTA; those surrounded by multiple ZCTAs will be added to a single ZCTA based on limited buffering performed between multiple ZCTAs. The Census Bureau identifies five-digit ZCTAs using a five-character numeric code that represents the most frequently occurring USPS ZIP Code within that ZCTA, and this code may contain leading zeros. There are significant changes to the 2010 ZCTA delineation from that used in 2000. Coverage was extended to include the Island Areas for 2010 so that the United States, Puerto Rico, and the Island Areas have ZCTAs. Unlike 2000, when areas that could not be assigned to a ZCTA were given a generic code ending in \u201cXX\u201d (land area) or \u201cHH\u201d (water area), for 2010 there is no universal coverage by ZCTAs, and only legitimate five-digit areas are defined. The 2010 ZCTAs will better represent the actual Zip Code service areas because the Census Bureau initiated a process before creation of 2010 blocks to add block boundaries that split polygons with large numbers of addresses using different Zip Codes. Data users should not use ZCTAs to identify the official USPS ZIP Code for mail delivery. The USPS makes periodic changes to ZIP Codes to support more efficient mail delivery. The ZCTAs process used primarily residential addresses and was biased towards Zip Codes used for city-style mail delivery, thus there may be Zip Codes that are primarily nonresidential or boxes only that may not have a corresponding ZCTA.|2013|obs_d483723c5cc76c107d9e0af279d1e7056df3c2be "us.census.tiger".county|The primary legal divisions of most states are termed counties. In Louisiana, these divisions are known as parishes. In Alaska, which has no counties, the equivalent entities are the organized boroughs, city and boroughs, municipalities, and census areas; the latter of which are delineated cooperatively for statistical purposes by the state of Alaska and the Census Bureau. In four states (Maryland, Missouri, Nevada, and Virginia), there are one or more incorporated places that are independent of any county organization and thus constitute primary divisions of their states. These incorporated places are known as independent cities and are treated as equivalent entities for purposes of data presentation. The District of Columbia and Guam have no primary divisions, and each area is considered an equivalent entity for purposes of data presentation. All of the counties in Connecticut and Rhode Island and nine counties in Massachusetts were dissolved as functioning governmental entities; however, the Census Bureau continues to present data for these historical entities in order to provide comparable geographic units at the county level of the geographic hierarchy for these states and represents them as nonfunctioning legal entities in data products. The Census Bureau treats the following entities as equivalents of counties for purposes of data presentation: municipios in Puerto Rico, districts and islands in American Samoa, municipalities in the Commonwealth of the Northern Mariana Islands, and islands in the U.S. Virgin Islands. Each county or statistically equivalent entity is assigned a three-character numeric Federal Information Processing Series (FIPS) code based on alphabetical sequence that is unique within state and an eight-digit National Standard feature identifier.|2013|obs_b0ef6dd68d5faddbf231fd7f02916b3d00ec43c4 "us.census.tiger".state|States and Equivalent Entities are the primary governmental divisions of the United States. In addition to the 50 states, the Census Bureau treats the District of Columbia, Puerto Rico, American Samoa, the Commonwealth of the Northern Mariana Islands, Guam, and the U.S. Virgin Islands as the statistical equivalents of states for the purpose of data presentation.|2013|obs_a20f5260b618a2fe2eb95fc1e23febe0db7db096 "us.census.tiger".county|The primary legal divisions of most states are termed counties. In Louisiana, these divisions are known as parishes. In Alaska, which has no counties, the equivalent entities are the organized boroughs, city and boroughs, municipalities, and census areas; the latter of which are delineated cooperatively for statistical purposes by the state of Alaska and the Census Bureau. In four states (Maryland, Missouri, Nevada, and Virginia), there are one or more incorporated places that are independent of any county organization and thus constitute primary divisions of their states. These incorporated places are known as independent cities and are treated as equivalent entities for purposes of data presentation. The District of Columbia and Guam have no primary divisions, and each area is considered an equivalent entity for purposes of data presentation. All of the counties in Connecticut and Rhode Island and nine counties in Massachusetts were dissolved as functioning governmental entities; however, the Census Bureau continues to present data for these historical entities in order to provide comparable geographic units at the county level of the geographic hierarchy for these states and represents them as nonfunctioning legal entities in data products. The Census Bureau treats the following entities as equivalents of counties for purposes of data presentation: municipios in Puerto Rico, districts and islands in American Samoa, municipalities in the Commonwealth of the Northern Mariana Islands, and islands in the U.S. Virgin Islands. Each county or statistically equivalent entity is assigned a three-character numeric Federal Information Processing Series (FIPS) code based on alphabetical sequence that is unique within state and an eight-digit National Standard feature identifier.|2013|obs_23da37d4e66e9de2f525572967f8618bde99a8c0 -"us.census.tiger".census_tract|Census tracts are identified by an up to four-digit integer number and may have an optional two-digit suffix; for example 1457.02 or 23. The census tract codes consist of six digits with an implied decimal between the fourth and fifth digit corresponding to the basic census tract number but with leading zeroes and trailing zeroes for census tracts without a suffix. The tract number examples above would have codes of 145702 and 002300, respectively. - -Some ranges of census tract numbers in the 2010 Census are used to identify distinctive types of census tracts. The code range in the 9400s is used for those census tracts with a majority of population, housing, or land area associated with an American Indian area and matches the numbering used in Census 2000. The code range in the 9800s is new for 2010 and is used to specifically identify special land-use census tracts; that is, census tracts defined to encompass a large area with little or no residential population with special characteristics, such as large parks or employment areas. The range of census tracts in the 9900s represents census tracts delineated specifically to cover large bodies of water. This is different from Census 2000 when water-only census tracts were assigned codes of all zeroes (000000); 000000 is no longer used as a census tract code for the 2010 Census. - -The Census Bureau uses suffixes to help identify census tract changes for comparison purposes. Census tract suffixes may range from .01 to .98. As part of local review of existing census tracts before each census, some census tracts may have grown enough in population size to qualify as more than one census tract. When a census tract is split, the split parts usually retain the basic number but receive different suffixes. For example, if census tract 14 is split, the new tract numbers would be 14.01 and 14.02. In a few counties, local participants request major changes to, and renumbering of, the census tracts; however, this is generally discouraged. Changes to individual census tract boundaries usually do not result in census tract numbering changes. - -The Census Bureau introduced the concept of tribal census tracts for the first time for Census 2000. Tribal census tracts for that census consisted of the standard county-based census tracts tabulated within American Indian areas, thus allowing for the tracts to ignore state and county boundaries for tabulation. The Census Bureau assigned the 9400 range of numbers to identify specific tribal census tracts; however, not all tribal census tracts used this numbering scheme. For the 2010 Census, tribal census tracts no longer are tied to or numbered in the same way as the county-based census tracts (see \u201cTribal Census Tract\u201d).|2013|obs_d125aeef87aaa23287a40b454519ece22ee25acf -"us.census.tiger".block_group|Block groups (BGs) are statistical divisions of census tracts, are generally defined to contain between 600 and 3,000 people, and are used to present data and control block numbering. A block group consists of clusters of blocks within the same census tract that have the same first digit of their four-digit census block number. For example, blocks 3001, 3002, 3003, ..., 3999 in census tract 1210.02 belong to BG 3 in that census tract. Most BGs were delineated by local participants in the Census Bureau\u2019s Participant Statistical Areas Program. The Census Bureau delineated BGs only where a local or tribal government declined to participate, and a regional organization or State Data Center was not available to participate. - -A BG usually covers a contiguous area. Each census tract contains at least one BG, and BGs are uniquely numbered within the census tract. Within the standard census geographic hierarchy, BGs never cross state, county, or census tract boundaries but may cross the boundaries of any other geographic entity. Tribal census tracts and tribal BGs are separate and unique geographic areas defined within federally recognized American Indian reservations and can cross state and county boundaries (see \u201cTribal Census Tract\u201d and \u201cTribal Block Group\u201d). The tribal census tracts and tribal block groups may be completely different from the census tracts and block groups defined by state and county.|2013|obs_d610cb3225f282693b8d4dcd98d2c2e2078354c6 +"us.census.tiger".census_tract|Census tracts are identified by an up to four-digit integer number and may have an optional two-digit suffix; for example 1457.02 or 23. The census tract codes consist of six digits with an implied decimal between the fourth and fifth digit corresponding to the basic census tract number but with leading zeroes and trailing zeroes for census tracts without a suffix. The tract number examples above would have codes of 145702 and 002300, respectively. Some ranges of census tract numbers in the 2010 Census are used to identify distinctive types of census tracts. The code range in the 9400s is used for those census tracts with a majority of population, housing, or land area associated with an American Indian area and matches the numbering used in Census 2000. The code range in the 9800s is new for 2010 and is used to specifically identify special land-use census tracts; that is, census tracts defined to encompass a large area with little or no residential population with special characteristics, such as large parks or employment areas. The range of census tracts in the 9900s represents census tracts delineated specifically to cover large bodies of water. This is different from Census 2000 when water-only census tracts were assigned codes of all zeroes (000000); 000000 is no longer used as a census tract code for the 2010 Census. The Census Bureau uses suffixes to help identify census tract changes for comparison purposes. Census tract suffixes may range from .01 to .98. As part of local review of existing census tracts before each census, some census tracts may have grown enough in population size to qualify as more than one census tract. When a census tract is split, the split parts usually retain the basic number but receive different suffixes. For example, if census tract 14 is split, the new tract numbers would be 14.01 and 14.02. In a few counties, local participants request major changes to, and renumbering of, the census tracts; however, this is generally discouraged. Changes to individual census tract boundaries usually do not result in census tract numbering changes. The Census Bureau introduced the concept of tribal census tracts for the first time for Census 2000. Tribal census tracts for that census consisted of the standard county-based census tracts tabulated within American Indian areas, thus allowing for the tracts to ignore state and county boundaries for tabulation. The Census Bureau assigned the 9400 range of numbers to identify specific tribal census tracts; however, not all tribal census tracts used this numbering scheme. For the 2010 Census, tribal census tracts no longer are tied to or numbered in the same way as the county-based census tracts (see \u201cTribal Census Tract\u201d).|2013|obs_d125aeef87aaa23287a40b454519ece22ee25acf +"us.census.tiger".block_group|Block groups (BGs) are statistical divisions of census tracts, are generally defined to contain between 600 and 3,000 people, and are used to present data and control block numbering. A block group consists of clusters of blocks within the same census tract that have the same first digit of their four-digit census block number. For example, blocks 3001, 3002, 3003, ..., 3999 in census tract 1210.02 belong to BG 3 in that census tract. Most BGs were delineated by local participants in the Census Bureau\u2019s Participant Statistical Areas Program. The Census Bureau delineated BGs only where a local or tribal government declined to participate, and a regional organization or State Data Center was not available to participate. A BG usually covers a contiguous area. Each census tract contains at least one BG, and BGs are uniquely numbered within the census tract. Within the standard census geographic hierarchy, BGs never cross state, county, or census tract boundaries but may cross the boundaries of any other geographic entity. Tribal census tracts and tribal BGs are separate and unique geographic areas defined within federally recognized American Indian reservations and can cross state and county boundaries (see \u201cTribal Census Tract\u201d and \u201cTribal Block Group\u201d). The tribal census tracts and tribal block groups may be completely different from the census tracts and block groups defined by state and county.|2013|obs_d610cb3225f282693b8d4dcd98d2c2e2078354c6 (10 rows) Dropping obs_table.sql fixture table... Done. From 0274337ded880c3a7bce366ebaab7a5ab14c2139 Mon Sep 17 00:00:00 2001 From: John Krauss Date: Mon, 25 Apr 2016 16:15:54 -0400 Subject: [PATCH 41/41] include both carriage returns and newlines in test expectation --- .../42_observatory_exploration_test.out | 34 +++++++++++++++---- 1 file changed, 28 insertions(+), 6 deletions(-) diff --git a/src/pg/test/expected/42_observatory_exploration_test.out b/src/pg/test/expected/42_observatory_exploration_test.out index 5168738..c713950 100644 --- a/src/pg/test/expected/42_observatory_exploration_test.out +++ b/src/pg/test/expected/42_observatory_exploration_test.out @@ -36,16 +36,38 @@ obs_search ("""us.census.acs"".B01001001_quantile","The total number of all people living in a given geographic area. This is a very useful catch-all denominator when calculating rates.","Quantile:Total Population",quantile,us.census.acs) (3 rows) boundary_id|description|time_span|tablename -"us.census.tiger".block_group|Block groups (BGs) are statistical divisions of census tracts, are generally defined to contain between 600 and 3,000 people, and are used to present data and control block numbering. A block group consists of clusters of blocks within the same census tract that have the same first digit of their four-digit census block number. For example, blocks 3001, 3002, 3003, ..., 3999 in census tract 1210.02 belong to BG 3 in that census tract. Most BGs were delineated by local participants in the Census Bureau\u2019s Participant Statistical Areas Program. The Census Bureau delineated BGs only where a local or tribal government declined to participate, and a regional organization or State Data Center was not available to participate. A BG usually covers a contiguous area. Each census tract contains at least one BG, and BGs are uniquely numbered within the census tract. Within the standard census geographic hierarchy, BGs never cross state, county, or census tract boundaries but may cross the boundaries of any other geographic entity. Tribal census tracts and tribal BGs are separate and unique geographic areas defined within federally recognized American Indian reservations and can cross state and county boundaries (see \u201cTribal Census Tract\u201d and \u201cTribal Block Group\u201d). The tribal census tracts and tribal block groups may be completely different from the census tracts and block groups defined by state and county.|2013|obs_85328201013baa14e8e8a4a57a01e6f6fbc5f9b1 -"us.census.tiger".census_tract|Census tracts are identified by an up to four-digit integer number and may have an optional two-digit suffix; for example 1457.02 or 23. The census tract codes consist of six digits with an implied decimal between the fourth and fifth digit corresponding to the basic census tract number but with leading zeroes and trailing zeroes for census tracts without a suffix. The tract number examples above would have codes of 145702 and 002300, respectively. Some ranges of census tract numbers in the 2010 Census are used to identify distinctive types of census tracts. The code range in the 9400s is used for those census tracts with a majority of population, housing, or land area associated with an American Indian area and matches the numbering used in Census 2000. The code range in the 9800s is new for 2010 and is used to specifically identify special land-use census tracts; that is, census tracts defined to encompass a large area with little or no residential population with special characteristics, such as large parks or employment areas. The range of census tracts in the 9900s represents census tracts delineated specifically to cover large bodies of water. This is different from Census 2000 when water-only census tracts were assigned codes of all zeroes (000000); 000000 is no longer used as a census tract code for the 2010 Census. The Census Bureau uses suffixes to help identify census tract changes for comparison purposes. Census tract suffixes may range from .01 to .98. As part of local review of existing census tracts before each census, some census tracts may have grown enough in population size to qualify as more than one census tract. When a census tract is split, the split parts usually retain the basic number but receive different suffixes. For example, if census tract 14 is split, the new tract numbers would be 14.01 and 14.02. In a few counties, local participants request major changes to, and renumbering of, the census tracts; however, this is generally discouraged. Changes to individual census tract boundaries usually do not result in census tract numbering changes. The Census Bureau introduced the concept of tribal census tracts for the first time for Census 2000. Tribal census tracts for that census consisted of the standard county-based census tracts tabulated within American Indian areas, thus allowing for the tracts to ignore state and county boundaries for tabulation. The Census Bureau assigned the 9400 range of numbers to identify specific tribal census tracts; however, not all tribal census tracts used this numbering scheme. For the 2010 Census, tribal census tracts no longer are tied to or numbered in the same way as the county-based census tracts (see \u201cTribal Census Tract\u201d).|2013|obs_a92e1111ad3177676471d66bb8036e6d057f271b +"us.census.tiger".block_group|Block groups (BGs) are statistical divisions of census tracts, are generally defined to contain between 600 and 3,000 people, and are used to present data and control block numbering. A block group consists of clusters of blocks within the same census tract that have the same first digit of their four-digit census block number. For example, blocks 3001, 3002, 3003, ..., 3999 in census tract 1210.02 belong to BG 3 in that census tract. Most BGs were delineated by local participants in the Census Bureau\u2019s Participant Statistical Areas Program. The Census Bureau delineated BGs only where a local or tribal government declined to participate, and a regional organization or State Data Center was not available to participate. + +A BG usually covers a contiguous area. Each census tract contains at least one BG, and BGs are uniquely numbered within the census tract. Within the standard census geographic hierarchy, BGs never cross state, county, or census tract boundaries but may cross the boundaries of any other geographic entity. Tribal census tracts and tribal BGs are separate and unique geographic areas defined within federally recognized American Indian reservations and can cross state and county boundaries (see \u201cTribal Census Tract\u201d and \u201cTribal Block Group\u201d). The tribal census tracts and tribal block groups may be completely different from the census tracts and block groups defined by state and county.|2013|obs_85328201013baa14e8e8a4a57a01e6f6fbc5f9b1 +"us.census.tiger".census_tract|Census tracts are identified by an up to four-digit integer number and may have an optional two-digit suffix; for example 1457.02 or 23. The census tract codes consist of six digits with an implied decimal between the fourth and fifth digit corresponding to the basic census tract number but with leading zeroes and trailing zeroes for census tracts without a suffix. The tract number examples above would have codes of 145702 and 002300, respectively. + +Some ranges of census tract numbers in the 2010 Census are used to identify distinctive types of census tracts. The code range in the 9400s is used for those census tracts with a majority of population, housing, or land area associated with an American Indian area and matches the numbering used in Census 2000. The code range in the 9800s is new for 2010 and is used to specifically identify special land-use census tracts; that is, census tracts defined to encompass a large area with little or no residential population with special characteristics, such as large parks or employment areas. The range of census tracts in the 9900s represents census tracts delineated specifically to cover large bodies of water. This is different from Census 2000 when water-only census tracts were assigned codes of all zeroes (000000); 000000 is no longer used as a census tract code for the 2010 Census. + +The Census Bureau uses suffixes to help identify census tract changes for comparison purposes. Census tract suffixes may range from .01 to .98. As part of local review of existing census tracts before each census, some census tracts may have grown enough in population size to qualify as more than one census tract. When a census tract is split, the split parts usually retain the basic number but receive different suffixes. For example, if census tract 14 is split, the new tract numbers would be 14.01 and 14.02. In a few counties, local participants request major changes to, and renumbering of, the census tracts; however, this is generally discouraged. Changes to individual census tract boundaries usually do not result in census tract numbering changes. + +The Census Bureau introduced the concept of tribal census tracts for the first time for Census 2000. Tribal census tracts for that census consisted of the standard county-based census tracts tabulated within American Indian areas, thus allowing for the tracts to ignore state and county boundaries for tabulation. The Census Bureau assigned the 9400 range of numbers to identify specific tribal census tracts; however, not all tribal census tracts used this numbering scheme. For the 2010 Census, tribal census tracts no longer are tied to or numbered in the same way as the county-based census tracts (see \u201cTribal Census Tract\u201d).|2013|obs_a92e1111ad3177676471d66bb8036e6d057f271b "us.census.tiger".state|States and Equivalent Entities are the primary governmental divisions of the United States. In addition to the 50 states, the Census Bureau treats the District of Columbia, Puerto Rico, American Samoa, the Commonwealth of the Northern Mariana Islands, Guam, and the U.S. Virgin Islands as the statistical equivalents of states for the purpose of data presentation.|2013|obs_f3f0912fe24bc0c976e837b5a116d0c803cc01ce -"us.census.tiger".puma|PUMAs are geographic areas for which the Census Bureau provides selected extracts of raw data from a small sample of census records that are screened to protect confidentiality. These extracts are referred to as public use microdata sample (PUMS) files. For the 2010 Census, each state, the District of Columbia, Puerto Rico, and some Island Area participants delineated PUMAs for use in presenting PUMS data based on a 5 percent sample of decennial census or American Community Survey data. These areas are required to contain at least 100,000 people. This is different from Census 2000 when two types of PUMAs were defined: a 5 percent PUMA as for 2010 and an additional super-PUMA designed to provide a 1 percent sample. The PUMAs are identified by a five-digit census code unique within state.|2013|obs_0008b162b516c295d7204c9ba043ab5dbc67c59c -"us.census.tiger".zcta5|ZCTAs are approximate area representations of U.S. Postal Service (USPS) five-digit ZIP Code service areas that the Census Bureau creates using whole blocks to present statistical data from censuses and surveys. The Census Bureau defines ZCTAs by allocating each block that contains addresses to a single ZCTA, usually to the ZCTA that reflects the most frequently occurring ZIP Code for the addresses within that tabulation block. Blocks that do not contain addresses but are completely surrounded by a single ZCTA (enclaves) are assigned to the surrounding ZCTA; those surrounded by multiple ZCTAs will be added to a single ZCTA based on limited buffering performed between multiple ZCTAs. The Census Bureau identifies five-digit ZCTAs using a five-character numeric code that represents the most frequently occurring USPS ZIP Code within that ZCTA, and this code may contain leading zeros. There are significant changes to the 2010 ZCTA delineation from that used in 2000. Coverage was extended to include the Island Areas for 2010 so that the United States, Puerto Rico, and the Island Areas have ZCTAs. Unlike 2000, when areas that could not be assigned to a ZCTA were given a generic code ending in \u201cXX\u201d (land area) or \u201cHH\u201d (water area), for 2010 there is no universal coverage by ZCTAs, and only legitimate five-digit areas are defined. The 2010 ZCTAs will better represent the actual Zip Code service areas because the Census Bureau initiated a process before creation of 2010 blocks to add block boundaries that split polygons with large numbers of addresses using different Zip Codes. Data users should not use ZCTAs to identify the official USPS ZIP Code for mail delivery. The USPS makes periodic changes to ZIP Codes to support more efficient mail delivery. The ZCTAs process used primarily residential addresses and was biased towards Zip Codes used for city-style mail delivery, thus there may be Zip Codes that are primarily nonresidential or boxes only that may not have a corresponding ZCTA.|2013|obs_d483723c5cc76c107d9e0af279d1e7056df3c2be +"us.census.tiger".puma|PUMAs are geographic areas for which the Census Bureau provides selected extracts of raw data from a small sample of census records that are screened to protect confidentiality. These extracts are referred to as public use microdata sample (PUMS) files. + +For the 2010 Census, each state, the District of Columbia, Puerto Rico, and some Island Area participants delineated PUMAs for use in presenting PUMS data based on a 5 percent sample of decennial census or American Community Survey data. These areas are required to contain at least 100,000 people. This is different from Census 2000 when two types of PUMAs were defined: a 5 percent PUMA as for 2010 and an additional super-PUMA designed to provide a 1 percent sample. The PUMAs are identified by a five-digit census code unique within state.|2013|obs_0008b162b516c295d7204c9ba043ab5dbc67c59c +"us.census.tiger".zcta5|ZCTAs are approximate area representations of U.S. Postal Service (USPS) five-digit ZIP Code service areas that the Census Bureau creates using whole blocks to present statistical data from censuses and surveys. The Census Bureau defines ZCTAs by allocating each block that contains addresses to a single ZCTA, usually to the ZCTA that reflects the most frequently occurring ZIP Code for the addresses within that tabulation block. Blocks that do not contain addresses but are completely surrounded by a single ZCTA (enclaves) are assigned to the surrounding ZCTA; those surrounded by multiple ZCTAs will be added to a single ZCTA based on limited buffering performed between multiple ZCTAs. The Census Bureau identifies five-digit ZCTAs using a five-character numeric code that represents the most frequently occurring USPS ZIP Code within that ZCTA, and this code may contain leading zeros. + +There are significant changes to the 2010 ZCTA delineation from that used in 2000. Coverage was extended to include the Island Areas for 2010 so that the United States, Puerto Rico, and the Island Areas have ZCTAs. Unlike 2000, when areas that could not be assigned to a ZCTA were given a generic code ending in \u201cXX\u201d (land area) or \u201cHH\u201d (water area), for 2010 there is no universal coverage by ZCTAs, and only legitimate five-digit areas are defined. The 2010 ZCTAs will better represent the actual Zip Code service areas because the Census Bureau initiated a process before creation of 2010 blocks to add block boundaries that split polygons with large numbers of addresses using different Zip Codes. + +Data users should not use ZCTAs to identify the official USPS ZIP Code for mail delivery. The USPS makes periodic changes to ZIP Codes to support more efficient mail delivery. The ZCTAs process used primarily residential addresses and was biased towards Zip Codes used for city-style mail delivery, thus there may be Zip Codes that are primarily nonresidential or boxes only that may not have a corresponding ZCTA.|2013|obs_d483723c5cc76c107d9e0af279d1e7056df3c2be "us.census.tiger".county|The primary legal divisions of most states are termed counties. In Louisiana, these divisions are known as parishes. In Alaska, which has no counties, the equivalent entities are the organized boroughs, city and boroughs, municipalities, and census areas; the latter of which are delineated cooperatively for statistical purposes by the state of Alaska and the Census Bureau. In four states (Maryland, Missouri, Nevada, and Virginia), there are one or more incorporated places that are independent of any county organization and thus constitute primary divisions of their states. These incorporated places are known as independent cities and are treated as equivalent entities for purposes of data presentation. The District of Columbia and Guam have no primary divisions, and each area is considered an equivalent entity for purposes of data presentation. All of the counties in Connecticut and Rhode Island and nine counties in Massachusetts were dissolved as functioning governmental entities; however, the Census Bureau continues to present data for these historical entities in order to provide comparable geographic units at the county level of the geographic hierarchy for these states and represents them as nonfunctioning legal entities in data products. The Census Bureau treats the following entities as equivalents of counties for purposes of data presentation: municipios in Puerto Rico, districts and islands in American Samoa, municipalities in the Commonwealth of the Northern Mariana Islands, and islands in the U.S. Virgin Islands. Each county or statistically equivalent entity is assigned a three-character numeric Federal Information Processing Series (FIPS) code based on alphabetical sequence that is unique within state and an eight-digit National Standard feature identifier.|2013|obs_b0ef6dd68d5faddbf231fd7f02916b3d00ec43c4 "us.census.tiger".state|States and Equivalent Entities are the primary governmental divisions of the United States. In addition to the 50 states, the Census Bureau treats the District of Columbia, Puerto Rico, American Samoa, the Commonwealth of the Northern Mariana Islands, Guam, and the U.S. Virgin Islands as the statistical equivalents of states for the purpose of data presentation.|2013|obs_a20f5260b618a2fe2eb95fc1e23febe0db7db096 "us.census.tiger".county|The primary legal divisions of most states are termed counties. In Louisiana, these divisions are known as parishes. In Alaska, which has no counties, the equivalent entities are the organized boroughs, city and boroughs, municipalities, and census areas; the latter of which are delineated cooperatively for statistical purposes by the state of Alaska and the Census Bureau. In four states (Maryland, Missouri, Nevada, and Virginia), there are one or more incorporated places that are independent of any county organization and thus constitute primary divisions of their states. These incorporated places are known as independent cities and are treated as equivalent entities for purposes of data presentation. The District of Columbia and Guam have no primary divisions, and each area is considered an equivalent entity for purposes of data presentation. All of the counties in Connecticut and Rhode Island and nine counties in Massachusetts were dissolved as functioning governmental entities; however, the Census Bureau continues to present data for these historical entities in order to provide comparable geographic units at the county level of the geographic hierarchy for these states and represents them as nonfunctioning legal entities in data products. The Census Bureau treats the following entities as equivalents of counties for purposes of data presentation: municipios in Puerto Rico, districts and islands in American Samoa, municipalities in the Commonwealth of the Northern Mariana Islands, and islands in the U.S. Virgin Islands. Each county or statistically equivalent entity is assigned a three-character numeric Federal Information Processing Series (FIPS) code based on alphabetical sequence that is unique within state and an eight-digit National Standard feature identifier.|2013|obs_23da37d4e66e9de2f525572967f8618bde99a8c0 -"us.census.tiger".census_tract|Census tracts are identified by an up to four-digit integer number and may have an optional two-digit suffix; for example 1457.02 or 23. The census tract codes consist of six digits with an implied decimal between the fourth and fifth digit corresponding to the basic census tract number but with leading zeroes and trailing zeroes for census tracts without a suffix. The tract number examples above would have codes of 145702 and 002300, respectively. Some ranges of census tract numbers in the 2010 Census are used to identify distinctive types of census tracts. The code range in the 9400s is used for those census tracts with a majority of population, housing, or land area associated with an American Indian area and matches the numbering used in Census 2000. The code range in the 9800s is new for 2010 and is used to specifically identify special land-use census tracts; that is, census tracts defined to encompass a large area with little or no residential population with special characteristics, such as large parks or employment areas. The range of census tracts in the 9900s represents census tracts delineated specifically to cover large bodies of water. This is different from Census 2000 when water-only census tracts were assigned codes of all zeroes (000000); 000000 is no longer used as a census tract code for the 2010 Census. The Census Bureau uses suffixes to help identify census tract changes for comparison purposes. Census tract suffixes may range from .01 to .98. As part of local review of existing census tracts before each census, some census tracts may have grown enough in population size to qualify as more than one census tract. When a census tract is split, the split parts usually retain the basic number but receive different suffixes. For example, if census tract 14 is split, the new tract numbers would be 14.01 and 14.02. In a few counties, local participants request major changes to, and renumbering of, the census tracts; however, this is generally discouraged. Changes to individual census tract boundaries usually do not result in census tract numbering changes. The Census Bureau introduced the concept of tribal census tracts for the first time for Census 2000. Tribal census tracts for that census consisted of the standard county-based census tracts tabulated within American Indian areas, thus allowing for the tracts to ignore state and county boundaries for tabulation. The Census Bureau assigned the 9400 range of numbers to identify specific tribal census tracts; however, not all tribal census tracts used this numbering scheme. For the 2010 Census, tribal census tracts no longer are tied to or numbered in the same way as the county-based census tracts (see \u201cTribal Census Tract\u201d).|2013|obs_d125aeef87aaa23287a40b454519ece22ee25acf -"us.census.tiger".block_group|Block groups (BGs) are statistical divisions of census tracts, are generally defined to contain between 600 and 3,000 people, and are used to present data and control block numbering. A block group consists of clusters of blocks within the same census tract that have the same first digit of their four-digit census block number. For example, blocks 3001, 3002, 3003, ..., 3999 in census tract 1210.02 belong to BG 3 in that census tract. Most BGs were delineated by local participants in the Census Bureau\u2019s Participant Statistical Areas Program. The Census Bureau delineated BGs only where a local or tribal government declined to participate, and a regional organization or State Data Center was not available to participate. A BG usually covers a contiguous area. Each census tract contains at least one BG, and BGs are uniquely numbered within the census tract. Within the standard census geographic hierarchy, BGs never cross state, county, or census tract boundaries but may cross the boundaries of any other geographic entity. Tribal census tracts and tribal BGs are separate and unique geographic areas defined within federally recognized American Indian reservations and can cross state and county boundaries (see \u201cTribal Census Tract\u201d and \u201cTribal Block Group\u201d). The tribal census tracts and tribal block groups may be completely different from the census tracts and block groups defined by state and county.|2013|obs_d610cb3225f282693b8d4dcd98d2c2e2078354c6 +"us.census.tiger".census_tract|Census tracts are identified by an up to four-digit integer number and may have an optional two-digit suffix; for example 1457.02 or 23. The census tract codes consist of six digits with an implied decimal between the fourth and fifth digit corresponding to the basic census tract number but with leading zeroes and trailing zeroes for census tracts without a suffix. The tract number examples above would have codes of 145702 and 002300, respectively. + +Some ranges of census tract numbers in the 2010 Census are used to identify distinctive types of census tracts. The code range in the 9400s is used for those census tracts with a majority of population, housing, or land area associated with an American Indian area and matches the numbering used in Census 2000. The code range in the 9800s is new for 2010 and is used to specifically identify special land-use census tracts; that is, census tracts defined to encompass a large area with little or no residential population with special characteristics, such as large parks or employment areas. The range of census tracts in the 9900s represents census tracts delineated specifically to cover large bodies of water. This is different from Census 2000 when water-only census tracts were assigned codes of all zeroes (000000); 000000 is no longer used as a census tract code for the 2010 Census. + +The Census Bureau uses suffixes to help identify census tract changes for comparison purposes. Census tract suffixes may range from .01 to .98. As part of local review of existing census tracts before each census, some census tracts may have grown enough in population size to qualify as more than one census tract. When a census tract is split, the split parts usually retain the basic number but receive different suffixes. For example, if census tract 14 is split, the new tract numbers would be 14.01 and 14.02. In a few counties, local participants request major changes to, and renumbering of, the census tracts; however, this is generally discouraged. Changes to individual census tract boundaries usually do not result in census tract numbering changes. + +The Census Bureau introduced the concept of tribal census tracts for the first time for Census 2000. Tribal census tracts for that census consisted of the standard county-based census tracts tabulated within American Indian areas, thus allowing for the tracts to ignore state and county boundaries for tabulation. The Census Bureau assigned the 9400 range of numbers to identify specific tribal census tracts; however, not all tribal census tracts used this numbering scheme. For the 2010 Census, tribal census tracts no longer are tied to or numbered in the same way as the county-based census tracts (see \u201cTribal Census Tract\u201d).|2013|obs_d125aeef87aaa23287a40b454519ece22ee25acf +"us.census.tiger".block_group|Block groups (BGs) are statistical divisions of census tracts, are generally defined to contain between 600 and 3,000 people, and are used to present data and control block numbering. A block group consists of clusters of blocks within the same census tract that have the same first digit of their four-digit census block number. For example, blocks 3001, 3002, 3003, ..., 3999 in census tract 1210.02 belong to BG 3 in that census tract. Most BGs were delineated by local participants in the Census Bureau\u2019s Participant Statistical Areas Program. The Census Bureau delineated BGs only where a local or tribal government declined to participate, and a regional organization or State Data Center was not available to participate. + +A BG usually covers a contiguous area. Each census tract contains at least one BG, and BGs are uniquely numbered within the census tract. Within the standard census geographic hierarchy, BGs never cross state, county, or census tract boundaries but may cross the boundaries of any other geographic entity. Tribal census tracts and tribal BGs are separate and unique geographic areas defined within federally recognized American Indian reservations and can cross state and county boundaries (see \u201cTribal Census Tract\u201d and \u201cTribal Block Group\u201d). The tribal census tracts and tribal block groups may be completely different from the census tracts and block groups defined by state and county.|2013|obs_d610cb3225f282693b8d4dcd98d2c2e2078354c6 (10 rows) Dropping obs_table.sql fixture table... Done.