Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(building-comparison): add metadata table #791

Open
wants to merge 11 commits into
base: main
Choose a base branch
from
Open

Conversation

Gigaszi
Copy link
Collaborator

@Gigaszi Gigaszi commented May 12, 2024

Metadata table created wiith this SQL query:

-- Create metadata table without coverage columns
CREATE TABLE comparison_indicators_metadata (
    dataset_name VARCHAR(255),
    dataset_name_snake_case VARCHAR(255),
    link VARCHAR(255),
    date DATE,
    description TEXT,
    color VARCHAR(50),
    table_name VARCHAR(50),
    coverage_simple GEOMETRY,
    coverage_inversed GEOMETRY,
    indicator VARCHAR(50)
);

-- Insert data for EUBUCCO dataset
INSERT INTO comparison_indicators_metadata (dataset_name, dataset_name_snake_case, link, date, description, color, table_name, coverage_simple, coverage_inversed, indicator)
VALUES (
    'EUBUCCO',
    'eubucco',
    'https://docs.eubucco.com/',
    '2022-11-03',
    'EUBUCCO is a dataset of building footprints for Europe. It is derived from administrative datasets.',
    'PURPLE',
    'eubucco',
    (SELECT geom FROM eubucco_coverage_simple),
    (SELECT geom FROM eubucco_coverage_inversed),
    'building_comparison'
);

-- Insert data for Microsoft Buildings dataset
INSERT INTO comparison_indicators_metadata (dataset_name, dataset_name_snake_case, link, date, description, color, table_name, coverage_simple, coverage_inversed, indicator)
VALUES (
    'Microsoft Building Footprints',
    'microsoft_buildings',
    'https://planetarycomputer.microsoft.com/dataset/ms-buildings',
    '2022-07-05',
    'Microsoft Building Footprints is a dataset of building footprints for the world. It is derived from satellite imagery.',
    'ORANGE',
    'microsoft_buildings',
    (SELECT geom FROM microsoft_buildings_coverage_simple),
    (SELECT geom FROM microsoft_buildings_coverage_inversed),
    'building_comparison'
);
-- Insert data from Microsoft Roads dataset
INSERT INTO comparison_indicators_metadata (dataset_name, dataset_name_snake_case, link, date, description, color, table_name, coverage_simple, coverage_inversed, indicator)
VALUES (
    'Microsoft Roads',
    'microsoft_roads',
    'https://github.com/microsoft/RoadDetections',
    '2023-02-27',
    'Microsoft Road Detections is a dataset of road world-wide. It is derived from satellite imagery.',
    'ORANGE',
    'microsoft_roads_midpoint',
    (SELECT geom FROM microsoft_roads_coverage_simple),
    (SELECT geom FROM microsoft_buildings_coverage_inversed),
    'road_comparison'
);

Checklist

  • I have updated my branch to main (e.g. through git rebase main)
  • My code follows the style guide and was checked with pre-commit before committing
  • I have commented my code
  • I have added sufficient unit and integration tests
  • I have updated the CHANGELOG.md
  • Delete old coverage tables
  • Read coverage geometries as geometry in Python

Please check all finished tasks. If some tasks do not apply to your PR, please cross their text out (by using ~...~) and remove their checkboxes.

@matthiasschaub matthiasschaub self-assigned this Aug 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants