Skip to content

Commit

Permalink
Updating the codes and the objects world, worldMap, latamMap, as well…
Browse files Browse the repository at this point in the history
… as their descriptions. It should solve the problems with function share_borders and mismacthes between maps and the plantR gazetter for latin america
  • Loading branch information
LimaRAF committed Mar 26, 2021
1 parent cd0f45f commit bf6a491
Show file tree
Hide file tree
Showing 6 changed files with 373 additions and 178 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Author:
Hans ter Steege [ctb]
Marinez Ferreira de Siqueira [ctb]
Maintainer: Renato A. F. de Lima <raflima@usp.br>
Depends: R (>= 3.3.0)
Depends: R (>= 3.5.0)
Description: The package plantR provides tools for
retrieving, processing, cleaning and validating
(plant) species records from biological collections.
Expand Down
83 changes: 60 additions & 23 deletions R/data.R
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,15 @@

#' World Map
#'
#' Map used to perform the validation of the original geographical coordinates.
#' Country names were edited to match the __plantR__ default gazetteer and
#' original polygons were simplified (tolerance 0.001 decimal degrees).
#' Map used to perform the validation of the original geographical coordinates
#' at the lowest administrative level (e.g. country). Names were edited to match
#' the __plantR__ default gazetteer, using the same __plantR__ function used for
#' locality editing (i.e. `fixLoc()`).
#'
#' Original polygons were simplified (tolerance: 0.001 decimal degrees) to make
#' maps smaller in size and thus less burdensome for the geographical validation
#' procedures.
#'
#' Reference system: WSG84
#'
#' @keywords datasets
Expand All @@ -25,13 +31,32 @@
#' @source \url{https://gadm.org}
"worldMap"

#' Maps of Latin American countries
#' Maps of Latin American countries and dependent territories
#'
#' Maps used to perform the validation of the original geographical coordinates.
#' For each country, the map contains the lowest administrative level
#' available. Country, state and county (if present) names were edited to match
#' the __plantR__ default gazetteer and original polygons were simplified
#' (tolerance 0.0001 decimal degrees). Reference system: WSG84
#' For each country, the map contains the lowest administrative level available
#' at [GADM](https://gadm.org). We considered an initial total of 51 countries
#' and dependent territories for Latin America, but since seven of them are
#' available only at the lowest administrative level (e.g. Aruba, Curaçao. St.
#' Barthélemy), they were not included in this map (total of 44 individual
#' polygons). The Latin American definition used here include all American
#' territories but the United States and Canada.
#'
#' Locality names (e.g. country, state, county) were edited to match the
#' __plantR__ default gazetteer, using the same __plantR__ functions used for
#' locality editing (i.e. `fixLoc()`, `prepLoc()`).
#'
#' For Brazil, we cross-checked and corrected about 400 issues in GADM (version
#' 3.6) related to municipality names with typos, old toponyms, switched names
#' and even bad name assignment to polygons (e.g. Manaus assigned under another
#' municipality, Maués). An internal list of those changes (`gadmCheck`) is
#' provided for reproducibility.
#'
#' Finally, polygons were simplified (tolerance: 0.0001 decimal degrees) to make
#' maps smaller in size and thus less burdensome for the geographical validation
#' procedures.
#'
#' Reference system: WSG84
#'
#' @keywords datasets
#' @name latamMap
Expand All @@ -49,7 +74,9 @@
#' aggregated and the aggregated buffers were simplified (tolerance 0.01 decimal
#' degrees). Note that buffers were generated at the largest scale available
#' in 'Natural Earth' (i.e. 1:10 m) and simplification was performed after
#' generating and aggregating the buffered polygons. Reference system: WSG84
#' generating and aggregating the buffered polygons.
#'
#' Reference system: WSG84
#'
#' @keywords datasets
#' @name landBuff
Expand All @@ -66,8 +93,9 @@
#' were aggregated and the aggregated buffers were simplified (tolerance 0.01
#' decimal degrees). Note that buffers were generated at the largest scale
#' available in 'Natural Earth' (i.e. 1:10 m) and simplification was performed
#' after generating and aggregating the buffered polygons. Reference system:
#' WSG84
#' after generating and aggregating the buffered polygons.
#'
#' Reference system: WSG84
#'
#' @keywords datasets
#' @name islandsBuff
Expand All @@ -81,10 +109,12 @@
#' Map used to support the validation of the original geographical coordinates.
#' It was generated from the map available in 'Natural Earth' at medium scale
#' (i.e. 1:50 m), which includes continents and major islands. Original polygons
#' of each country were aggregated, then simplified (tolerance 0.001 decimal
#' of each country were aggregated, then simplified (tolerance: 0.001 decimal
#' degrees) and finally converted into 'spatial lines'. For some reason this
#' procedure generated objects smaller in size than the 'coastline' maps
#' available in 'Natural Earth'. Reference system: WSG84
#' available in 'Natural Earth'.
#'
#' Reference system: WSG84
#'
#' @keywords datasets
#' @name shoreLines
Expand All @@ -96,18 +126,25 @@
#' Simplified World Map
#'
#' Map used to support the validation of the original geographical coordinates,
#' mainly regarding the detection of problematic coordinates fallign just
#' outside its country corders. It was generated from the smallest scale available
#' in 'Natural Earth' (i.e. 1:110 m), which consists in 255 polygons for 247
#' countries in the world. Country long names were edited to match the
#' __plantR__ default gazetteer and original polygons were simplified (tolerance
#' 0.001 decimal degrees). Only the ISO 3166-1 alpha-2 codes and the long names
#' of each country are stored with the polygons. Reference system: WSG84
#' mainly regarding the detection of problematic coordinates falling outside its
#' country borders. It was generated from the smallest scale available in
#' 'Natural Earth' (i.e. 1:110 m), which consists in 183 polygons for 178
#' countries in the world. This map was complemented with 77 polygons for
#' missing countries and dependent territories (mainly islands), not included in
#' 'Natural Earth', so that this map can macth the other maps used in __plantR__.
#'
#' Country long names were edited to match the format of the __plantR__ default
#' gazetteer and original polygons were simplified (tolerance: 0.001 decimal
#' degrees). Only the ISO 3166-1 alpha-2 codes and the long names of each
#' country are stored with the polygons.
#'
#' Reference system: WSG84
#'
#' @keywords datasets
#' @name world
#' @usage data(world)
#' @format a MULTIPOLYGON 'sf' object with 255 features and 2 fields: iso_a2
#' (country code) and 'name' (country name).
#' @source \url{https://www.naturalearthdata.com/downloads/110m-cultural-vectors/110m-admin-0-countries/}
#' @format a MULTIPOLYGON 'sf' object with 183 features and 2 fields: iso_a2
#' (country code) and 'name' (edited country name).
#' @source \url{https://www.naturalearthdata.com/downloads/110m-cultural-vectors/110m-admin-0-details/}
#'
"world"

0 comments on commit bf6a491

Please sign in to comment.