Mars Coordinates  
Author Message
meytal_tubi





PostPosted: 2004-2-6 2:34:00 Top

java-programmer, Mars Coordinates Does anyone know how to convert (x,y) position of the mouse on a map
of Mars to the coordinates of Mars. I know there's a class in java
that is called Coordinate but i don't know how it works.
 
Andrew Thompson





PostPosted: 2004-2-6 2:44:00 Top

java-programmer >> Mars Coordinates Meytal Tubi wrote:
> Does anyone know how to convert (x,y) position of the mouse on a map
> of Mars to the coordinates of Mars.

I do not understand what you are
asking, and I suspect you don't either.

Could you clarify?
[ And if the answer is 'no', that pretty
much confirms my suspicion. ;-) ]

>..I know there's a class in java
> that is called Coordinate but i don't know how it works.

What Java are you referring to?

There is no Coordinate class in the J2SE..


 
Mark Haase





PostPosted: 2004-2-6 2:50:00 Top

java-programmer >> Mars Coordinates In article <email***@***.com>,
email***@***.com (Meytal Tubi) wrote:

> Does anyone know how to convert (x,y) position of the mouse on a map
> of Mars to the coordinates of Mars. I know there's a class in java
> that is called Coordinate but i don't know how it works.

Alas, there is java.util.venus.CoordinateTransform, but no such analogue
exists for Mars.

--
|\/| /| |2 |<
mehaase(at)sas(dot)upenn(dot)edu
 
 
Peter Kirk





PostPosted: 2004-2-6 15:55:00 Top

java-programmer >> Mars Coordinates
"Mark Haase" <email***@***.com> skrev i en meddelelse
news:email***@***.com...
> In article <email***@***.com>,
> email***@***.com (Meytal Tubi) wrote:
>
> > Does anyone know how to convert (x,y) position of the mouse on a map
> > of Mars to the coordinates of Mars. I know there's a class in java
> > that is called Coordinate but i don't know how it works.
>
> Alas, there is java.util.venus.CoordinateTransform, but no such analogue
> exists for Mars.

At the risk of sounding stupid, would it not be possible to extend this
class to enable it to transform mars coordinates correctly? I mean, how
different are mars and venus really?

Eg.
backgroundColor = Color.red;
diameter = ?
atmosphere = ?
etc

BTW, I cannot find the class you mention. Is it in the upcoming 1.5 release?

Peter

 
 
Andrew Thompson





PostPosted: 2004-2-6 16:30:00 Top

java-programmer >> Mars Coordinates Peter Kirk wrote:
> "Mark Haase" <email***@***.com> skrev i en meddelelse
> news:email***@***.com...
>> In article <email***@***.com>,
>> email***@***.com (Meytal Tubi) wrote:
>>
>>> Does anyone know how to convert (x,y) position of the mouse on a map
>>> of Mars to the coordinates of Mars. I know there's a class in java
>>> that is called Coordinate but i don't know how it works.
>>
>> Alas, there is java.util.venus.CoordinateTransform, but no such
>> analogue exists for Mars.

This perhaps _should_ have been followed by a..

[ ;-) ]

But since I am forgetful of putting in a wink
myself when I give a reply that is 'dripping
with sarcasm', I suppose I cannot criticize
Mark!

> BTW, I cannot find the class you mention. Is it in the upcoming 1.5
> release?

Nnnnooo....


 
 
Peter Kirk





PostPosted: 2004-2-6 16:50:00 Top

java-programmer >> Mars Coordinates "Andrew Thompson" <email***@***.com> skrev i en meddelelse
news:rgIUb.44341$email***@***.com...
> Peter Kirk wrote:
> > BTW, I cannot find the class you mention. Is it in the upcoming 1.5
> > release?
>
> Nnnnooo....

Oh. It's probably some sort of extra add-on pack for Java then, to fill up
some deficiencies? I mean, it does seem like rather a large oversight to
omit a mars package from the basic jdk. And the americans have spaceships
and everything crawling around on mars right now - I bet they didn't program
the software on their mars rover in java - how could they without the
necessary mars coordinate-transform class? Unless they made their own...?


 
 
rbs





PostPosted: 2004-2-6 17:00:00 Top

java-programmer >> Mars Coordinates In article <email***@***.com>,
email***@***.com (Meytal Tubi) wrote:

> Does anyone know how to convert (x,y) position of the mouse on a map
> of Mars to the coordinates of Mars. I know there's a class in java
> that is called Coordinate but i don't know how it works.

What map projection? Why Mars specifically?

Whether it's Mars or Earth or wherever (well, I'm assuming
a planet reaonably spherical), all that matters is that you
have a map of some known projection (I'm presuming global)
and you need to run a coordinate transformation.

So you have a component on which the map is being rendered
(the rendering requiring doing the projection's inverse
transformation). That component might have some code like

class MyMapPanel
extends JComponent
implements MouseListener
{
AbstractProjection projection;;

MyMapClass ( )
{
// do stuff

projection = new OrthographicProjection (new Dimension (100, 100));

// do stuff
}

public void mouseClicked (
MouseEvent e)
{
if (projection != null)
{
Point2D p = transformXY2LonLat (e.getX ( ), e.getY ( ));

// do stuff with info
}
}
}

where OrthographicProjection is a class which specifically
handles transformations appropriate to orthographic maps.
(The above assumes you have a library of map projection
classes, all subclassed from AbstractProjection.) We leave
it as an exercise for the reader to code up the actual map
projection class(es).

I have done this myself, with a library of (currently) 32
global map projections. Interestingly, perhaps, I originally
implemented it for the case of Mars and only later used it
in application related to mapping Earth data.
 
 
rbs





PostPosted: 2004-2-6 17:05:00 Top

java-programmer >> Mars Coordinates In article <email***@***.com>,
Mark Haase <email***@***.com> wrote:

> In article <email***@***.com>,
> email***@***.com (Meytal Tubi) wrote:
>
> > Does anyone know how to convert (x,y) position of the mouse on a map
> > of Mars to the coordinates of Mars. I know there's a class in java
> > that is called Coordinate but i don't know how it works.
>
> Alas, there is java.util.venus.CoordinateTransform, but no such analogue
> exists for Mars.

Sounds like a bad joke to me.

But just to keep the joke going... I'll point out that the
analog might not be as simple as you think. :-)

