<html><head><style type="text/css"><!-- DIV {margin:0px;} --></style></head><body><div style="font-family:times new roman, new york, times, serif;font-size:12pt"><div style="font-family: times new roman,new york,times,serif; font-size: 12pt;"><span>If an equirectangular projection (<a target="_blank" href="http://en.wikipedia.org/wiki/Equirectangular">http://en.wikipedia.org/wiki/Equirectangular</a>) is acceptable, where both distance and area are distorted towards the poles, a simple translation/scale matrix will allow you to directly work in latitude/longitude regardless of location. Every other projection that I'm aware of can only be approximated at small ranges as mentioned by Tor below without performing the projection calculation yourself external to cairo.</span><br><br>Larry<br><br><div style="font-family: times new roman,new york,times,serif; font-size: 12pt;">----- Original Message ----<br>From: Tor Lillqvist <tml@iki.fi><br>To:
cairo@cairographics.org<br>Sent: Friday, October 5, 2007 12:01:09 PM<br>Subject: Re: [cairo] cartographic projection<br><br><div>> perhapses I could just use some clever cairo scaling and just use the lat/long for my cairo x/y.<br><br>Yes and no. If the area is small (like some tens of kilometres<br>across), sure. Just scale your longitude values by, umm, 1/cos(lat)<br>(sorry if I got this wrong, not bothering to check now), etc.<br><br>But otherwise, if you need more precision, and/or have a larger area,<br>you really need to read up on geographic projections. It's a very<br>interesting subject. Once you have browsed more introductory tutorials<br>on the web, I can recommend<br><a target="_blank" href="http://onlinepubs.er.usgs.gov/djvu/PP/PP_1395.pdf">http://onlinepubs.er.usgs.gov/djvu/PP/PP_1395.pdf</a> .<br><br>> Cartography and matrices are not really my thing.<br><br>It's not really my thing either, but I have dabbled a little with
this<br>stuff just for fun in my spare time. (Lately related to MS Flight<br>Simulator addons...)<br><br>Matrix algebra is not really needed for projection calculations, at<br>least as they usually are presented. Trigonometric functions are, and<br>if you use an ellipsoid model for the Earth (as you should),<br>hyperbolic functions. You don't really need to derive any formulae<br>yourself, though, all can be found in on-line publications, presented<br>in more or less easy to understand ways.<br><br>--tml<br>_______________________________________________<br>cairo mailing list<br>cairo@cairographics.org<br><a target="_blank" href="http://lists.cairographics.org/mailman/listinfo/cairo">http://lists.cairographics.org/mailman/listinfo/cairo</a><br></div></div><br></div></div></body></html>