[OSM-newbies] Squashed Display (Not JOSM)
Clay Smalley
claysmalley at gmail.com
Fri Aug 9 03:57:21 UTC 2013
Yes, there is some math. You're working with unprojected coordinates, and
as noted before, you'll need to project them. The simple explanation is
that the world is not flat, and a coordinate system that gives flatness to
something not-flat is going to look like shit.
The projection used for most online mapping services is the Mercator
Projection. The biggest benefit of the Mercator Projection is that
direction is preserved (northeast will always point the same way no matter
where you are on the map). Because of this, 90-degree angles will stay
90-degree angles. Try to find the math used to project unprojected
coordinates to the Mercator Projection.
On Aug 8, 2013 6:40 PM, "Matthew Aidekman User" <matthewaudio at gmail.com>
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>
> (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?
>
> Thanks in advance,
> -Matt
>
> _______________________________________________
> newbies mailing list
> newbies at openstreetmap.org
> http://lists.openstreetmap.org/listinfo/newbies
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/newbies/attachments/20130808/aa3f4832/attachment.html>
More information about the newbies
mailing list