help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: Plot a map of Europe


From: Jorgen Sandberg
Subject: RE: Plot a map of Europe
Date: Tue, 10 Nov 2015 20:22:48 +0100


-----Original Message-----
From: address@hidden [mailto:address@hidden On Behalf Of Nicholas Jankowski
Sent: 10 November 2015 19:06
To: Jorgen Sandberg <address@hidden>
Cc: Francesco Potortì <address@hidden>; help <address@hidden>
Subject: Re: Plot a map of Europe

On Tue, Nov 10, 2015 at 11:33 AM, Jorgen Sandberg <address@hidden> wrote:
>
> -----Original Message-----
> From: Francesco Potortì [mailto:address@hidden
> Sent: 10 November 2015 17:21
> To: Jorgen Sandberg <address@hidden>
> Cc: address@hidden
> Subject: Re: Plot a map of Europe
>
>>I have searched the internet, but not found a real "how to" 
>>instruction on how to plot a map of for example Europe and add a 
>>contour on top. I need to know the packages to install and where I can 
>>find map data in a format accepted by OCTAVE. I really needs an idiots 
>>guide to plotting maps in OCTAVE.
>
> Generally speaking, you can draw a plot on top of any background image.
> The general way to do so is something like
>
>     map = imread(mapfile);
>     image(map);
>     axis('image', 'off', 'nolabel');
>     hold on
>     plot(x, y);
>
> x and y should use the same measure of unit as the map, that is, pixels.
>
>
>
> Dear Mr Potorti,
>
> Thank you for the mail.
>
> I am trying to make M_Map work with Octave, but I am facing some 
> incompatibilities like "verLessThan" can't be found.
>
> Do you know of a way to plot a map of Europe that works with Octave?
>
> Regards,
> Jorgen Sandberg

Please respond at the end of the message as its the convention of this mailing 
list and it makes it easier for others to follow the thread.

Had to google M_Map to realize what you were referring to. Apparently it's an 
unofficial Matlab package developed by a University. A version does appear to 
be hosted on both Matlab Central and the university website.
http://www.eos.ubc.ca/~rich/map.html

My guess is that unless someone else here on the mailing list is familiar with 
that particular package, you may have to dive into the code yourself to find 
out what it relies on in Matlab that is not yet fully compatible with Octave.  
For example:

>> verLessThan
warning: the 'verLessThan' function is not yet implemented in Octave

Please read `http://www.octave.org/missing.html' to learn how you can 
contribute missing functionality.

error: 'verLessThan' undefined near line 1 column 1


You are welcome to contribute an implementation of the verLessThan function 
that is Matlab compatible while respecting their copyrighted code. Of course, 
it is entirely possible that you will come across another function with the 
same issue.

Alternatively, you could ask whether the University group has any Octave users 
who would be willing to port the package.


Specific to your actual question:  you haven't really specified what it is you 
mean by 'plot a map of Europe'.  Francesco showed you how to add an image to 
your plot, and plot data on top of it, but it seems that isn't what you meant.  
It may be that some cases of what you like to do are possible, but you'd have 
to write the code yourself. Someone might be able to help you if you provide 
more detail.

What sort of data are you starting with? what does it look like, where does it 
come from?  what output would you like to see with that data?

Nick J.

------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Dear Nick,

Thank you for your reply. The reason for my vague question is that I am 
starting from scratch on plotting maps in Octave. I have searched the internet, 
and the best I came across was M_Map and a reference to get the coastline data 
from a NOAA website.

Ideally, I want to plot the coastlines of any selected part of the Earth and 
the borders between the countries in a suitable projection such as Mercator and 
hopefully others. On top of the map I want to plot the ground traces of 
satellites.

Francesco gave me the solution to the last part except that it is not clear to 
me how to ensure the map and the traces use the same projection. However, I 
also need to know how to plot the coastlines and borders. Where do I find a 
dataset defining the coastlines and borderlines that I can plot conveniently in 
Octave? So, I need to go further back to the fundamentals than the reply of 
Francesco. His "mapfile" I need to know where I can get one and how to select 
the part of the world I am interested in and also the map projection.

Yes, it is really basic stuff, sorry.

M_Map has a lot of features for plotting maps, but there are incompatibilities 
with Octave, unfortunately. The 'verLessThan' function I have figured out to be 
a function determining whether the installed version of Matlab is less than a 
specified version. The easiest is to throw it out and ensure Octave compatible 
functions are called and not Matlab specific functions.

However, my hope was that there is an easy and ready package for Octave having 
the functionality I need. I can't find it and was hoping someone would know a 
package and would give me a reference to it.

I have also contacted Rich Pawlowicz, who is the man behind the M_Map. He 
replied to me that he had shown no interest in Octave since 2011 and hence does 
not know about incompatibilities with Octave version 4.0.0.

Any help and advice is most welcome.

Regards,
Jorgen Sandberg

-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]