Home All Groups Group Topic Archive Search About

Drawing points in degrees!!!

Author
9 Apr 2006 4:41 AM
ataanis
Hi, I'm dealing with coordinates to draw a map ( lines connecting
points for which I have the coordinates), and the coordinates are
represented in degrees, e.g 86.23° , and I need to plot those and draw
lines connecting them. Can anyone help me on how to accomplish this?
Thanks

Author
9 Apr 2006 5:10 AM
Homer J Simpson
<ataa***@gmail.com> wrote in message
news:1144557668.908743.244620@g10g2000cwb.googlegroups.com...

> Hi, I'm dealing with coordinates to draw a map ( lines connecting
points for which I have the coordinates), and the coordinates are
represented in degrees, e.g 86.23° , and I need to plot those and draw
lines connecting them. Can anyone help me on how to accomplish this?
Thanks

That's pretty vague. What are you drawing on? How can coordinates be
represented in degrees - there must be a radial measurement also.
Author
9 Apr 2006 5:54 AM
ataanis
Sorry for being vague, I'm drawing on the console of a simple windows
application, built with VB. The input files I'm reading from have the
following information , it has a big number, and then that number is
converted to the following :  *
"Convert the longitude into a positive x-value.
return  input value plus 180,000,000 (0 = 180° West)
param  longitude  longitude in degree*1,000,000
*/
private static int intoX (int longitude) {
    return longitude+180000000;
* Converts the latitude into a positive y-value.
* @return  90,000,000 minus input value (0 = 90° North)
* @param  latitude  latitude in degree*1,000,000

*/
private static int intoY (int latitude) {
    return 90000000-latitude;
}

I BASICALLY END UP WITH NUMBERS LIKE 86,866343
Thanks
Author
9 Apr 2006 6:22 AM
Homer J Simpson
<ataa***@gmail.com> wrote in message
news:1144562093.713616.260040@v46g2000cwv.googlegroups.com...

Sorry for being vague, I'm drawing on the console of a simple windows
application, built with VB. The input files I'm reading from have the
following information , it has a big number, and then that number is
converted to the following :  *
"Convert the longitude into a positive x-value.
return  input value plus 180,000,000 (0 = 180° West)
param  longitude  longitude in degree*1,000,000
*/
private static int intoX (int longitude) {
return longitude+180000000;
* Converts the latitude into a positive y-value.
* @return  90,000,000 minus input value (0 = 90° North)
* @param  latitude  latitude in degree*1,000,000

*/
private static int intoY (int latitude) {
return 90000000-latitude;
}

I BASICALLY END UP WITH NUMBERS LIKE 86,866343
Thanks
================================================

Well, you should be adding 180 to the longitude IMO. However I wonder if the
input has been scaled by multiplying by 10E6 so you need to work with
numbers multiplied by 10E6.

You will need to divide your results by 10E6 at some point if so.
Author
9 Apr 2006 6:25 AM
ataanis
My question is how do I draw using those numbers. thanks
Author
9 Apr 2006 2:26 PM
Homer J Simpson
<ataa***@gmail.com> wrote in message
news:1144563947.445359.113240@i40g2000cwc.googlegroups.com...

> My question is how do I draw using those numbers. thanks

You'll need to scale them to whatever you are drawing on. You would have to
do that in any case.
Author
10 Apr 2006 8:22 AM
R. MacDonald
Hello, ataanis,

It sounds like you may have a significant task.  But first you must
understand the coordinate system that you are working with.  Try
searching for "Spherical Polar Coordinates" and see what you can learn
there.

As for the drawing, you will have to give some serious thought (as Homer
suggests) to what you are drawing on.  Not just in terms of the Graphic
surface, but in terms of the 3-D shape of it.  If you are trying to draw
on a flat surface you have the standard map-maker's problem.

I haven't had to do this before, but my first step would be to search
for some package that would help with the numerical transformations
required to project a 3-D shape onto a surface.

Good luck,
Randy


ataa***@gmail.com wrote:
Show quoteHide quote
> Sorry for being vague, I'm drawing on the console of a simple windows
> application, built with VB. The input files I'm reading from have the
> following information , it has a big number, and then that number is
> converted to the following :  *
> "Convert the longitude into a positive x-value.
>  return  input value plus 180,000,000 (0 = 180° West)
>  param  longitude  longitude in degree*1,000,000
>  */
> private static int intoX (int longitude) {
>     return longitude+180000000;
>  * Converts the latitude into a positive y-value.
>  * @return  90,000,000 minus input value (0 = 90° North)
>  * @param  latitude  latitude in degree*1,000,000
>
>  */
> private static int intoY (int latitude) {
>     return 90000000-latitude;
> }
>
> I BASICALLY END UP WITH NUMBERS LIKE 86,866343
> Thanks
>
Author
9 Apr 2006 5:56 AM
ataanis
Clarification , I'm migrating a software that was previously written in
java, and the functions I wrote in the previous post , are the ones
written for the code , and I'm not sure what all that means.