This archive contains answers to questions sent to Unidata support through mid-2025. Note that the archive is no longer being updated. We provide the archive for reference; many of the answers presented here remain technically correct, even if somewhat outdated. For the most up-to-date information on the use of NSF Unidata software and data services, please consult the Software Documentation first.
Hi, Thanks for your prompt answer! In my experiments I use the same ratio in display and 'gaera', without margins. I think that the problem lies in the reprojection from your 'ced' to the mapserver 'epsg:4326' projection. The EPSG code 4326 means : "Not really a projection, but the graphical figure obtained by plotting latitude and longitude degree coordinates as if they were Y and X coordinates. The default "unprojection," it is also known as the geographical latitude / longitude projection. Scale True in degrees along the Equator or vertically along any meridian. Distortion Considerable distortion away from the Equator due to horizontal increase in longitude degrees. " When doing the reprojection from 'ced' to 'epsg:4326' I assume that 'ced' is the same as 'equidistant cylindrical' defined by the proj4 parameters '+proj=eqc +lat_ts=0 +lon_0=0 +x_0=0 +y_0=0 +ellps=WGS84, that is epsg:9823. Maybe that is not the exact definition of your '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.