[OSM-newbies] Squashed Display (Not JOSM)

Jim Gibson Jim at Gibson.org
Fri Aug 9 05:59:19 UTC 2013


On Aug 8, 2013, at 6:38 PM, Matthew Aidekman User wrote:

> Hi all,
> 
> 	So, I'm getting some distorted displays and I'm hoping for some help.  As an example, this is how Times Square displays. (http://imgur.com/CQlIocE)   For those who haven't been to my amazing city, these blocks are all rectangles in reality.  A casual search has yielded some stuff about projections but it's all been in regard to JOSM.  I'm just downloading a JSON file and processing it in Javascript with the JSON parser.  
> 
> All I'm doing so far is scaling the lon/lat coordinates to the size of the display.   I did a test and added the following code and as I expected it does indeed display a right triangle on top of the distorted map.
>  
> 	showLine(-73.790962, 42.252865,-73.791962, 42.253865);
> 	showLine(-73.790962, 42.252865,-73.790962, 42.253865);
> 	showLine(-73.790962, 42.253865,-73.791962, 42.253865);	
> 
> 
> Is there some extra math I'm supposed to employ to display lon/lat coordinates beyond just scaling them to the dimensions of the display?

As others have pointed out, degrees of latitude are not the same as degrees of longitude. They are closest at the equator and differ increasingly as you move towards the poles.

For the correct way to project latitude, longitude into a local, flat, rectilinear plane, see here:

<http://williams.best.vwh.net/avform.htm#flat>


More information about the newbies mailing list