Skip to content

Functions for plotting on downloaded images from Google maps and Open street map. Primitive versions of https://github.com/zoharby/plot_google_map here implemented in Julia.

Notifications You must be signed in to change notification settings

ckjellson/mapPlottingJulia

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 

Repository files navigation

Map Plotting Julia

Functions for plotting on automatically downloaded images from Google maps and Open street map. Primitive versions of https://github.com/zoharby/plot_google_map here implemented in Julia.

plotGoogleMap()

Downloads an image from Google maps and plots an existing line/scatter-plot on top of the image. (Requires api-key)

Example of plotting the position of six capitals in Europe on top of a roadmap image from Google maps:

using("plotGoogleMap.jl")
maptype = "roadmap"
format = "png"
apikey = "SOME_LONG_STRING_FROM_GOOGLE"
tempPath = raw"PATH_TO_DIR\temp.png" # Temporary path for saving image, can be removed by rm(tempPath)
lat = [48.8708,   51.5188,   41.9260,   40.4312,   52.523,  37.982]
lon = [2.4131,    -0.1300,    12.4951,   -3.6788,    13.415,   23.715]
p = scatter(lon,lat,color=:blue,label="cities")
plotGoogleMap(p,apikey,maptype,format,tempPath)
title!("Six capitals in Europe")

Google_cities

plotOSM()

Downloads an image from Open Street Map (OSM) and plots an existing line/scatter-plot on top of the image.

Example of plotting the position of six capitals in Europe:

using("plotOSM.jl")
tempPath = raw"PATH_TO_DIR\temp.png" # Temporary path for saving image, can be removed by rm(tempPath)
lat = [48.8708,   51.5188,   41.9260,   40.4312,   52.523,  37.982]
lon = [2.4131,    -0.1300,    12.4951,   -3.6788,    13.415,   23.715]
p = scatter(lon,lat,color=:blue,label="cities")
plotOSM(p,tempPath)
title!("Six capitals in Europe")

OSM_cities

About

Functions for plotting on downloaded images from Google maps and Open street map. Primitive versions of https://github.com/zoharby/plot_google_map here implemented in Julia.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages