RE: [OpenMap Users] projecting image

From: Chhaya Mudgal <chhaya@imcs.marine.rutgers.edu>
Date: Mon Nov 24 2003 - 18:28:04 EST

Thanks Martin for all the help.

I am able to get the image showup using OMScalingRaster in an application but it
does not show in applet even when it is the only layer. I am not sure why this is
happening. In the application the projection and alignment is wonderful.

thanks again, anyinput in applet will be highly appreciated

thanks

Chhaya

---- Original Message ----
From: Martin Chapman
Date: Mon 11/24/03 16:36
To: 'Chhaya Mudgal', chhaya@imcs.marine.rutgers.edu, dietrick@bbn.com,
amohombe@yahoo.com
Cc: openmap-users@bbn.com
Subject: RE: [OpenMap Users] projecting image

Chhaya,

Maybe the image is there but it's hidden behind another layer? Is it
the top most object in your graphics list for your rendering order? I
am doing the same thing with satellite imagery as well. FYI, if an
error is being thrown by the OMScalingRaster it could be because of
memory available to the virtual machine (that can be fixed easy if that
is the case), how big is the image file and what type is it?.

As far as projecting in Mercator it should be fine, although, LLXY is
the preferred because that is how the image should have been cut, if it
was done right. The problem with OMScalingRaster for projected imagery
is that it only accepts the upper left and lower right coordinates of
the image tile. Therefore, if your image is twisted (which most sat
imagery is) then the image is not projected onto the map geographically
correct. In order to overcome this you need to do an affine
transformation on the image using the Java2D API, which will allow you
to warp the image into the correct geometric shape that can be tied to
all four points of the satellite tile.

Martin

-----Original Message-----
From: Chhaya Mudgal [mailto:chhaya@imcs.rutgers.edu]
Sent: Monday, November 24, 2003 1:22 PM
To: mchapman@sanz.com; chhaya@imcs.marine.rutgers.edu; dietrick@bbn.com;
amohombe@yahoo.com
Cc: openmap-users@bbn.com
Subject: RE: [OpenMap Users] projecting image

I tried exactly your code but the image does not show. My code is
URL url = new URL(".........");
      Image image = Toolkit.getDefaultToolkit().getImage(url);
     MediaTracker oTracker = new MediaTracker(this);
     oTracker.waitForAll();
      System.out.println("in satellite layer1");
     OMScalingRaster raster = new
OMScalingRaster(46.00416f,-77.006f,34.995f,-
62.994f,image);
 omList.insertOMGraphicAt(raster,0);

but if i replace OMScalingRaster with OMRaster the image shows very
well.

Any advise please!!

thanks

Chhaya
---- Original Message ----
From: Martin Chapman
Date: Mon 11/24/03 15:05
To: 'Chhaya Mudgal', dietrick@bbn.com, amohombe@yahoo.com
Cc: openmap-users@bbn.com
Subject: RE: [OpenMap Users] projecting image

This worked for me with an OMScalingRaster:

URL oUrl = new URL ( thumbNailFilePath );
Image oImage = Toolkit.getDefaultToolkit ().getImage ( oUrl );

MediaTracker oTracker = new MediaTracker ( oFrame );

oTracker.addImage ( oImage, 0 );
oTracker.waitForAll ();

OMScalingRaster oScalingRaster = new OMScalingRaster (
nUpperLeftLatitude, nUpperLeftLongitude, nLowerRightLatitude,
nLowerRightLongitude, oImage ); oGraphicList.insertOMGraphicAt (
oScalingRaster, 0 );

Martin

-----Original Message-----
From: owner-openmap-users@bbn.com [mailto:owner-openmap-users@bbn.com]
On Behalf Of Chhaya Mudgal
Sent: Monday, November 24, 2003 10:25 AM
To: dietrick@bbn.com; amohombe@yahoo.com
Cc: openmap-users@bbn.com
Subject: Re: [OpenMap Users] projecting image

Can anyone please tell me how to project an image in mercator
projection? Is it
possible to do that?

Also I have tried to use OMScalingRaster but the image does not show
however it
shows up when i use OMRaster. Any idea why?

thanks

Chhaya

--
[To unsubscribe to this list send an email to "majdart@bbn.com" with the
following text in the BODY of the message "unsubscribe openmap-users"]
--
[To unsubscribe to this list send an email to "majdart@bbn.com" with the
following text in the BODY of the message "unsubscribe openmap-users"]
--
[To unsubscribe to this list send an email to "majdart@bbn.com"
with the following text in the BODY of the message "unsubscribe openmap-users"]
--
[To unsubscribe to this list send an email to "majdart@bbn.com"
with the following text in the BODY of the message "unsubscribe openmap-users"]
Received on Mon Nov 24 18:29:24 2003

This archive was generated by hypermail 2.1.8 : Thu May 12 2005 - 07:18:36 EDT