woodRock / psychic-invention

NZODN Data Ingestion Project
0 stars 0 forks source link

Bounding box as geometry #15

Closed woodRock closed 3 years ago

woodRock commented 3 years ago

Goal

The biological_map table within the schema bio should have one entry with a polygon geometry. That polygon needs to be the bounding box for the dataset.

Tasklist

Success Criteria

The bounding box has been added as column to the biological_map table, and we have verified it is correct using a visual tool (i.e., DBeaver or QGIS).

woodRock commented 3 years ago

We need to add a geometry to the Postgres database for the MapServer to recognize. This is how the Postgres table for this similar metadata record Glenn showed us is set up. This catalogue has many zip files, but they all share the same geometry. Which appears to be the bounding box for the dataset.

woodRock commented 3 years ago

Andrea helped find the ST_MakeEnvelope command. This allows us to create a rectangular polygon in Postgis. We simply provide the min(x) and min(y), max(x),max(y), and the projection (4326).

woodRock commented 3 years ago

The script which creates our table has been updated to include the geometry (the bounding box for the dataset) and grant read permissions to the nzodn role.

woodRock commented 3 years ago

While attempting to view the table in DBeaver we found out that nzodn did not have privileges to read the biological_map table. This was problematic, as this is the role that is configured to read the data through the GeoSever application. This is why updated the script to these grant privileges.

woodRock commented 3 years ago

Using DBeaver, we can preview the geometry for the table. It is not flat, or stretching across the entire world. We can visually verify that this correct.

Capture