OberonPlace.com Forums  

Go Back   OberonPlace.com Forums > Developer Forums > VBA > CorelDRAW/Corel DESIGNER VBA

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 20-06-2007, 20:15
diwin
Guest
 
Posts: n/a
Default longitude and latitude to x and y

More fun with maps.

I am not into cartography, so I don't know the terminology, but I have figured out enough to understand the layout of the map I am using.

It is a map of Canada. The southern border of the western half follows 49 degrees N. I am using the type of map that shows that line as a gentle curve, and the longitudinal lines as straight lines that converge on the north pole.

It turns out that the distances along the 49th parallel are compressed by 10%, so when I measure the angle (centred on the north pole) of the arc that separates any 2 points, the angle is exactly 90% of the real world angle (as compared to government map in ESRI ArcMap).

What I want to do is to use the x and y coordinates to calculate the latitude (90 degrees minus the angular distance from the north pole) and longitude (degrees of arc, centred on the pole, from a known and numerically defined point in the map). I also want to do this in reverse.

So, map or not, it seems like I am really just after start and end points of a pie-type ellipse and a radius. But the math and the coding don't integrate inside my brain. If anyone could give me a pointer to a sound process, I would be grateful.

Thanks.

Last edited by diwin; 22-06-2007 at 00:16. Reason: Used a better map later in thread
Reply With Quote
  #2  
Old 21-06-2007, 04:46
wOxxOm's Avatar
wOxxOm wOxxOm is offline
Senior Member
 
Join Date: Mar 2005
Posts: 836
Default

it may be even worse if the projection you have is not uniform, that is different longitudes are distorted differently
Reply With Quote
  #3  
Old 21-06-2007, 07:47
diwin
Guest
 
Posts: n/a
Default

I will check in more detail; a higher and lower latitude and longitudes. I hope it won't involve calculus.
Reply With Quote
  #4  
Old 22-06-2007, 00:13
diwin
Guest
 
Posts: n/a
Default

OK. I looked over 3 points spanning the breadth of the country (about 5,000km), each at 3 important latitudes, 49N, 60N and 70N. The 3 points at one latitude have different longitudes from the 3 points at the other latitudes.

What I found is generally managable distortion.

E-W distances between the 3 points:
latitude....My map
70N.........2 -4% below actual
60N.........3.7% below actual
49N.........0.3% above to 1% below actual

N-S distances:
Distance...............Actual.......My map.....Percent Diffence
From 70N to 60N:...1112km....less 29km....2.6% below actual
From 60N to 49N:...1223km....less 25km....2.0% below actual

In addition. there is the previously mentioned 10% compression of the central angle of the circle that defines longitude.

It turns out that the most used region of the map will be the lower portion, below 60N, with heavy use near or slightly below 49N. It is also in my favour that accuracy is not critical. It is allowable for a dot to be off by up to 10 km.

So, if I were gifted, and I was to make any adjustments to distances, I would do the following:
1) Reduce N-S distances by 2%
2) Leave E-W distances near 49N alone.
3) Reduce E-W distances approaching 60N from a lower latitudes by an amount approaching 3.7% right at 60N. (sounds like calculus to me, which I don't do) and then diminish this effect to 2% at 70N and hold it at that level for all latitudes above 70N.

I can code a lot of stuff that looks like spaghetti but runs like a ferrari. And I can understand lots of code others write. I can usually modify where needed. I guess I would really be after a math formula (like the part that looks like calculus) and a general idea of how to construct a procedure to handle this sort of conversion.

Below is the map with the 3 points marked at each reference latitude. I also positioned pie-type ellipses to show one of two distances I measured at each latitude.
Attached Images
 
Reply With Quote
  #5  
Old 24-06-2007, 09:50
diwin
Guest
 
Posts: n/a
Default

OK Better.

I found a standard Lambert Confocal Conical projection and have skewed my map to fit it nicely. It was almost the same to begin with.

So all other measurements aside, do you know how to convert xy-coords to and from Lambert Confocal Conical projection for Canada?
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -5. The time now is 01:26.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright © 2011, Oberonplace.com