MATLAB Answers

How can I overlay a google earth image with a quiver plot?

36 views (last 30 days)
Hello, I would like to overlay a google image with a quiver plot but have no idea where to start. The purpose is to display current velocities around a reef.
It would be great if someone could point me in the right direction to start with.

Accepted Answer

Jonathan LeSage
Jonathan LeSage on 18 Oct 2013
Edited: Jonathan LeSage on 18 Oct 2013
If you have a map image of your area of interest, you could plot and scale the map coordinates using the imagesc function after reading the image in with the imread function. Furthermore, if you have known points of reference on the map and know the scale, you can simply plot your quiver plot directly over the map image!
Here is an extremely basic outline of how your code could look. The coordinates are up to you to fill in, of course:
% Import map image
mapImage = imread('map.jpg');
imagesc(xMin:xMax,yMin:yMax,mapImage);
hold on;
% Overlay the quiver plot
quiver(x,y,dx,dy);
The primary trick here is to ensure your scales of the map and your quiver plot are aligned. I am also assuming that you will be plotting over a relatively small area such that map projection/transformations are not an issue. I would recommend brushing up on projections, just in case:
You could also check out the MATLAB mapping toolbox that helps make georeferencing more straightforward.
Hope this helps to get you started!
  2 Comments
Image Analyst
Image Analyst on 3 May 2020
I think I did that in this link. Below the colors overlaid onto the gray scale image correspond to the angle of the edge blobs.

Sign in to comment.

More Answers (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!