[email protected] wrote:
> I'm new to Python and have looked at your FloatCanvas2 demo. I was
> trying to figure out how to display a geo-referenced map image that I
> generated using Mapnik, I have no problem displaying the image. It is
> an image generated from Lat/Long shape files so I know the Bounding
> Box coords. What I would like to know is how to display it so that
> the image is referenced to the Lat/Long coords so I can display the
> lat/long positions in the status bar as well as plot GPS data on the
> image that is in lat/long. Any help would be greatly appreciated,
> floatcanvas2 does everything I need and more. Great work!

I didn't write FC2 -- I wrote FC2, and FC2 was written by Matthias 
Kesternich as a Google Summer of Code project.

In any case, I've forwarded your message on the FloatCanvas mailing 
list, so he and others can see it.

http://mail.mithis.com/cgi-bin/mailman/listinfo/floatcanvas


As to your question:

One question is what projection you used to generate the map -- if it 
isn't a simple linear projection, then the Bounding Box may not be 
enough info, though depending on the scale, it may be good enough. 
However, FC2 is designed to handle arbitrary projections, so you should 
be able to do it right.

Matthias recently posted a note about to do this very thing:

"""
I've prepared a simple example, checkout the demo in svn called "Map
Drawing". It loads a bitmap in the background, displays a grid over it
(the coordinates of the lines are given in long-lat format) and draws the
grid with the mercator transform. Then the user can draw his own lines
onto that grid, the coordinates of the lines are stored in long-lat format
(radians as a base, not degrees, so the ranges are from -PI to +PI in
x-direction and from -PI/2 to +PI/2 in y-direction). The lines are added
to the same parent node as the grid, so they inherit the mercator
transform and thus are drawn properly.
"""

Take a look at that demo, and then ask any further questions you have on 
the list.

-Chris





-- 
Christopher Barker, Ph.D.
Oceanographer

Emergency Response Division
NOAA/NOS/OR&R            (206) 526-6959   voice
7600 Sand Point Way NE   (206) 526-6329   fax
Seattle, WA  98115       (206) 526-6317   main reception

[email protected]
_______________________________________________
FloatCanvas mailing list
[email protected]
http://mail.mithis.com/cgi-bin/mailman/listinfo/floatcanvas

Reply via email to