Sorry for the late response, urgent things came in between.
Your example works great.

Thank you again!

On Donnerstag, 12. April 2012 09:27:01, Imran Rajjad wrote:
> Hi,
>
> Graphics2D g=image.createGraphics(); //get graphics object of your
> image on top of which you want to draw other image
> g.setRenderingHint(RenderingHints.KEY_ANTIALIASING,RenderingHints.VALUE_ANTIALIAS_ON);
> //for good quality
> g.drawImage(.....); //use draw image function to draw image over the
> previous image
>
> hope it helps..
>
> regards,
> Imran
>
>
>
> On Thu, Apr 12, 2012 at 12:11 PM, Andreas Wagner
> <[email protected] <mailto:[email protected]>> wrote:
>
>     Hi.
>
>     I'm trying to merge an (satellite background) image I get from a WMS
>     server with a local (partially transparent) image.
>     I guess I'm not that far away from the solution but I don't know
>     how to
>     store the combined image on the hard drive.
>
>     My current code is:
>
>     mBoundingBox = ...
>
>     URL url = new URL("http://localhost/wms_dop";);
>     WebMapServer wms = new WebMapServer(url);
>     GetMapRequest request = wms.createGetMapRequest();
>     BoundingBox bbox = new ReferencedEnvelope(mBoundingBox);
>     request.setBBox( bbox );
>     request.setFormat( "image/png" );
>     request.setDimensions( 256, 256 );
>     request.setSRS( "EPSG:4326" );
>
>     GetMapResponse response = wms.issueRequest(request);
>     BufferedImage image = ImageIO.read(response.getInputStream());
>
>     AbstractGridFormat format = GridFormatFinder.findFormat( image );
>     AbstractGridCoverage2DReader reader = format.getReader( image );
>
>     File imageLocation = new File(heatmapLocation);
>
>     AbstractGridFormat format2 = GridFormatFinder.findFormat(
>     imageLocation );
>     AbstractGridCoverage2DReader reader2 = format2.getReader(
>     imageLocation );
>
>     MapContext map = new DefaultMapContext();
>     map.addLayer( reader, null );
>     map.addLayer( reader2, null );
>
>     // ...store map as png on hard drive?
>
>     Thanks in advance for any help!
>
>     
> ------------------------------------------------------------------------------
>     For Developers, A Lot Can Happen In A Second.
>     Boundary is the first to Know...and Tell You.
>     Monitor Your Applications in Ultra-Fine Resolution. Try it FREE!
>     http://p.sf.net/sfu/Boundary-d2dvs2
>     _______________________________________________
>     GeoTools-GT2-Users mailing list
>     [email protected]
>     <mailto:[email protected]>
>     https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users
>
>
>
>
> --
> I.R


------------------------------------------------------------------------------
For Developers, A Lot Can Happen In A Second.
Boundary is the first to Know...and Tell You.
Monitor Your Applications in Ultra-Fine Resolution. Try it FREE!
http://p.sf.net/sfu/Boundary-d2dvs2
_______________________________________________
GeoTools-GT2-Users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users

Reply via email to