cioos-siooc / cioos-siooc_data_transform

6 stars 5 forks source link

Adding defined regions to the geojson polygon #30

Open JessyBarrette opened 3 years ago

JessyBarrette commented 3 years ago

The data-transform tool add a region variable to the data which is based on the data lat/long, and a list of predefined geojson polygons. As of now, only polygons from the west coast are available and wide regions of the Arctic.

It would be good to add more regions associated to the East Coast and Saint-Lawrence.

Adding a french field (if available) for the region name would also be important.

The geojson polygons list can be find here.

pramod-thupaki commented 3 years ago

You can use https://geojson.io/#map=2/20.0/0.0 or similar tools, to create the geojson file and edit existing ones. Copy of the geojson file is now on odf_transform branch under 'test' folder.

The geographic_area tag can be generated using "find_geographic_area" and "read_geojson" functions

jeffcullis commented 3 years ago

Jeff to contact Diana, Pascal to contact MLI to get some geojson's from our regions

guillotp commented 3 years ago

MLI just game me the coordinates for 2 historical stations. For automatic integration purpose, is it correct to have just a point (lat, lon) or is it better to have a little square (for instance 1km x 1 km) ?

pramod-thupaki commented 3 years ago

Better to have a box around the point as a suspect the samples would have been collected 'near' the historical stations.

jeffcullis commented 3 years ago

DFO bioregions and NAFO divisions Diana provided this image, which shows the DFO bioregions: https://open.canada.ca/data/en/dataset/23eb8b56-dac8-4efc-be7c-b8fa11ba62e9 As well as the NAFO divisions: https://www.nafo.int/Data/GIS

jeffcullis commented 3 years ago

DFO bioregions full This file seems to show another region of interest just south of Newfoundland

guillotp commented 3 years ago

And here are the main transects for the Atlantic zone. image

guillotp commented 3 years ago

And the boxes used for the 'Approche Écosystèmique AE' program. image

jeffcullis commented 3 years ago

Thanks Pascal, Diana provided the same AZMP sampling regions map in English: AZMP_zones_en

jeffcullis commented 3 years ago

scotian_shelf_regions Here's some regions from the Scotian Shelf that we can use, similar to the more detailed ecozones that Pascal posted, from Diana. She can get us the coordinates for the bounding boxes as well.

guillotp commented 3 years ago

Better to have a box around the point as a suspect the samples would have been collected 'near' the historical stations.

Ok. And what about transect line ? What are you doing for your line off BC. It seems that DFO in the east are using a lot.

sjbruce commented 3 years ago

https://open.canada.ca/data/en/dataset/23eb8b56-dac8-4efc-be7c-b8fa11ba62e9

I converted the DFO bioregions dataset to GeoJSON and it ends up being a little over 14MB as they are pretty highly detailed. If we're including those regions in a dataset it could bloat it fairly quickly, especially if multiple are included.

QGIS can simplify it down quite a bit depending on how aggressive we want to be - a threshold of 5,000, for example, reduces it from 14MB to 1.6MB

pramod-thupaki commented 3 years ago

The polygons can be quite rough (fewer nodes) and does not need to follow the coastline very closely. This works quite well and as long as you do not have data from inland water resources (rivers, lakes) and want to assign special codes to them. You can check out the ios_polygons.geojson as an 'extreme' example ... https://github.com/cioos-siooc/cioos-siooc_data_transform/blob/odf_transform/odf_transform/geojson_files/ios_polygons.geojson

Regarding size - the geojson files are not included in the netcdf file, just the 'name' field is included as a string field. So the main disadvantage of using a highly detailed polygon is that getting the geographic area will slow down and might even fail.

jeffcullis commented 3 years ago

From Diana: "I found this that combines the regions from Petrie 1999 with the ones from Climate DB, this might be a good start" https://github.com/cioos-siooc/cioos-siooc_data_transform/blob/odf_geojson_jcullis/odf_transform/geojson_files/BotClim_pts_v7_merge.csv

sjbruce commented 3 years ago

Converted files from the open Canada dataset (original zipped and simplified), BotClim_pts_v7_merge.csv and Climate_ScotiaFundy_Polygons.csv into geojson.

https://github.com/cioos-siooc/cioos-siooc_data_transform/tree/odf_transform_sbruce/odf_transform/geojson_files

jeffcullis commented 3 years ago

@sjbruce I created an odf_geojson_jcullis branch off of yours as shown in commits above, merged in odf_transform changes and moved the geojson-related files you had added into new directory structure.

Diana has also suggested a new set of polygons to use, which is based on literature going back to 1987: Screen Shot 2021-03-25 at 11 13 31 AM I've added some of the resources Diana provided for this there as well.