Apr 23 2009, 06:05 AM
Post
#1
|
|
|
Newbie ![]() Group: Validated Member Posts: 7 Joined: 23-Apr 09 Member No.: 5,899 No Country Selected![]() |
Hi everybody,
I am getting a real headack trying to find information about that. I have a map based on Robinson projection. I have to display on it cities, according to their latitude and longitude. And no way to get information about the way to make the conversion in order to write my algorithm. Does anyone have an idea ? a hint to help me with ? |
|
|
|
New Topic |
Jan 10 2010, 07:07 AM
Post
#16
|
|
![]() Legendary Contributor ![]() ![]() ![]() ![]() ![]() Group: Validated Member Posts: 279 Joined: 13-Mar 09 From: Caversham, Reading, England. Member No.: 5,682 United Kingdom![]() |
I'm a fool. Please ignore my previous two posts, on re-reading this thread it's obvious that I misunderstood what you were looking for. If (at last) I have it right, what you need is a projection engine. Such a one is Proj.4, see:
http://trac.osgeo.org/proj/ Using proj it is possible to project a tab-delimited WGS84 lon/lat file to Robinson using a command line such as: proj +proj=robin cities_lon_lat.txt > cities_robinson.txt The input file ('robin cities_lon_lat.txt') needs to be tab-delimited in something like this format (lon first, then lat): # Some World Cities 50.08 26.33 Ad Damman Saudi Arabia SAU 47.97 29.38 Kuwait Kuwait KWT 47.76 30.50 Basra Iraq IRQ 42.94 14.79 Al Hudaydah Yemen YEM 29.90 31.20 Alexandria Egypt EGY Running the command above will produce a tab-delimited text file ('cities_robinson.txt'): # Some World Cities 4589375.66 2816200.97 Ad Damman Saudi Arabia SAU 4359187.88 3142419.46 Kuwait Kuwait KWT 4324742.07 3261834.90 Basra Iraq IRQ 4017410.26 1581817.95 Al Hudaydah Yemen YEM 2701163.32 3336376.28 Alexandria Egypt EGY In this example the output was sent to a text file, but of course it could be directed to anywhere you like. If the command above is run without the '> cities_robinson.txt' output will be to stdout (the terminal window). Regards, N. -------------------- Caversham, Reading, England.
|
|
|
|
Jul 22 2010, 09:51 AM
Post
#17
|
|
|
Newbie ![]() Group: New Member Posts: 1 Joined: 22-Jul 10 Member No.: 8,672 Germany![]() |
so to convert dynamically the geographical coordinates (lat/long) to x/y value for a Robinson map, here is the mathematical explanation of the formulas : http://findarticles.com/p/articles/mi_hb30...ag=content;col1 note that in mathematique formulas, you always want to convert the lat/long from decimal value to radian before to apply on the any formula (it took me a week before to figure out that !!) if you have any question about that, feel free to write, my map is displaying on the fly any city of the world ! Hi, quite an old post - but hoepfully I can still get some help! I'm trying to do something similar and I tried to translate lat/lon to x/y with Beineke's formula. Unluckily I don't have success doing so. I used radians - but maybe I'm missing something else. Which formula did you use? When you try to get y for 90° - shouldn't the result be 1, like propagated on Wikipedia? My result is -0,23. Is Beineke's formula right? I found no other source in the web. It states here: QUOTE where s = 1 for ([phi][greater than or equal to]0) or s = 1 for ([phi]<0) So the s would be always 1??Thanks Raphael This post has been edited by räph: Jul 23 2010, 03:42 AM |
|
|
|
Jul 26 2010, 09:17 PM
Post
#18
|
|
|
Newbie ![]() Group: New Member Posts: 1 Joined: 26-Jul 10 Member No.: 8,693 United States![]() |
I think I have to convert them into Projected Coordinate System, according to the Robinson projection. -------------------- |
|
|
|
Add Reply New Topic |
|
Lo-Fi Version | Time is now: 9th September 2010 - 09:00 AM |