Re: Apply a shapefile to raster images in IDL [message #41260 is a reply to message #41255] |
Mon, 04 October 2004 13:17   |
Kelly Dean
Messages: 92 Registered: March 1997
|
Member |
|
|
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
|
|
|