Skip to content

Commit

Permalink
Fix Natural Earth links (#19)
Browse files Browse the repository at this point in the history
  • Loading branch information
eliascarv authored Aug 28, 2024
1 parent c2a7e2e commit f94459f
Show file tree
Hide file tree
Showing 3 changed files with 109 additions and 34 deletions.
66 changes: 33 additions & 33 deletions artifacts/NaturalEarth.csv
Original file line number Diff line number Diff line change
Expand Up @@ -229,36 +229,36 @@
"1:50m","Gray Earth with Shaded Relief, Hypsography, and Ocean Bottom","small size","https://naciscdn.org/naturalearth/50m/raster/GRAY_50M_SR_OB.zip"
"1:50m","Manual Shaded Relief","small size","https://naciscdn.org/naturalearth/50m/raster/MSR_50M.zip"
"1:50m","Prisma Shaded Relief","small size","https://naciscdn.org/naturalearth/50m/raster/PRISMA_SR_50M.zip"
"1:100m","Admin 0 – Countries","countries","https://naciscdn.org/naturalearth/100m/cultural/ne_100m_admin_0_countries.zip"
"1:100m","Admin 0 – Countries","without boundary lakes","https://naciscdn.org/naturalearth/100m/cultural/ne_100m_admin_0_countries_lakes.zip"
"1:100m","Admin 0 – Details","sovereignty","https://naciscdn.org/naturalearth/110m/cultural/ne_110m_admin_0_sovereignty.zip"
"1:100m","Admin 0 – Details","map units","https://naciscdn.org/naturalearth/110m/cultural/ne_110m_admin_0_map_units.zip"
"1:100m","Admin 0 – Details","scale ranks","https://naciscdn.org/naturalearth/110m/cultural/ne_110m_admin_0_scale_rank.zip"
"1:100m","Admin 0 – Details","tiny country points","https://naciscdn.org/naturalearth/110m/cultural/ne_110m_admin_0_tiny_countries.zip"
"1:100m","Admin 0 – Boundary Lines","country boundaries","https://naciscdn.org/naturalearth/110m/cultural/ne_110m_admin_0_boundary_lines_land.zip"
"1:100m","Admin 0 – Boundary Lines","Pacific grouping lines","https://naciscdn.org/naturalearth/110m/cultural/ne_110m_admin_0_pacific_groupings.zip"
"1:100m","Admin 1 – States, provinces","states and provinces","https://naciscdn.org/naturalearth/110m/cultural/ne_110m_admin_1_states_provinces.zip"
"1:100m","Admin 1 – States, provinces","without large lakes","https://naciscdn.org/naturalearth/110m/cultural/ne_110m_admin_1_states_provinces_lakes.zip"
"1:100m","Admin 1 – States, provinces","boundaries","https://naciscdn.org/naturalearth/110m/cultural/ne_110m_admin_1_states_provinces_lines.zip"
"1:100m","Admin 1 – States, provinces","scale ranks","https://naciscdn.org/naturalearth/110m/cultural/ne_110m_admin_1_states_provinces_shp_scale_rank.zip"
"1:100m","Populated Places","populated places","https://naciscdn.org/naturalearth/100m/cultural/ne_100m_populated_places.zip"
"1:100m","Populated Places","simple (less columns)","https://naciscdn.org/naturalearth/100m/cultural/ne_100m_populated_places_simple.zip"
"1:100m","Coastline","coastline","https://naciscdn.org/naturalearth/100m/physical/ne_100m_coastline.zip"
"1:100m","Land","land","https://naciscdn.org/naturalearth/100m/physical/ne_100m_land.zip"
"1:100m","Ocean","ocean","https://naciscdn.org/naturalearth/100m/physical/ne_100m_ocean.zip"
"1:100m","Rivers, Lake Centerlines","rivers and lake centerlines","https://naciscdn.org/naturalearth/100m/physical/ne_100m_rivers_lake_centerlines.zip"
"1:100m","Lakes + Reservoirs","lakes","https://naciscdn.org/naturalearth/100m/physical/ne_100m_lakes.zip"
"1:100m","Physical Labels","label areas","https://naciscdn.org/naturalearth/100m/physical/ne_100m_geography_regions_polys.zip"
"1:100m","Physical Labels","label points","https://naciscdn.org/naturalearth/100m/physical/ne_100m_geography_regions_points.zip"
"1:100m","Physical Labels","elevation points","https://naciscdn.org/naturalearth/100m/physical/ne_100m_geography_regions_elevation_points.zip"
"1:100m","Physical Labels","marine areas","https://naciscdn.org/naturalearth/100m/physical/ne_100m_geography_marine_polys.zip"
"1:100m","Glaciated Areas","glaciated areas","https://naciscdn.org/naturalearth/100m/physical/ne_100m_glaciated_areas.zip"
"1:100m","Geographic lines","geographic lines","https://naciscdn.org/naturalearth/100m/physical/ne_100m_geographic_lines.zip"
"1:100m","Graticules","all","https://naciscdn.org/naturalearth/100m/physical/ne_100m_graticules_all.zip"
"1:100m","Graticules","1 degree","https://naciscdn.org/naturalearth/100m/physical/ne_100m_graticules_1.zip"
"1:100m","Graticules","5","https://naciscdn.org/naturalearth/100m/physical/ne_100m_graticules_5.zip"
"1:100m","Graticules","10","https://naciscdn.org/naturalearth/100m/physical/ne_100m_graticules_10.zip"
"1:100m","Graticules","15","https://naciscdn.org/naturalearth/100m/physical/ne_100m_graticules_15.zip"
"1:100m","Graticules","20","https://naciscdn.org/naturalearth/100m/physical/ne_100m_graticules_20.zip"
"1:100m","Graticules","30","https://naciscdn.org/naturalearth/100m/physical/ne_100m_graticules_30.zip"
"1:100m","Graticules","bounding box","https://naciscdn.org/naturalearth/100m/physical/ne_100m_wgs84_bounding_box.zip"
"1:110m","Admin 0 – Countries","countries","https://naciscdn.org/naturalearth/110m/cultural/ne_110m_admin_0_countries.zip"
"1:110m","Admin 0 – Countries","without boundary lakes","https://naciscdn.org/naturalearth/110m/cultural/ne_110m_admin_0_countries_lakes.zip"
"1:110m","Admin 0 – Details","sovereignty","https://naciscdn.org/naturalearth/110m/cultural/ne_110m_admin_0_sovereignty.zip"
"1:110m","Admin 0 – Details","map units","https://naciscdn.org/naturalearth/110m/cultural/ne_110m_admin_0_map_units.zip"
"1:110m","Admin 0 – Details","scale ranks","https://naciscdn.org/naturalearth/110m/cultural/ne_110m_admin_0_scale_rank.zip"
"1:110m","Admin 0 – Details","tiny country points","https://naciscdn.org/naturalearth/110m/cultural/ne_110m_admin_0_tiny_countries.zip"
"1:110m","Admin 0 – Boundary Lines","country boundaries","https://naciscdn.org/naturalearth/110m/cultural/ne_110m_admin_0_boundary_lines_land.zip"
"1:110m","Admin 0 – Boundary Lines","Pacific grouping lines","https://naciscdn.org/naturalearth/110m/cultural/ne_110m_admin_0_pacific_groupings.zip"
"1:110m","Admin 1 – States, Provinces","states and provinces","https://naciscdn.org/naturalearth/110m/cultural/ne_110m_admin_1_states_provinces.zip"
"1:110m","Admin 1 – States, Provinces","without large lakes","https://naciscdn.org/naturalearth/110m/cultural/ne_110m_admin_1_states_provinces_lakes.zip"
"1:110m","Admin 1 – States, Provinces","boundaries","https://naciscdn.org/naturalearth/110m/cultural/ne_110m_admin_1_states_provinces_lines.zip"
"1:110m","Admin 1 – States, Provinces","scale ranks","https://naciscdn.org/naturalearth/110m/cultural/ne_110m_admin_1_states_provinces_shp_scale_rank.zip"
"1:110m","Populated Places","populated places","https://naciscdn.org/naturalearth/110m/cultural/ne_110m_populated_places.zip"
"1:110m","Populated Places","simple (less columns)","https://naciscdn.org/naturalearth/110m/cultural/ne_110m_populated_places_simple.zip"
"1:110m","Coastline","coastline","https://naciscdn.org/naturalearth/110m/physical/ne_110m_coastline.zip"
"1:110m","Land","land","https://naciscdn.org/naturalearth/110m/physical/ne_110m_land.zip"
"1:110m","Ocean","ocean","https://naciscdn.org/naturalearth/110m/physical/ne_110m_ocean.zip"
"1:110m","Rivers, Lake Centerlines","rivers and lake centerlines","https://naciscdn.org/naturalearth/110m/physical/ne_110m_rivers_lake_centerlines.zip"
"1:110m","Lakes + Reservoirs","lakes","https://naciscdn.org/naturalearth/110m/physical/ne_110m_lakes.zip"
"1:110m","Physical Labels","label areas","https://naciscdn.org/naturalearth/110m/physical/ne_110m_geography_regions_polys.zip"
"1:110m","Physical Labels","label points","https://naciscdn.org/naturalearth/110m/physical/ne_110m_geography_regions_points.zip"
"1:110m","Physical Labels","elevation points","https://naciscdn.org/naturalearth/110m/physical/ne_110m_geography_regions_elevation_points.zip"
"1:110m","Physical Labels","marine areas","https://naciscdn.org/naturalearth/110m/physical/ne_110m_geography_marine_polys.zip"
"1:110m","Glaciated Areas","glaciated areas","https://naciscdn.org/naturalearth/110m/physical/ne_110m_glaciated_areas.zip"
"1:110m","Geographic lines","geographic lines","https://naciscdn.org/naturalearth/110m/physical/ne_110m_geographic_lines.zip"
"1:110m","Graticules","all","https://naciscdn.org/naturalearth/110m/physical/ne_110m_graticules_all.zip"
"1:110m","Graticules","1 degree","https://naciscdn.org/naturalearth/110m/physical/ne_110m_graticules_1.zip"
"1:110m","Graticules","5","https://naciscdn.org/naturalearth/110m/physical/ne_110m_graticules_5.zip"
"1:110m","Graticules","10","https://naciscdn.org/naturalearth/110m/physical/ne_110m_graticules_10.zip"
"1:110m","Graticules","15","https://naciscdn.org/naturalearth/110m/physical/ne_110m_graticules_15.zip"
"1:110m","Graticules","20","https://naciscdn.org/naturalearth/110m/physical/ne_110m_graticules_20.zip"
"1:110m","Graticules","30","https://naciscdn.org/naturalearth/110m/physical/ne_110m_graticules_30.zip"
"1:110m","Graticules","bounding box","https://naciscdn.org/naturalearth/110m/physical/ne_110m_wgs84_bounding_box.zip"
7 changes: 6 additions & 1 deletion src/naturalearth.jl
Original file line number Diff line number Diff line change
Expand Up @@ -383,7 +383,12 @@ function states(variant="default"; scale="1:10", kwargs...)
else
varianterror()
end
get(scale, "Admin 1 – States, Provinces", variantstr; kwargs...)
entity = if scale == "1:50"
"Admin 1 – States, provinces"
else
"Admin 1 – States, Provinces"
end
get(scale, entity, variantstr; kwargs...)
end

"""
Expand Down
70 changes: 70 additions & 0 deletions test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,23 @@ using Test
gtb = NaturalEarth.countries()
@test gtb.geometry isa GeometrySet
@test paramdim(gtb.geometry) == 2
gtb = NaturalEarth.countries(scale="1:110")
@test gtb.geometry isa GeometrySet
@test paramdim(gtb.geometry) == 2

gtb = NaturalEarth.borders()
@test gtb.geometry isa GeometrySet
@test paramdim(gtb.geometry) == 1
gtb = NaturalEarth.borders(scale="1:110")
@test gtb.geometry isa GeometrySet
@test paramdim(gtb.geometry) == 1

gtb = NaturalEarth.states()
@test gtb.geometry isa GeometrySet
@test paramdim(gtb.geometry) == 2
gtb = NaturalEarth.states(scale="1:110")
@test gtb.geometry isa GeometrySet
@test paramdim(gtb.geometry) == 2

gtb = NaturalEarth.counties()
@test gtb.geometry isa GeometrySet
Expand All @@ -34,6 +43,9 @@ using Test
gtb = NaturalEarth.populatedplaces()
@test gtb.geometry isa GeometrySet
@test paramdim(gtb.geometry) == 0
gtb = NaturalEarth.populatedplaces(scale="1:50")
@test gtb.geometry isa GeometrySet
@test paramdim(gtb.geometry) == 0

gtb = NaturalEarth.roads()
@test gtb.geometry isa GeometrySet
Expand All @@ -54,18 +66,31 @@ using Test
gtb = NaturalEarth.urbanareas()
@test gtb.geometry isa GeometrySet
@test paramdim(gtb.geometry) == 2
gtb = NaturalEarth.urbanareas(scale="1:50")
@test gtb.geometry isa GeometrySet
@test paramdim(gtb.geometry) == 2

gtb = NaturalEarth.usparks()
@test gtb.geometry isa GeometrySet
@test paramdim(gtb.geometry) == 2

gtb = NaturalEarth.timezones()
@test gtb.geometry isa GeometrySet
@test paramdim(gtb.geometry) == 2

gtb = NaturalEarth.coastlines()
@test gtb.geometry isa GeometrySet
@test paramdim(gtb.geometry) == 1
gtb = NaturalEarth.coastlines(scale="1:110")
@test gtb.geometry isa GeometrySet
@test paramdim(gtb.geometry) == 1

gtb = NaturalEarth.lands()
@test gtb.geometry isa GeometrySet
@test paramdim(gtb.geometry) == 2
gtb = NaturalEarth.lands(scale="1:110")
@test gtb.geometry isa GeometrySet
@test paramdim(gtb.geometry) == 2

gtb = NaturalEarth.minorislands()
@test gtb.geometry isa GeometrySet
Expand All @@ -78,30 +103,51 @@ using Test
gtb = NaturalEarth.oceans()
@test gtb.geometry isa GeometrySet
@test paramdim(gtb.geometry) == 2
gtb = NaturalEarth.oceans(scale="1:110")
@test gtb.geometry isa GeometrySet
@test paramdim(gtb.geometry) == 2

gtb = NaturalEarth.rivers()
@test gtb.geometry isa GeometrySet
@test paramdim(gtb.geometry) == 1
gtb = NaturalEarth.rivers(scale="1:110")
@test gtb.geometry isa GeometrySet
@test paramdim(gtb.geometry) == 1

gtb = NaturalEarth.lakes()
@test gtb.geometry isa GeometrySet
@test paramdim(gtb.geometry) == 2
gtb = NaturalEarth.lakes(scale="1:110")
@test gtb.geometry isa GeometrySet
@test paramdim(gtb.geometry) == 2

gtb = NaturalEarth.physicallabels()
@test gtb.geometry isa GeometrySet
@test paramdim(gtb.geometry) == 2
gtb = NaturalEarth.physicallabels(scale="1:110")
@test gtb.geometry isa GeometrySet
@test paramdim(gtb.geometry) == 2

gtb = NaturalEarth.playas()
@test gtb.geometry isa GeometrySet
@test paramdim(gtb.geometry) == 2
gtb = NaturalEarth.playas(scale="1:50")
@test gtb.geometry isa GeometrySet
@test paramdim(gtb.geometry) == 2

gtb = NaturalEarth.glaciatedareas()
@test gtb.geometry isa GeometrySet
@test paramdim(gtb.geometry) == 2
gtb = NaturalEarth.glaciatedareas(scale="1:110")
@test gtb.geometry isa GeometrySet
@test paramdim(gtb.geometry) == 2

gtb = NaturalEarth.iceshelves()
@test gtb.geometry isa GeometrySet
@test paramdim(gtb.geometry) == 2
gtb = NaturalEarth.iceshelves(scale="1:50")
@test gtb.geometry isa GeometrySet
@test paramdim(gtb.geometry) == 2

gtb = NaturalEarth.bathymetry()
@test gtb.geometry isa GeometrySet
Expand All @@ -110,34 +156,58 @@ using Test
gtb = NaturalEarth.geographiclines()
@test gtb.geometry isa GeometrySet
@test paramdim(gtb.geometry) == 1
gtb = NaturalEarth.geographiclines(scale="1:110")
@test gtb.geometry isa GeometrySet
@test paramdim(gtb.geometry) == 1

gtb = NaturalEarth.graticules()
@test gtb.geometry isa GeometrySet
@test paramdim(gtb.geometry) == 1
gtb = NaturalEarth.graticules(scale="1:110")
@test gtb.geometry isa GeometrySet
@test paramdim(gtb.geometry) == 1

gtb = NaturalEarth.hypsometrictints()
@test gtb.geometry isa Grid
@test paramdim(gtb.geometry) == 2
gtb = NaturalEarth.hypsometrictints(scale="1:50")
@test gtb.geometry isa Grid
@test paramdim(gtb.geometry) == 2

gtb = NaturalEarth.naturalearth1()
@test gtb.geometry isa Grid
@test paramdim(gtb.geometry) == 2
gtb = NaturalEarth.naturalearth1(scale="1:50")
@test gtb.geometry isa Grid
@test paramdim(gtb.geometry) == 2

gtb = NaturalEarth.naturalearth2()
@test gtb.geometry isa Grid
@test paramdim(gtb.geometry) == 2
gtb = NaturalEarth.naturalearth2(scale="1:50")
@test gtb.geometry isa Grid
@test paramdim(gtb.geometry) == 2

gtb = NaturalEarth.oceanbottom()
@test gtb.geometry isa Grid
@test paramdim(gtb.geometry) == 2
gtb = NaturalEarth.oceanbottom(scale="1:50")
@test gtb.geometry isa Grid
@test paramdim(gtb.geometry) == 2

gtb = NaturalEarth.shadedrelief()
@test gtb.geometry isa Grid
@test paramdim(gtb.geometry) == 2
gtb = NaturalEarth.shadedrelief(scale="1:50")
@test gtb.geometry isa Grid
@test paramdim(gtb.geometry) == 2

gtb = NaturalEarth.grayearth()
@test gtb.geometry isa Grid
@test paramdim(gtb.geometry) == 2
gtb = NaturalEarth.grayearth(scale="1:50")
@test gtb.geometry isa Grid
@test paramdim(gtb.geometry) == 2

gtb = NaturalEarth.usmanualshadedrelief()
@test gtb.geometry isa Grid
Expand Down

0 comments on commit f94459f

Please sign in to comment.