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

Home » Public Forums » archive » Overlay images from WMS servers (web mapping servers) on map projections
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Overlay images from WMS servers (web mapping servers) on map projections [message #47435] Wed, 08 February 2006 06:01 Go to previous message
Jan Kristian Jensen is currently offline  Jan Kristian Jensen
Messages: 10
Registered: February 2006
Junior Member
I thought I had a brilliant idea of how to combine images from WMS
servers (OGC Web Mapping Services compliant servers) on map projections
using map_set or map_proj_init functions. The result is not by far good
enough - and I can't figure what's wrong.


First I use my favourite http client to send a OGC WMS getMap-request to
my favourite WMS server. Part of the URL is a boundingbox (BBox)
parameter containing coordinates for lower left and upper right corner,
and how many x-y pixels there should be. Further the projection must be
specified. An easy test case would be the equirectangular projection, or
EPSG:4623 in OGC speak.


Then the easiest thing would be to open a window with the exact same
size, call map_set with the appropriate projection and display the
image. Something like this:

--- Example - you have to provide the wms file yourself ... -

; Limit = boundingBox coordinates to WMS server
limit = [ 59.5, 3.5, 61.0, 5.2]
map_set, 0, 0, /cylindrical, xmargin = 0, ymargin = 0, limit = limit


wmsimage = read_png( filename, r, g, b)
tvlct, r, g, b
window, xsize = 1200, ysize = 1000
tv, wmsimage

; Add a nice grid
device, decomposed = 0
tek_color
map_Grid, latdel = 0.25, londel = 0.25, color = 2

-------------------------------


My wmsimage example displays the coast contour and a grid line for every
0.25 degree lat/lon. This to compare with the lines from map_grid. The
two set of grid lines are fairly close in the center of the image, but
off by up to 1.9 km at the egde of the image. It is _/*very*\_ apparent
that the wms image and the map_grid lines do not match at all exept for
a small area near the center of the image.


I may have misunderstand something about projections and/or how to set
them correctly: I think equirectangular = EPSG:4326 = cylindrical
projection with standard parallell at 0 degrees, which should be the
default projection for map_set.


The symmetry about the image center makes me suspect there is some
border issue here. If I don't use the xmargin or ymargin keywords (or
/noborder) I get an even larger error. I can thank this newsgroup for
figuring that out :)


I'm quite frustrated at the moment: The result of the above method is
NOT good enough. I can't bring my mind to accept that this method
shouldn't work - but it doesn't, and I can't figure out why....



I know you can use map_projection_init and map_projection forward to get
more fine granular control - but that really shouldn't be nescessary
with this feeble task!!! If so, Ben Tupper posted an example (Nov 15
2004) of how to do this with direct graphics. I may start there...




Cheers, Jan
--
Jan Kristian Jensen

Remove the obvious from the email adress to email me.
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: .full_reset_session causing a seg fault
Next Topic: How to use ROI on a DEM ?

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

Current Time: Thu Oct 09 21:36:34 PDT 2025

Total time taken to generate the page: 1.60112 seconds