[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

SV: 20060110: Gempak - gdplot2 and mapserver projections



Hi again,

One easy way to test that mapservers opinion about 'ced'-projection is the same 
as yours is to compare the projected result of a location:

I tested with long=19 deg, lat=58 deg and got the result (a la mapserver) 
(2115070.32507220, 6456530.46600987). Is that the same you would get with 'ced' 
?

Regards Bengt

-----Ursprungligt meddelande-----
Från: Unidata Support [mailto:address@hidden]
Skickat: den 11 januari 2006 21:03
Till: Nilsson Bengt
Kopia: address@hidden
Ämne: 20060110: Gempak - gdplot2 and mapserver projections 



Bengt,

The CED in GEMPAK is a constant lat/lon. When you specify the
margins to be 0, eg:
PROJ     = ced//0;0;0;0
the plotted area will have no extraneous space, if your window size
and GAREA have the same dimensions.

For example,
DEVICE   = xw||900;700
GAREA    = 45;-125;52;-116
or
DEVICE   = gf|outfile.gif|900;700

The display window has a ratio of 9 to 7, and the garea in
the above is 9 degrees wide and 7 degrees tall.

You can specify the LATLON parameter, such as:
LATLON   = 1/1/1/1;1/.2;.2
to verify that your specified garea corners are the corner of your display 
window.

If your garea and device regions have different ratios, then the output display 
will
have space filling one direction. The margins are extra space for titles and 
axes
in addition to the space needed to maintain a constant aspect ratio.

Steve Chiswell
Unidata User Support


>From: "Bengt Nilsson" <address@hidden>
>Organization: UCAR/Unidata
>Keywords: 200601101057.k0AAv931004748

>Institution: AerotechTelub
>Package Version: GEMPAK5.9.1
>Operating System: Linux (Novell OES 9)
>Hardware Information: HP proliant DL380 G4
>Inquiry: Hi,
>
>I\'m using GEMPAK5.9.1 and am trying to integrate gdplot2 images and mapserver
> .
>
>All other layers in (WMS)mapserver are using EPSG:4326. When I try to overlay 
> an gdplot2 image produced with the CED-projection (without margins) the gdplo
> t image doesn\'t align perfectly. It\'s a litte bit (fractions of degrees) of
> f, both in x- and y-direction (to the north-east).
>
>I guess that the problem is that the CED-projection used in gdplot2 is not exa
> ctly the same as in mapserver.
>
>In mapserver (as to the WMS-standard) the procedure to make a standard project
> ion is as follows:
>
>\"7.3.5 Projection of geographic CRSs into Map CS
>When the CRS parameter specifies a geographic coordinate reference system (suc
> h as CRS:84 or
>EPSG:4326), the spatial data is internally projected using the Pseudo Plate Ca
> rrée coordinate operation
>method and thereafter transformed to an image coordinate reference system with
>  the i axis parallel and
>proportional to longitude and the j axis parallel and proportional to latitude
>  to enable direct screen rendering.
>Because increments of latitude and longitude are both not consistent in linear
>  terms, the image axes are then
>of variable scale. The geographic information is projected during the portraya
> l operation using a modified
>equidistant cylindrical projection as follows:
>
>. The minimum and maximum values of longitude and latitude requested (min_lon,
>  min_lat, max_lon,
>max_lat) are determined from the BBOX parameter, taking into account the X and
>  Y axis order specified by the CRS parameter.
>
>. The angular distance (max_lon - min_lon) in degrees is scaled to the number 
> of pixels specified by the WIDTH parameter.
>
>. The angular distance (max_lat - min_lat) in degrees is scaled to the number 
> of pixels specified by the HEIGHT parameter.
>
>. The map is produced with longitude parallel to the i axis and latitude paral
> lel to the j axis.
>\"
>
>How does that fit into the CED projection? Is there a way, via gdplot2 paramet
> ers, to make them align?
>
>Regards Bengt
>
>Ps. It would have been nice if this could work since I\'ve seen that there are
>  many people out there who wants to integrate gridded data into mapserver.
>
>
>
--
**************************************************************************** <
Unidata User Support                                    UCAR Unidata Program <
(303)497-8643                                                  P.O. Box 3000 <
address@hidden                                   Boulder, CO 80307 <
---------------------------------------------------------------------------- <
Unidata WWW Service              http://my.unidata.ucar.edu/content/support  <
---------------------------------------------------------------------------- <
NOTE: All email exchanges with Unidata User Support are recorded in the
Unidata inquiry tracking system and then made publicly available
through the web.  If you do not want to have your interactions made
available in this way, you must let us know in each email you send to us.