Skip to content

Add dcw-collection.txt - #31

Merged
PaulWessel merged 11 commits into
masterfrom
Add-dcw-collections
Jan 7, 2022
Merged

PaulWessel merged 11 commits into
masterfrom
Add-dcw-collections

Conversation

@Esteban82

Copy link
Copy Markdown
Member

@Esteban82

Copy link
Copy Markdown
Member Author

A map of the regions of Africa

gmt coast -Bf -Ggray -png map -N1 -R=AF -JM15c -EUN015+gred -EUN014+gorange -EUN017+gyellow -EUN018+ggreen -E"Western Africa"+gblue

map

@PaulWessel PaulWessel left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice! Please make two changes:

  1. Add the URL to the wikipedia description of the geoscheme in the header section.
  2. Add list: in from of all the lists of codes.

@Esteban82

Copy link
Copy Markdown
Member Author

Ok. About 2) you mean I should modified each list like this, right?

list: DZ,EG,LY,MA,SD,TN,EH

@joa-quim

Copy link
Copy Markdown
Member

Hmm, not related to this but the -RAF area extends too much to South (Kergelen should not be included) a to the East where it should stop a bit east of Madgascar.

@Esteban82

Copy link
Copy Markdown
Member Author

Hmm, not related to this but the -RAF area extends too much to South (Kergelen should not be included) a to the East where it should stop a bit east of Madgascar.

I agree. For this, we should remove AF of some countries/territories from dcw-countries.txt. In the other continents there are similar cases.

Asia

@PaulWessel

Copy link
Copy Markdown
Contributor

Maybe similar to what we had to do to Norway - strip off that Spitsbergen outlier.

@Esteban82

Copy link
Copy Markdown
Member Author

I think that the main issue is that we are defining the continent (=AF, =AS, =EU, etc) as a collection of countries and not geographically. And sometimes this include small islands far away from the shore or exclave (like Kaliningrad). Which is similar of what we are doing with UN M49.

@PaulWessel

Copy link
Copy Markdown
Contributor

No longer case-sensitive. Also, fixed issue so that parsing error in these files leads to an error and exit.

@PaulWessel

Copy link
Copy Markdown
Contributor

Two questions:

  1. Regarding the regions of the continents: WIth collections we could add our continents that way instead, via AF, EU entries in dcw-collections.txt. The source code can handle any backwards compatibilities like =AF to be come AF or Africa. Are there official regions we can use instead of the named collections of countries? This will requires both 6.4.x and 2.0.2 for users to notice.
  2. The file looks good and with IHO28-1 or -2 there are no case issues that I can see, meaning the current case-insensitive coding can stand, yes?

@PaulWessel

Copy link
Copy Markdown
Contributor

I fixed the Arctic Ocean which had a strange w/e (not quite 360) and north exceeded 90.
In fact, I see lots of coordinates that have noise, e.g. Indian Ocean:

region: 20.000000000000057/146.836278/-70.4284/10.437097927000082

the difference between 20.000000000000057 and 20 are a few nanometers... Surely none of these borders are more accurate than a meter, meaning we should probably truncated to 6 decimals? 1e-6 * 111113 m = 11 cm.

@Esteban82

Copy link
Copy Markdown
Member Author

The file looks good and with IHO28-1 or -2 there are no case issues that I can see, meaning the current case-insensitive coding can stand, yes?

Yes, I took them from the shp file. It is NOT the official tag (of IHO53) but I think we can use them to avoid case-sensitive issues.

@Esteban82

Copy link
Copy Markdown
Member Author

Regarding the regions of the continents: WIth collections we could add our continents that way instead, via AF, EU entries in dcw-collections.txt. The source code can handle any backwards compatibilities like =AF to be come AF or Africa.

Do you mean to add the continents in the list? Yes, it is possible. They have an official number like the sub-regions. It would something like:


# Africa
tag: UN002 Africa
list: all the iso codes of Africa

It would be possible to call the other sub-regions? like:
list: UN015, UN014, UN017, UN014, UN011

Are there official regions we can use instead of the named collections of countries? This will requires both 6.4.x and 2.0.2 for users to notice.

