updating getGeometry* to getBoundary*

This commit is contained in:
Andy Eschbacher 2016-04-27 13:07:19 -07:00
parent 6230e52d98
commit d5e67b9fe1
3 changed files with 55 additions and 55 deletions

View File

@ -4,7 +4,7 @@
-- First, the Spanish Census, and so on
-- OBS_GetGeometry
-- OBS_GetBoundary
--
-- Returns the boundary polygon(s) that overlap with the input point geometry.
-- From an input point geometry, find the boundary which intersects with the
@ -21,7 +21,7 @@
-- resolution requested with boundary_id, and time_span
--
CREATE OR REPLACE FUNCTION cdb_observatory.OBS_GetGeometry(
CREATE OR REPLACE FUNCTION cdb_observatory.OBS_GetBoundary(
geom geometry(Geometry, 4326),
boundary_id text,
time_span text DEFAULT NULL)
@ -84,7 +84,7 @@ BEGIN
END;
$$ LANGUAGE plpgsql;
-- OBS_GetGeometryId
-- OBS_GetBoundaryId
--
-- retrieves the boundary identifier (e.g., '36047' = Kings County/Brooklyn, NY)
-- corresponding to the location geom and boundary types (e.g.,
@ -103,7 +103,7 @@ $$ LANGUAGE plpgsql;
-- time_span
--
CREATE OR REPLACE FUNCTION cdb_observatory.OBS_GetGeometryId(
CREATE OR REPLACE FUNCTION cdb_observatory.OBS_GetBoundaryId(
geom geometry(Geometry, 4326),
boundary_id text,
time_span text DEFAULT NULL
@ -163,7 +163,7 @@ END;
$$ LANGUAGE plpgsql;
-- OBS_GetGeometryById
-- OBS_GetBoundaryById
--
-- 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
@ -182,7 +182,7 @@ $$ LANGUAGE plpgsql;
-- resolution requested with boundary_id, and time_span
--
CREATE OR REPLACE FUNCTION cdb_observatory.OBS_GetGeometryById(
CREATE OR REPLACE FUNCTION cdb_observatory.OBS_GetBoundaryById(
geometry_id text, -- ex: '36047'
boundary_id text, -- ex: '"us.census.tiger".county'
time_span text DEFAULT NULL --ex: '2009'

View File

@ -27,46 +27,46 @@ Loading obs_d34555209878e8c4b37cf0b2b3d072ff129ec470.sql fixture file...
Done.
Loading obs_b0ef6dd68d5faddbf231fd7f02916b3d00ec43c4.sql fixture file...
Done.
obs_getgeometry_cartodb_census_tract
obs_getboundary_cartodb_census_tract
t
(1 row)
obs_getgeometry_cartodb_county
obs_getboundary_cartodb_county
t
(1 row)
obs_getgeometry_non_existent_boundary_id
obs_getboundary_non_existent_boundary_id
t
(1 row)
obs_getgeometry_null_island_census_tract
obs_getboundary_null_island_census_tract
t
(1 row)
obs_getgeometry_year_census_tract
obs_getboundary_year_census_tract
t
(1 row)
obs_getgeometry_unlisted_year
obs_getboundary_unlisted_year
t
(1 row)
obs_getgeometryid_cartodb_census_tract
obs_getboundaryid_cartodb_census_tract
t
(1 row)
obs_getgeometryid_cartodb_census_tract_with_year
obs_getboundaryid_cartodb_census_tract_with_year
t
(1 row)
obs_getgeometryid_cartodb_county_with_year
obs_getboundaryid_cartodb_county_with_year
t
(1 row)
obs_getgeometryid_null_island
obs_getboundaryid_null_island
t
(1 row)
obs_getgeometrybyid_cartodb_county
obs_getboundarybyid_cartodb_county
t
(1 row)
obs_getgeometrybyid_compared_with_obs_getgeometry
obs_getboundarybyid_compared_with_obs_getboundary
t
(1 row)
obs_getgeometrybyid_boundary_id_mismatch_geom_id
obs_getboundarybyid_boundary_id_mismatch_geom_id
t
(1 row)
obs_getgeometrybyid_boundary_id_mismatch_geom_id
obs_getboundarybyid_boundary_id_mismatch_geom_id
t
(1 row)
Dropping obs_table.sql fixture table...

File diff suppressed because one or more lines are too long