comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: Geotiff coor
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Re: Geotiff coor [message #56339] Fri, 19 October 2007 03:54 Go to next message
devin.white is currently offline  devin.white
Messages: 50
Registered: March 2007
Member
The easiest thing to do, since you have access to ENVI, would be to
use the RESIZE_DOIT procedure. It will generate an ENVI format
version of your data with the correct map information, which you can
then send to a GeoTIFF using ENVI_OUTPUT_TO_EXTERNAL_FORMAT.



On Oct 18, 7:30 am, krasto...@gmail.com wrote:
> Hello everybody out there,
>
> here's a question on writing a geotiff with envi-idl
> I've resized a geotiff in smaller parts and saved them.
> My problems is how to get the correct cordinates on the new files.
> I get the new image with envi_get_data setting the /DIM as i need it.
>
> My code:
>
> ; try to get the geotiff structure from the original file for the
> resized image
> ;using x and y as center of a square image (801x801) that I have to
> cut
>
> width=801
> height=801
> result=read_tiff(filename, SUB_RECT=[x-400, y+400, width, height],
> geotiff=variable)
>
> ;write the new geotiff resized
>
> write_tiff, newname, imgdata, geotiff=variable, /short
>
> IDl write me a file with the right coor system but with wrong
> coordinates.
> Using sub_rect didn' help to get the coord i need..
> Have you any suggestion?
>
> Cheers
>
> Lo
Re: Geotiff coor [message #56342 is a reply to message #56339] Thu, 18 October 2007 21:50 Go to previous messageGo to next message
fanxing_gis is currently offline  fanxing_gis
Messages: 8
Registered: August 2007
Junior Member
On 10 18 , 7 30 , krasto...@gmail.com wrote:
> Hello everybody out there,
>
> here's a question on writing a geotiff with envi-idl
> I've resized a geotiff in smaller parts and saved them.
> My problems is how to get the correct cordinates on the new files.
> I get the new image with envi_get_data setting the /DIM as i need it.
>
> My code:
>
> ; try to get the geotiff structure from the original file for the
> resized image
> ;using x and y as center of a square image (801x801) that I have to
> cut
>
> width=801
> height=801
> result=read_tiff(filename, SUB_RECT=[x-400, y+400, width, height],
> geotiff=variable)
>
> ;write the new geotiff resized
>
> write_tiff, newname, imgdata, geotiff=variable, /short
>
> IDl write me a file with the right coor system but with wrong
> coordinates.
> Using sub_rect didn' help to get the coord i need..
> Have you any suggestion?
>
> Cheers
>
> Lo

what is the x and y value? geographical coordinates or row/column
value?
Re: Geotiff coor [message #56403 is a reply to message #56339] Tue, 23 October 2007 02:29 Go to previous message
krastoboy is currently offline  krastoboy
Messages: 8
Registered: October 2007
Junior Member
On 19 Ott, 12:54, "devin.wh...@gmail.com" <devin.wh...@gmail.com>
wrote:
> The easiest thing to do, since you have access to ENVI, would be to
> use the RESIZE_DOIT procedure. It will generate an ENVI format
> version of your data with the correct map information, which you can
> then send to a GeoTIFF using ENVI_OUTPUT_TO_EXTERNAL_FORMAT.
>
> On Oct 18, 7:30 am, krasto...@gmail.com wrote:
>
>> Hello everybody out there,
>
>> here's a question on writing a geotiff with envi-idl
>> I've resized a geotiff in smaller parts and saved them.
>> My problems is how to get the correct cordinates on the new files.
>> I get the new image with envi_get_data setting the /DIM as i need it.
>
>> My code:
>
>> ; try to get the geotiff structure from the original file for the
>> resized image
>> ;using x and y as center of a square image (801x801) that I have to
>> cut
>
>> width=801
>> height=801
>> result=read_tiff(filename, SUB_RECT=[x-400, y+400, width, height],
>> geotiff=variable)
>
>> ;write the new geotiff resized
>
>> write_tiff, newname, imgdata, geotiff=variable, /short
>
>> IDl write me a file with the right coor system but with wrong
>> coordinates.
>> Using sub_rect didn' help to get the coord i need..
>> Have you any suggestion?
>
>> Cheers
>
>> Lo

Thanks everybody,
at the end I was working with the metadata of the whole original image
e not with the metadata of the cutted one.
I had to enter the gortiff structure and set the new coordinates from
there.

Cheers
Lorenzo
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: how to generate latitude/longtitude image from projected image?
Next Topic: Re: Lonlat2reg.pro vs. Grid program

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Thu Oct 09 07:54:35 PDT 2025

Total time taken to generate the page: 0.08069 seconds