exposure_value: Exposure value (when bands selected by exposure values)
The rifshapepolyid is a shape reference. With point shapefiles there is one rifshapepolyid per point, with shapes
there is one rifshapepolyid per shape in a shapefile. Shape shapefiles are limited to one set of shapes where the
centroids must all lie within the largest shape to enforce this as it is impossible to reliably determine which shape
belongs with which rifshapepolyid otherwise.
A new view rif40.rif40_exposure_values has been created to support exposure covariates:
Column
Type
Modifiers
Storage
Description
username
character varying(90)
extended
Username
study_id
integer
plain
Unique study index: study_id. Created by SEQUENCE rif40_study_id_seq
band_id
integer
plain
A band allocated to the area
total_areas
bigint
plain
Total area id
total_rifshapepolyid
bigint
plain
Total rifshapepolyid (shape reference)
min_intersect_count
integer
plain
Minimum number of intersects with shapes
max_intersect_count
integer
plain
Maximum number of intersects with shapes
min_distance_from_nearest_source
numeric
main
Minimum distance from nearest source (Km)
max_distance_from_nearest_source
numeric
main
Maximum distance from nearest source (Km)
min_exposure_value
numeric
main
Minimum exposure value
max_exposure_value
numeric
main
Maximum exposure value
View definition:
SELECT rif40_study_areas.username,
rif40_study_areas.study_id,
rif40_study_areas.band_id,
count(rif40_study_areas.area_id) AS total_areas,
count(DISTINCT rif40_study_areas.nearest_rifshapepolyid) AS total_rifshapepolyid,
min(rif40_study_areas.intersect_count) AS min_intersect_count,
max(rif40_study_areas.intersect_count) AS max_intersect_count,
min(rif40_study_areas.distance_from_nearest_source) AS min_distance_from_nearest_source,
max(rif40_study_areas.distance_from_nearest_source) AS max_distance_from_nearest_source,
min(rif40_study_areas.exposure_value) AS min_exposure_value,
max(rif40_study_areas.exposure_value) AS max_exposure_value
FROM rif40_study_areas
WHERE rif40_study_areas.exposure_value IS NOT NULL
GROUP BY rif40_study_areas.username, rif40_study_areas.study_id, rif40_study_areas.band_id
ORDER BY rif40_study_areas.username, rif40_study_areas.study_id, rif40_study_areas.band_id;
Add support for intersection between risk analysis shapes and for exposure covariates:
The rifshapepolyid is a shape reference. With point shapefiles there is one rifshapepolyid per point, with shapes there is one rifshapepolyid per shape in a shapefile. Shape shapefiles are limited to one set of shapes where the centroids must all lie within the largest shape to enforce this as it is impossible to reliably determine which shape belongs with which rifshapepolyid otherwise.
A new view rif40.rif40_exposure_values has been created to support exposure covariates:
View definition:
Example data:
The extract table is untouched for disease mapping and the extract has been fixed for risk analysis.
Also fixed:
Requires that alter 11 be run. This provides:
SQL Server:
`sqlcmd -U rif40 -d <database name> -b -m-1 -e -r1 -i v4_0_alter_11.sql -v pwd="%cd%"
Postgres:
psql -U rif40 -d sahsuland -w -e -P pager=off -f alter_scripts/v4_0_alter_11.sql