Re: map_image edge distortion [message #63529] |
Wed, 12 November 2008 05:43 |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
mankoff writes:
> Thank you, that definitely helps. But now there is a 1 pixel border on
> the left edge only. Am I missing a /I_REALLY_MEAN_IT_NO_BORDER
> keyword?
I think you forgot to make your window one pixel wider than
you need it. ;-)
Cheers,
David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
|
|
|
Re: map_image edge distortion [message #63531 is a reply to message #63529] |
Wed, 12 November 2008 05:37  |
mankoff
Messages: 131 Registered: March 2004
|
Senior Member |
|
|
On Nov 11, 10:19 pm, David Fanning <n...@dfanning.com> wrote:
> mankoff writes:
>> I'm confused by few simple commands. I'm trying to produce a basic map
>> (for cutting up and putting into Google Maps). It needs to be mercator
>> projection, square, and some multiple of 256x256. I thought the
>> following code might do it:
>
>> data = randomu(foo,64,64)
>> window, 0, xsize=256,
>> ysize=256
>> map_set, 0, 0, /mercator, position=[0,0,1,1]
>> img = map_image( data, xx, yy, xs, ys, /compress )
>> img = bytscl( img )
>> tv, img, xx, yy, XSIZE=xs, YSIZE=ys
>> img = tvrd()
>> write_png, 'map.png', img, r,g,b
>
>> But the resulting PNG has sidebars for some reason. What am I doing
>> wrong?
>
> I think you need to add a NOBORDER keyword to your MAP_SET
> command.
>
Thank you, that definitely helps. But now there is a 1 pixel border on
the left edge only. Am I missing a /I_REALLY_MEAN_IT_NO_BORDER
keyword?
-k.
|
|
|
Re: map_image edge distortion [message #63542 is a reply to message #63531] |
Tue, 11 November 2008 19:19  |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
mankoff writes:
> I'm confused by few simple commands. I'm trying to produce a basic map
> (for cutting up and putting into Google Maps). It needs to be mercator
> projection, square, and some multiple of 256x256. I thought the
> following code might do it:
>
> data = randomu(foo,64,64)
> window, 0, xsize=256,
> ysize=256
> map_set, 0, 0, /mercator, position=[0,0,1,1]
> img = map_image( data, xx, yy, xs, ys, /compress )
> img = bytscl( img )
> tv, img, xx, yy, XSIZE=xs, YSIZE=ys
> img = tvrd()
> write_png, 'map.png', img, r,g,b
>
> But the resulting PNG has sidebars for some reason. What am I doing
> wrong?
I think you need to add a NOBORDER keyword to your MAP_SET
command.
Cheers,
David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
|
|
|