Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/JuliaGeo/GADM.jl
A Julia package for obtaining geographical data from the GADM dataset
https://github.com/JuliaGeo/GADM.jl
gadm geography julia julia-package package
Last synced: 5 days ago
JSON representation
A Julia package for obtaining geographical data from the GADM dataset
- Host: GitHub
- URL: https://github.com/JuliaGeo/GADM.jl
- Owner: JuliaGeo
- License: mit
- Created: 2020-10-21T11:35:39.000Z (about 4 years ago)
- Default Branch: master
- Last Pushed: 2024-07-29T19:18:44.000Z (4 months ago)
- Last Synced: 2024-10-30T20:52:28.383Z (21 days ago)
- Topics: gadm, geography, julia, julia-package, package
- Language: Julia
- Homepage: https://gadm.org
- Size: 141 KB
- Stars: 38
- Watchers: 3
- Forks: 4
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-brazil-data - GADM
README
This package provides polygons/multipolygons for all countries and their sub-divisions from the [GADM dataset](https://gadm.org/).
It fetches the data dynamically from the officially hosted database using [DataDeps.jl](https://github.com/oxinabox/DataDeps.jl).## Installation
Get the latest stable release with Julia's package manager:
```julia
] add GADM
```## Usage
`GADM.get` returns polygons/multipolygons, which implement the [GeoInterface](https://github.com/JuliaGeo/GeoInterface.jl):
```julia
import GADM# GADM.get(, , , , ...)
# get boundary of the country India
india = GADM.get("IND")# get boundary of the state/province Uttar Pradesh in India
uttar = GADM.get("IND", "Uttar Pradesh")# get boundary of the district Lucknow in Uttar Pradesh, India
lucknow = GADM.get("IND", "Uttar Pradesh", "Lucknow")
```The option `depth=n` can be used to return a table of polygons for all subregions at depth `n`:
```julia
states = GADM.get("BRA", depth=1)
cities = GADM.get("BRA", depth=2)
```- **Country Code** follows the ISO 3166 Alpha 3 standard, you can find the code for your country [here](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-3).
- Other regions require "approximately" official names that are at least contained (case-insensitive) in the official name.The coordinate reference system is longitude/latitude and the WGS84 datum.
## Credits
GADM, the Database of Global Administrative Areas, is a high-resolution database of country administrative areas, with a goal of "all countries, at all levels, at any time period." The database is available in a few export formats, including shapefiles that are used in most common GIS applications.
Please read their license at https://gadm.org/license.html which is different than the MIT license of the GADM.jl package.