You see, if you're using the planetographic coordinate system,
then longitudes on Venus and Mars for in opposite directions.
On Venus, planetographic longitudes are measured positive
eastward, but on Mars (and Earth) they're positive west.
 
 
Mark Haase





PostPosted: 2004-2-6 18:06:00 Top

java-programmer >> Mars Coordinates In article <rgIUb.44341$email***@***.com>,
"Andrew Thompson" <email***@***.com> wrote:

> This perhaps _should_ have been followed by a..
>
> [ ;-) ]
>
> But since I am forgetful of putting in a wink
> myself when I give a reply that is 'dripping
> with sarcasm', I suppose I cannot criticize
> Mark!

Yes, it probably should have. I was going to add a constructive comment
after my sarcastic one, (this *is* c.l.j.HELP, after all) but the OP was
so vague about what's fundamentally a complex subject, that I said screw
it.

--
|\/| /| |2 |<
mehaase(at)sas(dot)upenn(dot)edu
 
 
Alex Hunsley





PostPosted: 2004-2-6 23:59:00 Top

java-programmer >> Mars Coordinates Meytal Tubi wrote:
> Does anyone know how to convert (x,y) position of the mouse on a map
> of Mars to the coordinates of Mars.

Yes.

> I know there's a class in java
> that is called Coordinate but i don't know how it works.

Then why don't you read the documentation? Coming into a help newsgroup
and saying "I know there is something that might help me, but I don't
know how it works" when there are so many copies of the java docs all
over the web etc. just sounds very, very lazy on your behalf.
This is comp.lang.java.help, not alt.wipe.my.arse.for.me.

(Docs actually have to be read you know; they're not bringing out
osmotic brain/blood barrier compatible documentation until at least jdk1.7.)

alex




 
 
Andrew Thompson





PostPosted: 2004-2-7 0:50:00 Top

java-programmer >> Mars Coordinates Alex Hunsley wrote:
...
> (Docs actually have to be read you know; they're not bringing out
> osmotic brain/blood barrier compatible documentation until at least
> jdk1.7.)

What _I_ am waiting for is the following:
- java.util.DWIMNWIS (do what I mean, not what I say)
- java.util.Psychic (to support DWIMNWIS) and..
- java.util.Telekinesis (so I do not have to suffer
actually typing on the keyboard)

Come on Sun, get your act together! ;-)


 
 
Tony Dahlman





PostPosted: 2004-2-10 10:44:00 Top

java-programmer >> Mars Coordinates Mark Haase wrote:
>
> In article <rgIUb.44341$email***@***.com>,
> "Andrew Thompson" <email***@***.com> wrote:
>
> > This perhaps _should_ have been followed by a..
> >
> > [ ;-) ]
> >
> > But since I am forgetful of putting in a wink
> > myself when I give a reply that is 'dripping
> > with sarcasm', I suppose I cannot criticize
> > Mark!
>
> Yes, it probably should have. I was going to add a constructive comment
> after my sarcastic one, (this *is* c.l.j.HELP, after all) but the OP was
> so vague about what's fundamentally a complex subject, that I said screw
> it.
>
> --
> |\/| /| |2 |<
> mehaase(at)sas(dot)upenn(dot)edu

Can't help thinking we're missing something here. Wasn't
Doctor Meytal Tubi on the JPL team in Pasadena? Maybe he really does
need help?

My guess: that java Coordinate package was one of those options we
can get (at extra cost).... Maybe gov.nasa.mars.coordinates or, more
likely, edu.tech.cal.mars.coordinates.

Hmmmmmmm.....
--
---------------------------------------
Reverse and shift up 15 to get my real email address:
email***@***.com
 
 
steve





PostPosted: 2004-3-8 5:37:00 Top

java-programmer >> Mars Coordinates On Fri, 6 Feb 2004 17:04:40 +0800, rbs wrote
(in article <402358a8$0$20033$email***@***.com>):

> In article <email***@***.com>,
> Mark Haase <email***@***.com> wrote:
>
>> In article <email***@***.com>,
>> email***@***.com (Meytal Tubi) wrote:
>>
>>> Does anyone know how to convert (x,y) position of the mouse on a map
>>> of Mars to the coordinates of Mars. I know there's a class in java
>>> that is called Coordinate but i don't know how it works.
>>
>> Alas, there is java.util.venus.CoordinateTransform, but no such analogue
>> exists for Mars.
>
> Sounds like a bad joke to me.
>
> But just to keep the joke going... I'll point out that the
> analog might not be as simple as you think. :-)
>
> You see, if you're using the planetographic coordinate system,
> then longitudes on Venus and Mars for in opposite directions.
> On Venus, planetographic longitudes are measured positive
> eastward, but on Mars (and Earth) they're positive west.


Why, did the intergalactic standards people have Microsoft on board?