Skip to content

Commit

Permalink
reflected latest changes in 3dcitydb repo
Browse files Browse the repository at this point in the history
  • Loading branch information
clausnagel committed Dec 23, 2024
1 parent 8d34430 commit 9166cc0
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ BEGIN
(SELECT DISTINCT unnest(feature_ids) AS a_id) a
LEFT JOIN
property p
ON p.val_feature_id = a.a_id
ON p.val_feature_id = a.a_id
WHERE p.val_feature_id IS NULL OR p.val_relation_type IS NULL OR p.val_relation_type = 0;
END IF;

Expand All @@ -216,7 +216,11 @@ BEGIN
PERFORM
citydb_pkg.delete_implicit_geometry(array_agg(a.a_id))
FROM
(SELECT DISTINCT unnest(implicit_geometry_ids) AS a_id) a;
(SELECT DISTINCT unnest(implicit_geometry_ids) AS a_id) a
LEFT JOIN
property p
ON p.val_implicitgeom_id = a.a_id
WHERE p.val_implicitgeom_id IS NULL;
END IF;

IF -1 = ALL(appearance_ids) IS NOT NULL THEN
Expand Down
18 changes: 9 additions & 9 deletions resources/3dcitydb/postgresql/sql-scripts/schema/schema.sql
Original file line number Diff line number Diff line change
Expand Up @@ -233,31 +233,31 @@ CREATE INDEX property_namespace_inx ON property ( namespace_id );

CREATE INDEX property_name_inx ON property ( name );

CREATE INDEX property_val_feature_fkx ON property ( val_feature_id ) WHERE val_feature_id IS NOT NULL;

CREATE INDEX property_val_string_inx ON property ( val_string ) WHERE val_string IS NOT NULL;

CREATE INDEX property_val_uom_inx ON property ( val_uom ) WHERE val_uom IS NOT NULL;

CREATE INDEX property_val_uri_inx ON property ( val_uri ) WHERE val_uri IS NOT NULL;

CREATE INDEX property_val_lod_inx ON property ( val_lod ) WHERE val_lod IS NOT NULL;

CREATE INDEX property_val_int_inx ON property ( val_int ) WHERE val_int IS NOT NULL;

CREATE INDEX property_val_double_inx ON property ( val_double ) WHERE val_double IS NOT NULL;

CREATE INDEX property_val_date_inx ON property ( val_timestamp ) WHERE val_timestamp IS NOT NULL;

CREATE INDEX property_val_geometry_fkx ON property ( val_geometry_id ) WHERE val_geometry_id IS NOT NULL;
CREATE INDEX property_val_feature_fkx ON property ( val_feature_id );

CREATE INDEX property_val_geometry_fkx ON property ( val_geometry_id );

CREATE INDEX property_val_implicitgeom_fkx ON property ( val_implicitgeom_id );

CREATE INDEX property_val_implicitgeom_fkx ON property ( val_implicitgeom_id ) WHERE val_implicitgeom_id IS NOT NULL;
CREATE INDEX property_val_appearance_fkx ON property ( val_appearance_id );

CREATE INDEX property_val_appearance_fkx ON property ( val_appearance_id ) WHERE val_appearance_id IS NOT NULL;
CREATE INDEX property_val_relation_type_inx ON property ( val_relation_type );

CREATE INDEX property_val_relation_type_inx ON property ( val_relation_type ) WHERE val_relation_type IS NOT NULL;
CREATE INDEX property_val_address_fkx ON property ( val_address_id );

CREATE INDEX property_val_address_fkx ON property ( val_address_id ) WHERE val_address_id IS NOT NULL;
CREATE INDEX property_val_lod_inx ON property ( val_lod );

CREATE TABLE surface_data (
id bigint DEFAULT nextval('surface_data_seq'::regclass) NOT NULL ,
Expand Down

0 comments on commit 9166cc0

Please sign in to comment.