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

Home » Public Forums » archive » Re: Coastal boundaries over sat data
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: Coastal boundaries over sat data [message #21199] Thu, 17 August 2000 00:00
Ben Marriage is currently offline  Ben Marriage
Messages: 12
Registered: June 1999
Junior Member
Daniel Peduzzi wrote:
>

> Thanks...that is a handy program, and I've used it before in the past.
> I'm not sure that it can be used for what I want to do, though, since
> I don't want to remap the data...only display it in its *native*
> projection with coastal boundaries.
>
> In other words, if I have 1000 scanlines of DMSP data (1465 elements
> wide), and accompanying 1465x1000 lat/lon arrays, I'd like to display
> a 1465x1000 image overlaid with coastlines.

I did something like this to check if an AVHRR pixel was over land or
not.
I'll post the code here in case you are interested. I had to create an
image which consisted of 0s and 1s corresponding to sea and land. I did
this from IDL using map_set and map_continents (filling it as color=1),
then tvrd() and saving into a format handy format (in this case, idl
save format) You could try doing it without filling, just keeping the
continent outline in a file. I then have to restore this file each time
I need to check for land. This is fairly resolution dependent, but works
OK for me (AVHRR data around Antarctica).

It's a rather quick and dirty method - but *it works for me*(TM)

Ben
;=========================================================== ================
function landmaskcheck, lats, longs

; land_mask.idl is an image which has a 0 over the sea and a 1 over
; land. This was produced from a 2048x2048 window and using the
; map_set and map_continents procedures to define areas of land and sea.
; Then, using the convert_coord function we convert latitudes and
; longitudes to land mask subscripts to determine if that pixel is over
; land.

sizeimg = size(lats)

; this file contains 0s and 1s corresponding to sea/land.
; restoring this file creates an IDL variable called MASK

restore,file='~/cloudcl/data/land_mask.idl'

; open up a new window

oldwin = !D.window
window,xs = 2048,ys=2048,/pix,/free
newwin = !d.window

; setup the map reprojection used to create the land mask file initially

map_set,-90,0,0,/ster,/noborder,xmarg=0,ymarg=0,limit=[-30,- 90,-45,0,-80,90,-55,-135],/iso

; convert the input image longitudes and latitudes to device coordinates
in
; the new reprojection

sub = convert_coord(longs,lats,/data,/to_device)

; squish them to the right size

xsub = reform(sub[0,*],sizeimg[1],sizeimg[2])
ysub = reform(sub[1,*],sizeimg[1],sizeimg[2])

; this bit produces an image (same size as the input) which contains a 1
over
; land and a 0 over the ocean

flag = mask[xsub,ysub]

wdelete,newwin
wset,oldwin

return,flag

end
;=========================================================== =================
Re: Coastal boundaries over sat data [message #21202 is a reply to message #21199] Thu, 17 August 2000 00:00 Go to previous message
Dennis J. Boccippio is currently offline  Dennis J. Boccippio
Messages: 6
Registered: July 2000
Junior Member
In article <01Cm5.7423$pu4.591038@typhoon.ne.mediaone.net>, "Daniel
Peduzzi" <peduzzi@mediaone.net> wrote:

> I have some satellite imagery in its native projection (DMSP,
> GOES, Meteosat, and GMS) with accompanying latitude/longitude
> pairs for each pixel. I'd like to display these images in their
> native projections using 0-100% grayshades, but overlayed with
> coastal boundaries in some non-grayshade color.
>
> Is this possible using the standard map routines available in
> V5.2? I've found plenty of ways to draw boundaries over data
> which have been remapped to some other projection, but not in
> the raw satellite projection.
>
> Alternatively, does somebody have a routine to do this?
>
> ------------------------------------------
> Dan Peduzzi
> peduzzi@mediaone.net
> ------------------------------------------
>

Sounds like a job for an external coastline database and either POLYFILL
or the /CONTINUE option of PLOTS? ... after all, you have the lat/lon
pairs for each pixel... (sorry, I don't have my manual handy...)
Re: Coastal boundaries over sat data [message #21203 is a reply to message #21199] Thu, 17 August 2000 00:00 Go to previous message
Lars[1] is currently offline  Lars[1]
Messages: 1
Registered: August 2000
Junior Member
Daniel Peduzzi wrote:
>
> Thanks...that is a handy program, and I've used it before in the past.
> I'm not sure that it can be used for what I want to do, though, since
> I don't want to remap the data...only display it in its *native*
> projection with coastal boundaries.
>
> In other words, if I have 1000 scanlines of DMSP data (1465 elements
> wide), and accompanying 1465x1000 lat/lon arrays, I'd like to display
> a 1465x1000 image overlaid with coastlines.
>
> Did I miss something?

I think the DMSP *native* projection is not so simple as a
standard projection (e.g. polar stereographic) due to its
conical scan geometrie.
But you could solve your problem by
I. gridding the data ;-)
or
II. take a coastline data set as (lat1,lon1) pairs and search
in the DMSP data set the (lat1,lon1) pairs with the smallest
distance d=(lat1-lat2)^2+(lon1-lon2)^2. Then you have found the
pixels, which belong to the coastline.


Regards,
Lars
-------------
www.seaice.de
Re: Coastal boundaries over sat data [message #21221 is a reply to message #21199] Wed, 16 August 2000 00:00 Go to previous message
Liam E. Gumley is currently offline  Liam E. Gumley
Messages: 378
Registered: January 2000
Senior Member
Daniel Peduzzi wrote:
>
> Paul van Delst wrote in message <399AF599.44D0AC5A@ncep.noaa.gov>...
>> Daniel Peduzzi wrote:
>>>
>>> I have some satellite imagery in its native projection (DMSP,
>>> GOES, Meteosat, and GMS) with accompanying latitude/longitude
>>> pairs for each pixel. I'd like to display these images in their
>>> native projections using 0-100% grayshades, but overlayed with
>>> coastal boundaries in some non-grayshade color.
>>>
>>> Is this possible using the standard map routines available in
>>> V5.2? I've found plenty of ways to draw boundaries over data
>>> which have been remapped to some other projection, but not in
>>> the raw satellite projection.
>>>
>>> Alternatively, does somebody have a routine to do this?
>>>
>> checkout Gumley's IMAGEMAP program:
>>
>> http://cimss.ssec.wisc.edu/~gumley/imagemap.html
>>
>> I have used for exactly what you describe.
>>
>
> Thanks...that is a handy program, and I've used it before in the past.
> I'm not sure that it can be used for what I want to do, though, since
> I don't want to remap the data...only display it in its *native*
> projection with coastal boundaries.
>
> In other words, if I have 1000 scanlines of DMSP data (1465 elements
> wide), and accompanying 1465x1000 lat/lon arrays, I'd like to display
> a 1465x1000 image overlaid with coastlines.
>
> Did I miss something?

You are correct: IMAGEMAP will not solve the problem you pose. It is
possible that you could get MAP_SET to produce a map projection which
corresponds to a geostationary satellite image (e.g. GOES, Meteosat,
GMS). However MAP_SET won't work for DMSP or other polar orbiters, since
as far as MAP_SET is concerned the map projection in this case changes
at every point along the satellite ground track.

There is nothing built-in to IDL to solve this problem. Unless someone
responds with custom code, you'll have to invent your own. I'd sure like
to see code to solve this problem.

Cheers,
Liam.
http://cimss.ssec.wisc.edu/~gumley
Re: Coastal boundaries over sat data [message #21222 is a reply to message #21221] Wed, 16 August 2000 00:00 Go to previous message
Daniel Peduzzi is currently offline  Daniel Peduzzi
Messages: 29
Registered: June 1999
Junior Member
Paul van Delst wrote in message <399AF599.44D0AC5A@ncep.noaa.gov>...
> Daniel Peduzzi wrote:
>>
>> I have some satellite imagery in its native projection (DMSP,
>> GOES, Meteosat, and GMS) with accompanying latitude/longitude
>> pairs for each pixel. I'd like to display these images in their
>> native projections using 0-100% grayshades, but overlayed with
>> coastal boundaries in some non-grayshade color.
>>
>> Is this possible using the standard map routines available in
>> V5.2? I've found plenty of ways to draw boundaries over data
>> which have been remapped to some other projection, but not in
>> the raw satellite projection.
>>
>> Alternatively, does somebody have a routine to do this?
>>
> checkout Gumley's IMAGEMAP program:
>
> http://cimss.ssec.wisc.edu/~gumley/imagemap.html
>
> I have used for exactly what you describe.
>


Thanks...that is a handy program, and I've used it before in the past.
I'm not sure that it can be used for what I want to do, though, since
I don't want to remap the data...only display it in its *native*
projection with coastal boundaries.

In other words, if I have 1000 scanlines of DMSP data (1465 elements
wide), and accompanying 1465x1000 lat/lon arrays, I'd like to display
a 1465x1000 image overlaid with coastlines.

Did I miss something?

------------------------------------------
Dan Peduzzi
peduzzi@mediaone.net
------------------------------------------
Re: Coastal boundaries over sat data [message #21223 is a reply to message #21221] Wed, 16 August 2000 00:00 Go to previous message
Paul van Delst is currently offline  Paul van Delst
Messages: 364
Registered: March 1997
Senior Member
Daniel Peduzzi wrote:
>
> I have some satellite imagery in its native projection (DMSP,
> GOES, Meteosat, and GMS) with accompanying latitude/longitude
> pairs for each pixel. I'd like to display these images in their
> native projections using 0-100% grayshades, but overlayed with
> coastal boundaries in some non-grayshade color.
>
> Is this possible using the standard map routines available in
> V5.2? I've found plenty of ways to draw boundaries over data
> which have been remapped to some other projection, but not in
> the raw satellite projection.
>
> Alternatively, does somebody have a routine to do this?
>
checkout Gumley's IMAGEMAP program:

http://cimss.ssec.wisc.edu/~gumley/imagemap.html

I have used for exactly what you describe.

paulv

p.s. Pretty
--
Paul van Delst Ph: (301) 763-8000 x7274
CIMSS @ NOAA/NCEP Fax: (301) 763-8545
Rm.202, 5200 Auth Rd. Email: pvandelst@ncep.noaa.gov
Camp Springs MD 20746
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: wset equivalent in obj graphics?
Next Topic: Re: Reverse interpolation?

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

Current Time: Wed Oct 08 15:47:47 PDT 2025

Total time taken to generate the page: 0.16009 seconds