I am not sure if understand correctly. Do you other regions define by another organism? Or by the UN?

@Esteban82

Copy link
Copy Markdown
Member Author

. Surely none of these borders are more accurate than a meter, meaning we should probably truncated to 6 decimals? 1e-6 * 111113 m = 11 cm.

From the paper of Fourcy and Lorvelec: "Positioning precision of reference points is approximately 10 s of meridian arc (about 300 m)."

@PaulWessel

Copy link
Copy Markdown
Contributor

Are there official regions we can use instead of the named collections of countries? This will requires both 6.4.x and 2.0.2 for users to notice.

I am not sure if understand correctly. Do you other regions define by another organism? Or by the UN?

Sorry, I meant can we find official w/e/s/n regions for all continents and then we use that for AF etc instead of a list of countries, since that includes Kerguelen and other troubles.

@PaulWessel

Copy link
Copy Markdown
Contributor

OK, so on resolution I think reformat to %.6lg to avoid those long we/s/n/ strings

@Esteban82

Copy link
Copy Markdown
Member Author

Sorry, I meant can we find official w/e/s/n regions for all continents and then we use that for AF etc instead of a list of countries, since that includes Kerguelen and other troubles.

Do you mean to have the limits of the continents based of the geology (so excluding all the island that are included in a continent). And the problem would be for example how to differentiate the geological Africa from the geopolitical Africa, right?

I think I could get the w/e/s/n for the geological continents (which can't be based on countries due to the issue with islands and intercontinental countries like Russia).

Add the tags and lists for Africa, Sub-saharan Africa, Americas, Latin American and the Caribbean, Antarctica, Asia, Europe and Oceania.
@Esteban82

Copy link
Copy Markdown
Member Author
  1. The source code can handle any backwards compatibilities like =AF to be come AF or Africa.

Here you idea is to remove the continents of the DCW?

Because I am seeing the continents defined by the UN is different from the DCW. For example Russia is in Europe, Greenland in America. So -R=EU is different than -RUN150. Should we re-arranged the countries in DCW?

@PaulWessel

Copy link
Copy Markdown
Contributor

I think we should follow the UN - that should be more reputable than whatever DCW did. I cannot recall exactly how I did things initially but I am the one who assigned countries to continents (I think) so that could be wrong.

@Esteban82

Copy link
Copy Markdown
Member Author

I think we should follow the UN - that should be more reputable than whatever DCW did. I cannot recall exactly how I did things initially but I am the one who assigned countries to continents (I think) so that could be wrong.

Ok. So I should reorganize the countries in the dcw folders, right?

@PaulWessel

Copy link
Copy Markdown
Contributor

Yes, if you have time. I need to do some errands this morning so will be back in a few hours.

@Esteban82

Copy link
Copy Markdown
Member Author

About the list and regions of dcw-collection in general.

I think that it would be good to have like smaller collections (like Balcans, Scandinavian or Greater and Less Antilles) but I didn't find any official list (like UN). So maybe we can leave that additions for a second version of this list. What do you think?

@Esteban82

Copy link
Copy Markdown
Member Author

Yes, I have just to fix those issues.

For Micro/Mela/Polynesia I also have to compare with the UN definition.

@joa-quim

Copy link
Copy Markdown
Member

I think the bounding boxes are a bit too tight. See Africa, Europe (trims a bit of Ireland), Iberia (shaves the westernmost points). Maybe add a little pad to all of them? But that pad must probably proportional to width/height.

@Esteban82

Copy link
Copy Markdown
Member Author

I think the bounding boxes are a bit too tight. See Africa, Europe (trims a bit of Ireland), Iberia (shaves the westernmost points).

Yes, I meant this when I said "adjust some values".

Maybe add a little pad to all of them? But that pad must probably proportional to width/height.

Do you mean an extra space between the shore and the bounding box?

@Esteban82

Copy link
Copy Markdown
Member Author

Europe (trims a bit of Ireland)

I checked the shp. Europe = Continental Europa so that is why Ireland is trim. It is part of British Isles. Should we include them in Europe, right?

Iberia (shaves the westernmost points).

Which are they? The Berlengas Islands?

@joa-quim

joa-quim commented Dec 23, 2021 •

Copy link
Copy Markdown
Member

I checked the shp. Europe = Continental Europa so that is why Ireland is trim. It is part of British Isles. Should we include them in Europe, right?

Abasolutely.

Which are they? The Berlengas Islands?

It's the westernmost tip of continental Europe. "Cabo da Roca". But the "Andes" is even worst. And we used to have Europe extending till the Azores.

image

@Esteban82

Copy link
Copy Markdown
Member Author

Thanks Joaquim. I will keep in mind.

Another issue. I will add the info of major lakes. I can use directly the GSHHG level 2. I noticed that the bounding box is included in the header so would be easy. Maybe in the future we could add the tag directly on it? What do you think?

Id = 763 N = 46 G = 0 L = 2 E = 180 S = 0 R = 46.679720/54.766110/36.580000/47.115280 A = 397052.350619 B = 403040.418798 P = 0 F = 180506

@PaulWessel

Copy link
Copy Markdown
Contributor

I thin maybe it is OK to add a name at the end of those records but would need to check to code in src that it does not break anything.

@Esteban82

Copy link
Copy Markdown
Member Author

I will add the info of major lakes. I can use directly the GSHHG level 2.

I have a doubt. What GSHHG resolution should I use to extract the bounding box? I was thinking full but I am not sure.

@Esteban82

Copy link
Copy Markdown
Member Author

I add the 14 major lakes (by area) plus the Great Lakes from wikipedia.
Lakes.pdf

Also add the biggest islands (greater than 25,000 km2) also from [wikipedia]. (https://en.wikipedia.org/wiki/List_of_islands_by_area). I do not include islands that can be drawn trough DCW (Iceland, Cuba, Madagascar, Hispaniola, Tasmania, etc).
Islas.pdf

I also want to add some main archipelagos (Canary, Madeira, Galapagos, etc). I here suggestions to add.

I get the shoreline from the full version of GSHHG level 2 (and 6 for two antarctic islands) so it shouldn't be any problem with the bounding box (but please check).

@Esteban82

Copy link
Copy Markdown
Member Author

I noticed that the bounding box is included in the header so would be easy. Maybe in the future we could add the tag directly on it? What do you think?

Id = 763 N = 46 G = 0 L = 2 E = 180 S = 0 R = 46.679720/54.766110/36.580000/47.115280 A = 397052.350619 B = 403040.418798 P = 0 F = 180506

I think we could even call the entire island from here. To be clear, if I want to get the coastline of Siciliy, I could write something like `gmt coast -LetterSicily -M -W > Sicily.txt" and GMT would extract only the coastline of the the polygon called Sicily. So we would have to add a name (and a code) in the headers, and @PaulWessel would have to write some code to search for the name (or code).

@PaulWessel

Copy link
Copy Markdown
Contributor

I have a doubt. What GSHHG resolution should I use to extract the bounding box? I was thinking full but I am not sure.

All the resolutions file has the same bounding box (full) for each feature. However, lower resolution will have fewer features. I think the large things you are considering should be in all, with the possible exception of crude.

@Esteban82

Copy link
Copy Markdown
Member Author

All the resolutions file has the same bounding box (full) for each feature. However, lower resolution will have fewer features. I think the large things you are considering should be in all, with the possible exception of crude.

Ok. I also use full resolution because that was used to define the limits of the sea regions.

@Esteban82

Copy link
Copy Markdown
Member Author

I think we could add the regions of the 1:110. What do you think?

I fix the geographic regions and make topographic grid from the gebco grid.
Geography_relief.pdf

What do you think? For some regions, maybe the values can be adjust a bit more but I think that it is too much work for a very little detail. So I am thinking of leave these regions as they are. Although if you want to fix some particular region, I could do it (let me know).

Remember that this is just a sub-set of the regions. Others are lists of countries (from UN and others), regions of seas/oceans, major lakes, biggest islands and some main archipelagos.

@joa-quim

joa-quim commented Jan 4, 2022

Copy link
Copy Markdown
Member

I have this Julia function that should be pretty useful for this.

A made up example

julia> GMT.round_wesn([-1.111 5.567743 -6.976346 9.98658])
1×4 Matrix{Float64}:
 -1.2  5.6  -7.2  10.0

@Esteban82

Copy link
Copy Markdown
Member Author

I have this Julia function that should be pretty useful for this.

Thanks. Looks fine but the main issue is that the geographic regions of the shp are based in another coastline (not GSHHG) and the error it can be 0.0x degress. So I would need to revise them manually (which is too much).

@Esteban82

Copy link
Copy Markdown
Member Author

I upload the collections to revise in 3 files. The first 2 are based on bounding box regions, the 3rd is a list of countries. In all of them I include the long name (title) and code (label). For the codes I used mostly 4 letters.

  1. Geography_relief.pdf: 37 geographic regions based on Natural Earth 1:110.
  2. Seas.pdf: 161 seas, lakes, islands and archipelagos. The seas are based on IHO53. I include 2 more seas (Sargasso and Southern Ocean). Also include lakes, major islands and archipelagos from the GSHHG (full resolution file). I do not include islands that can be drawn with DCW (Cuba, Hispaniola, Cabo Verde, etc.).
  3. Regiones.pdf: 46 collections (or lists) of countries. 30 are from the UN49 and the rest I took them from Wikipedia. Maybe some more could be add (let me know, it is very simple).

In total there are 244 regions. Maybe we could go up to 250?

Updated with all the llists and regions used in the pdfs.
@PaulWessel

Copy link
Copy Markdown
Contributor

Very nice work, @Esteban82! I think 244 is quite a few already and we can always add more later.

@Esteban82

Esteban82 commented Jan 7, 2022 •

Copy link
Copy Markdown
Member Author

Ok, thanks @PaulWessel.

So please revised so we can merge it.

PS: I remove the "WIP" from the title.

@Esteban82 Esteban82 changed the title WIP Add dcw-collection.txt Add dcw-collection.txt Jan 7, 2022
@PaulWessel
PaulWessel merged commit ae94324 into master Jan 7, 2022
@PaulWessel
PaulWessel deleted the Add-dcw-collections branch January 7, 2022 19:55
@Esteban82

Copy link
Copy Markdown
Member Author

I upload the collections to revise in 3 files. The first 2 are based on bounding box regions, the 3rd is a list of countries. In all of them I include the long name (title) and code (label). For the codes I used mostly 4 letters.

1. [Geography_relief.pdf](https://github.com/GenericMappingTools/dcw-gmt/files/7826516/Geography_relief.pdf): 37 geographic regions based on Natural Earth 1:110.

2. [Seas.pdf](https://github.com/GenericMappingTools/dcw-gmt/files/7826524/Seas.pdf): 161 seas, lakes, islands and archipelagos. The seas are based on IHO53. I include 2 more seas (Sargasso and Southern Ocean). Also include lakes, major islands and archipelagos from the GSHHG (full resolution file). I do not include islands that can be drawn with DCW (Cuba, Hispaniola, Cabo Verde, etc.).

3. [Regiones.pdf](https://github.com/GenericMappingTools/dcw-gmt/files/7826536/Regiones.pdf): 46 collections (or lists) of countries. 30 are from the UN49 and the rest I took them from Wikipedia. Maybe some more could be add (let me know, it is very simple).

In total there are 244 regions. Maybe we could go up to 250?

I just wonder if these pdf should be available for the user to sea more easily the lists and regions.

@PaulWessel

Copy link
Copy Markdown
Contributor

I am not sure where they could go. However, maybe those batch scripts could be added as examples for how users can visualize all things. Or maybe @meghanrjones has a better idea.

@maxrjones

Copy link
Copy Markdown
Member

I like the idea of sharing example scripts along with the figures. Are the batch scripts posted anywhere?

@Esteban82

Copy link
Copy Markdown
Member Author

I will share them soon.

@Esteban82

Copy link
Copy Markdown
Member Author

I share a zip file which has 3 files and its respective lists.
Scripts.zip

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.

4 participants