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

Home » Public Forums » archive » Fitting a map to an image
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Fitting a map to an image [message #31023] Thu, 06 June 2002 13:59 Go to previous message
Sean Raffuse is currently offline  Sean Raffuse
Messages: 46
Registered: July 2001
Member
Hello.

I have an image of known size and flat geocoordinates. I want to overlay
the US states vector in a display window on top of the image. My problem is
that I cannot get the two to match up properly. There seems to be a border
on the vector, but the image draws to the edge of the window. I tried using
the noborder keyword on my call to map_set and also tried setting the !x and
!y margins to zero. No luck. Can you help? Here is the relevant code. . .


;set margins to zero
x_margin = !x.margin
y_margin = !y.margin
!x.margin = [0,0]
!y.margin = [0,0]

;write output to screen
Device, decomposed=0
image = reverse(InArray1, 2)
LoadCT, 40
scaledImage = bytscl(image, Min=0, Max=0.5, Top=255)
window, 0, xsize=nscans, ysize=nlines
TV, scaledImage

;setup the map
xspan = pixelsize*nscans
yspan = pixelsize*nlines
upperleftlat = mc[3]
upperleftlon = mc[2]
lowerlat = upperleftlat - yspan
rightlon = upperleftlon + xspan
map_set, limit=[lowerlat,upperleftlon,upperleftlat,rightlon], /noborder,
/noerase
map_continents, /usa, color = 254, mlinethick=2

;write to jpeg
image = tvread(filename=out_name, /JPEG, /nodialog, Quality=100)


***thanks to David Fanning for the tvread procedure***


-Sean Raffuse
[Message index]
 
Read Message
Read Message
Read Message
Previous Topic: sec : U Re: Fitting a map to an image
Next Topic: HELP:: call_external/ c errors

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

Current Time: Wed Oct 08 18:35:13 PDT 2025

Total time taken to generate the page: 0.00369 seconds