Re: Apply a shapefile to raster images in IDL [message #41342 is a reply to message #41260] |
Tue, 05 October 2004 18:49  |
envi35
Messages: 8 Registered: October 2004
|
Junior Member |
|
|
Hi Kelly,
Thanks for your suggestion. I'd like to try it. But my polar
stereographic grid is a special one. Can I set parameters such as the
origin of the projection and the grid size (resolution) with map_set
in IDL? Sorry, I've looked the online help of map_set in IDL, but I'm
still not sure. Are P0lat and P0lon in map_set the origin of the
projection?
Many thanks, Jenny
Kelly Dean <krdean@lamar.colostate.edu> wrote in message news:<4161afcf@news.ColoState.EDU>...
> It certainly can be done, but as David has pointed out, it is not
> trivial. The IDL shapefile read routine requires knowledge of IDL's Objects.
>
> I use shapefiles to add the graphics to satellite imagery using IDL's
> shapefile read routines. See my image contribution to RSI's User
> Contributions at www.rsinc.com. I use the county.shp to add the Colorado
> county boundaries to the AVHHR imagery centered over Colorado.
>
> To avoid the shapefile issue, I suggestion you use ArcView (or ArcGIS)
> and save the shapefile as an Excel spread sheet. Then within Excel, save
> the columns of latitude and longitude values as a text file and use the
> IDL's OPEN/READ routines to read the text file and save the values in
> separate latitude and longitude arrays. Then use the IDL's MAP_COORD
> routine to convert the latitude and longitude values to window
> coordinates, assuming the polar stereographic grid you desire is the
> same as IDL's MAP_SET, /Stereo --- just a suggestion. However, learning
> to read shapefiles directly with the IDL objects is the best and long
> term why to go. The opportunities are endless.
>
> Kelly Dean
> Colorado State University
> Fort Collins, Colorado
>
> Jenny wrote:
>> Dear Listers,
>> I'm a novice in IDL, not sure if my questions are totally improper. I
>> want to use an Arcview format shapefile as a mask, to a huge number of
>> raster images, which are in a polar stereographic grid format with
>> separate image data files and lat/lon files. I would really appreciate
>> if you could give me any hint about the following questions:
>>
>> 1. How to read the shapefile into an IDL variable?
>> 2. How to tailor the shapefile to my raster image grid?
>> 3. If the above questions are not proper or impossible in IDL, would
>> you give me some suggestions to do the work?
>>
>> Thank you in advance,
>> Jenny
|
|
|