drawing the GPS data on the map

Hi all,
using the basemap module, I would like to import my own image (scanned
paper map) as a background layer and than plot my GPS data on it. I
would like to know:

1) if it is possible in general?
if yes:
2) are there any good examples or suggestion which way to go and how
   to do it?

Thanks for your postings

Petr Jakes

Petr Jakes wrote:

Hi all,
using the basemap module, I would like to import my own image (scanned
paper map) as a background layer and than plot my GPS data on it. I
would like to know:

1) if it is possible in general?
if yes:
2) are there any good examples or suggestion which way to go and how
  to do it?

Thanks for your postings

Petr Jakes

Petr: You can easily plot data on arbitrary map projections, there are many examples of this in the source distribution and the wiki (http://www.scipy.org/wikis/topical_software/Maps). Using your own image as a background will be trickier, in fact I've never tried it. Basemap comes with it's own data (coastlines, political boundaries and rivers) for drawing maps. However, you may be able to do it by importing your image using PIL, converting it to a Numeric array and then plotting it over the map projection using imshow. To see how to convert an image to and from a Numeric array see http://effbot.org/zone/pil-numpy.htm. To see how to plot an image with Basemap see http://matplotlib.sourceforge.net/screenshots/plotmap.py.

If you do get this to work, please post an example to the list. I'm sure many would be interested.

-Jeff

···

--
Jeffrey S. Whitaker Phone : (303)497-6313
NOAA/OAR/CDC R/CDC1 FAX : (303)497-6449
325 Broadway Web : http://www.cdc.noaa.gov/~jsw
Boulder, CO, USA 80305-3328 Office: Skaggs Research Cntr 1D-124

Jeff,
thanks for your posting. I would like to ask some more questions:

I have got GPS data in the WGS 84 datum format
I have got paper map in the WGS 84 datum format (I mean I can scan it
and I will have the picture of this map and the picture will be in
WGS84 format as well)

I would like to follow your suggestions, but I can not find WGS84
projection in 17 supported map projections formats
( http://tinyurl.com/9s593 ).

I would really appreciate your comments.

Petr

···

Petr: You can easily plot data on arbitrary map projections, there are
many examples of this in the source distribution and the wiki
(http://www.scipy.org/wikis/topical_software/Maps). Using your own
image as a background will be trickier, in fact I've never tried it.
Basemap comes with it's own data (coastlines, political boundaries and
rivers) for drawing maps. However, you may be able to do it by
importing your image using PIL, converting it to a Numeric array and
then plotting it over the map projection using imshow. To see how to
convert an image to and from a Numeric array see
http://effbot.org/zone/pil-numpy.htm. To see how to plot an image with
Basemap see http://matplotlib.sourceforge.net/screenshots/plotmap.py.

If you do get this to work, please post an example to the list. I'm
sure many would be interested.

-Jeff

Petr Jakes wrote:

Jeff,
thanks for your posting. I would like to ask some more questions:

I have got GPS data in the WGS 84 datum format
I have got paper map in the WGS 84 datum format (I mean I can scan it
and I will have the picture of this map and the picture will be in
WGS84 format as well)

I would like to follow your suggestions, but I can not find WGS84
projection in 17 supported map projections formats
( http://tinyurl.com/9s593 ).

I would really appreciate your comments.

Petr

Petr: WGS84 is not a projection, it's a set of parameters that describe the shape of the earth (http://www.wgs84.com/) - these parameters should be given to basemap in the form of 'rmajor' and 'rminor' keyword arguments. A map projection is a system for mapping a portion of the earth on a flat surface (http://www.colorado.edu/geography/gcraft/notes/mapproj/mapproj_f.html).

-Jeff

···

--
Jeffrey S. Whitaker Phone : (303)497-6313
NOAA/OAR/CDC R/CDC1 FAX : (303)497-6449
325 Broadway Web : http://www.cdc.noaa.gov/~jsw
Boulder, CO, USA 80305-3328 Office: Skaggs Research Cntr 1D-124