Permalink
Browse files

Added observation accuracy values to LDS simple layers

  • Loading branch information...
1 parent f6023b0 commit 79d564515696cbd66a02669be29e98a256db126e @palmerj palmerj committed Feb 11, 2012
Showing with 13 additions and 1 deletion.
  1. +0 −1 sql/bde_schema_index.sql
  2. +1 −0 sql/bde_schema_index_lds.sql
  3. +9 −0 sql/lds_layer_functions.sql
  4. +3 −0 sql/lds_layer_tables.sql
View
@@ -403,7 +403,6 @@ CREATE INDEX fk_prh_ttl ON crs_nominal_index USING btree (ttl_title_no);
-- crs_obs_accuracy
-------------------------------------------------------------------------------
CREATE INDEX fk_oba_obn1 ON crs_obs_accuracy USING btree (obn_id2);
-CREATE INDEX fk_oba_obn2 ON crs_obs_accuracy USING btree (obn_id1);
CREATE UNIQUE INDEX idx_oba_aud_id ON crs_obs_accuracy USING btree (audit_id);
-------------------------------------------------------------------------------
@@ -277,6 +277,7 @@ CREATE UNIQUE INDEX idx_now_aud_id ON crs_node_works USING btree (audit_id);
-------------------------------------------------------------------------------
-- crs_obs_accuracy
-------------------------------------------------------------------------------
+CREATE INDEX fk_oba_obn2 ON crs_obs_accuracy USING btree (obn_id1);
CREATE UNIQUE INDEX idx_oba_aud_id ON crs_obs_accuracy USING btree (audit_id);
-------------------------------------------------------------------------------
@@ -2571,6 +2571,7 @@ BEGIN
'crs_node',
'crs_obs_elem_type',
'crs_observation',
+ 'crs_obs_accuracy',
'crs_ordinate_adj',
'crs_parcel',
'crs_parcel_bndry',
@@ -2891,6 +2892,7 @@ BEGIN
nod_id_end,
obs_type,
value,
+ value_accuracy,
value_label,
surveyed_type,
coordinate_system,
@@ -2905,6 +2907,7 @@ BEGIN
STPR.nod_id AS nod_id_end,
RTRIM(OET.description),
OBN.value_1,
+ OBA.value_11 * OBN.acc_multiplier,
CASE WHEN OBN.obt_sub_type = 'SLDI' THEN
to_char(OBN.value_1, 'FM9999999990D00')
WHEN OBN.obt_sub_type = 'BEAR' THEN
@@ -2927,6 +2930,7 @@ BEGIN
JOIN crs_setup STPR ON OBN.stp_id_remote = STPR.id
JOIN crs_vector VCT ON OBN.vct_id = VCT.id
JOIN crs_coordinate_sys COS ON OBN.cos_id = COS.id
+ LEFT JOIN crs_obs_accuracy OBA ON OBN.id = OBA.obn_id1
LEFT JOIN crs_sys_code SCO ON OBN.surveyed_class = SCO.code AND SCO.scg_code = 'OBEC'
LEFT JOIN tmp_survey_plans SUR ON STPL.wrk_id = SUR.wrk_id
WHERE
@@ -2962,6 +2966,8 @@ BEGIN
arc_length,
arc_radius,
arc_direction,
+ chord_bearing_accuracy,
+ arc_length_accuracy,
surveyed_type,
coordinate_system,
land_district,
@@ -2980,6 +2986,8 @@ BEGIN
OBN.value_2,
OBN.arc_radius,
OBN.arc_direction,
+ OBA.value_11 * OBN.acc_multiplier,
+ OBA.value_22 * OBN.acc_multiplier,
SCO.char_value,
COS.name,
CASE WHEN SUR.wrk_id IS NULL THEN
@@ -2999,6 +3007,7 @@ BEGIN
JOIN crs_setup STPR ON OBN.stp_id_remote = STPR.id
JOIN crs_vector VCT ON OBN.vct_id = VCT.id
JOIN crs_coordinate_sys COS ON OBN.cos_id = COS.id
+ LEFT JOIN crs_obs_accuracy OBA ON OBN.id = OBA.obn_id1
LEFT JOIN crs_sys_code SCO ON OBN.surveyed_class = SCO.code AND SCO.scg_code = 'OBEC'
LEFT JOIN tmp_survey_plans SUR ON STPL.wrk_id = SUR.wrk_id
WHERE
View
@@ -726,6 +726,7 @@ CREATE TABLE survey_observations (
nod_id_end integer NOT NULL,
obs_type character varying(18) NOT NULL,
value numeric(22,12) NOT NULL,
+ value_accuracy numeric(22,12),
value_label VARCHAR(10) NOT NULL,
surveyed_type VARCHAR(10),
coordinate_system VARCHAR(42) NOT NULL,
@@ -758,6 +759,8 @@ CREATE TABLE survey_arc_observations (
arc_length NUMERIC(22,12),
arc_radius NUMERIC(22,12),
arc_direction VARCHAR(4),
+ chord_bearing_accuracy NUMERIC(22,12),
+ arc_length_accuracy NUMERIC(22,12),
surveyed_type VARCHAR(10),
coordinate_system VARCHAR(42) NOT NULL,
land_district VARCHAR(100) NOT NULL,

0 comments on commit 79d5645

Please sign in to comment.