Ciao Ronak,
there is no easy way to do what you need to.
The metadata encoding/decoding in the geotools geotiff plugin has been
built having as a target imageio, thereforere once you put the
relevant metadata together what you get is a tree that you can pass to
an imageio writer. The writer is responsible to write that out as a
geotiff header not geotools.
As I said it is not going to be easy to replicate that funzionality alone.

Simone.
-------------------------------------------------------
Ing. Simone Giannecchini
GeoSolutions S.A.S.
Owner - Software Engineer
Via Carignoni 51
55041  Camaiore (LU)
Italy

phone: +39 0584983027
fax:      +39 0584983027
mob:    +39 333 8128928


http://www.geo-solutions.it
http://geo-solutions.blogspot.com/
http://simboss.blogspot.com/
http://www.linkedin.com/in/simonegiannecchini

-------------------------------------------------------



On Thu, Jul 16, 2009 at 6:57 PM, Patel, Ronak Avinash (US
SSA)<[email protected]> wrote:
> Thanks Justin or your help as always.
>
> Can any one from the coverage team chime in and lend me an ear on the
> situation?
>
> -----Original Message-----
> From: Justin Deoliveira [mailto:[email protected]]
> Sent: Wednesday, July 15, 2009 7:21 PM
> To: Patel, Ronak Avinash (US SSA)
> Cc: [email protected];
> [email protected]; Froumis, James A (US SSA);
> Morgan, Michael L (GXP) (US SSA)
> Subject: Re: [Geoserver-users] how to create and write a GeoTiff Header
> out to a byte stream.
>
> I could be way off here, I am sure one of the coverage people will
> correct me here if i am wrong, but it looks like you can use the
> assignTo() method to encode the contents as a dom. And then use the
> regular method of encoding a jdom object.
>
> But like I said, i could be way off :)
>
> Patel, Ronak Avinash (US SSA) wrote:
>> Hi Everyone,
>>
>>
>>
>> I've been digging for hours trying to find a way to write out a
> GeoTiff
>> Header block to a byte stream for my LAS files.
>>
>>
>>
>> I have the following code:
>>
>>
>>
>> GeoTiffIIOMetadataEncoder encoder = *new* GeoTiffIIOMetadataEncoder();
>>
>>
> encoder.addGeoShortParam(GeoTiffConstants.GTModelTypeGeoKey,
>> GeoTiffGCSCodes.ModelTypeGeocentric);
>>
>>
>> encoder.addGeoShortParam(GeoTiffConstants.GTRasterTypeGeoKey,
>> GeoTiffConstants.RasterPixelIsPoint);
>>
>>
>> encoder.addGeoShortParam(GeoTiffGCSCodes.GeographicTypeGeoKey,
>> GeoTiffGCSCodes.GCS_WGS_84);
>>
>>             encoder.addGeoAscii(GeoTiffVCSCodes.VerticalCSTypeGeoKey,
>> "WGS 84 Ellipsoid");
>>
>>
>> encoder.addGeoShortParam(GeoTiffVCSCodes.VerticalCitationGeoKey,
>> GeoTiffUoMCodes.Linear_Meter);
>>
>>
>>
>> But I am at a loss at how to write this to a byte stream of any
> kind...a
>> java.io.OutputStream.
>>
>>
>>
>> Can anyone help me out??
>>
>>
>>
>> Ronak Patel
>>
>> Senior Software Engineer
>>
>> BAE Systems NS
>>
>> San Diego, CA
>>
>>
>>
>>
>>
> ------------------------------------------------------------------------
>>
>>
> ------------------------------------------------------------------------
> ------
>> Enter the BlackBerry Developer Challenge
>> This is your chance to win up to $100,000 in prizes! For a limited
> time,
>> vendors submitting new applications to BlackBerry App World(TM) will
> have
>> the opportunity to enter the BlackBerry Developer Challenge. See full
> prize
>> details at: http://p.sf.net/sfu/Challenge
>>
>>
>>
> ------------------------------------------------------------------------
>>
>> _______________________________________________
>> Geoserver-users mailing list
>> [email protected]
>> https://lists.sourceforge.net/lists/listinfo/geoserver-users
>
>
> --
> Justin Deoliveira
> OpenGeo - http://opengeo.org
> Enterprise support for open source geospatial.
>
>
>
> ------------------------------------------------------------------------------
> Enter the BlackBerry Developer Challenge
> This is your chance to win up to $100,000 in prizes! For a limited time,
> vendors submitting new applications to BlackBerry App World(TM) will have
> the opportunity to enter the BlackBerry Developer Challenge. See full prize
> details at: http://p.sf.net/sfu/Challenge
> _______________________________________________
> Geotools-gt2-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users
>

------------------------------------------------------------------------------
Enter the BlackBerry Developer Challenge  
This is your chance to win up to $100,000 in prizes! For a limited time, 
vendors submitting new applications to BlackBerry App World(TM) will have
the opportunity to enter the BlackBerry Developer Challenge. See full prize  
details at: http://p.sf.net/sfu/Challenge
_______________________________________________
Geotools-gt2-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users

Reply via email to