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

Home » Public Forums » archive » Re: image cut by a shapefile
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: image cut by a shapefile [message #56189 is a reply to message #56186] Tue, 16 October 2007 09:42 Go to previous messageGo to previous message
Jean H. is currently offline  Jean H.
Messages: 472
Registered: July 2006
Senior Member
krastoboy@gmail.com wrote:

> Dear all,
> I'm a novice in IDL, not sure if my questions are totally improper.
> 1_I got a shape file made by some points.
> 2_I would like to cut an image (geotiff) in smoller (ex: 1000X1000
> pixeles) parts.
> 3_Each point of the shape file should be the center the new images.
>
> I don't know how figure it out.
> Consider that I wuold like to find an automatic way: I have to work on
> a set of different geotiff images, each one related to a different
> shape file.
>
> Thank you in advance,
> Lorenzo


This week favorite function is undoubtly envi_convert_file_coordinates,
if you have access to Envi!

1)open your shape file
2)get the coordinates (let's say, lat-long) of each point in an array
3)open your image to gets its FID
4)call envi_convert_file_coordinates, fid, X,Y, lat,long (with NO
keyword), which will change your lat-long to the corresponding pixel
row and column on your image
5) subset your image smallImage = image[X-1000:X+1000; Y-1000:Y+1000]

Jean
[Message index]
 
Read Message
Read Message
Read Message
Previous Topic: Question about Plots
Next Topic: stregex - lookaround operators?

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

Current Time: Fri Oct 10 03:08:17 PDT 2025

Total time taken to generate the page: 0.00542 seconds