World Map
SatelliteAnalysis.jl has a built-in algorithm to plot the World Map provided that the user loaded GeoJSON.jl and one of the Makie.jl backends. This empty plot can be used to add analysis on top of it. We can create it using the function plot_world_map:
SatelliteAnalysis.plot_world_map — Function
plot_world_map(; kwargs...) -> Figure, AxisCreate a Makie.jl Figure and Axis with the world map. The figure is styled with the theme obtained from the function SatelliteAnalysis.makie_theme, selected by the keyword theme. All other kwargs... are passed to the function Figure. For more information, please refer to Makie.jl documentation.
This function plots the countries' borders in the created figure using the file with the country polygons fetched with the function fetch_country_polygons. Hence, if this file does not exist, the algorithm tries to download it.
This function only works after loading the package GeoJSON.jl and one Makie.jl backend (CairoMakie.jl or GLMakie.jl, for example).
Keywords
theme::Union{Nothing, Symbol, Makie.Theme}: Theme used to style the figure, which is applied locally. If it is aSymbol, it selects the variant of the theme created by the functionSatelliteAnalysis.makie_theme, which can be:lightor:dark. If it is aMakie.Theme, this theme is applied. If it isnothing, no theme is applied, and the figure uses the current Makie theme. In the last two cases, the elements that are not styled by the theme use the colors of the variant:light. (Default::light)size::Tuple: Size of the figure. (Default:(1450, 800))
Extended help
Throws
ArgumentError: If the theme variant inthemeis not:darkor:light.
SatelliteAnalysis.plot_world_map! — Function
plot_world_map!(ax::Axis; kwargs...) -> PolyPlot the country polygons of the world map in the Makie.jl axis ax, in which the X-axis is the longitude [°] and the Y-axis is the latitude [°], returning the created plot. This function does not change the axis limits, ticks, or labels.
This function plots the countries' borders using the file with the country polygons fetched with the function fetch_country_polygons. Hence, if this file does not exist, the algorithm tries to download it.
Since this function draws into an existing axis, it does not apply the theme provided by the function SatelliteAnalysis.makie_theme. The plot inherits the styling of the figure that owns ax.
This function only works after loading the package GeoJSON.jl and one Makie.jl backend (CairoMakie.jl or GLMakie.jl, for example).
Keywords
theme::Union{Nothing, Symbol, Makie.Theme}: Select the colors of the country polygons, which are not styled by the Makie theme. If it is:darkor:light, we use the colors of the respective variant of the theme provided bySatelliteAnalysis.makie_theme. If it is aMakie.Themeornothing, we use the colors of the light variant. (Default::light)
All other kwargs... are passed to the function poly!, overriding the attributes selected by this function (color, strokecolor, and strokewidth).
Extended help
Throws
ArgumentError: Ifthemeis aSymbolother than:darkor:light.
julia> using GeoJSON, CairoMakiejulia> fig, ax = plot_world_map();

We can also create the World map using the dark theme variant:
fig, ax = plot_world_map(; theme = :dark)