[Proj] Have LCC center terms, need PROJ.4 terms

Hamish hamish_b at yahoo.com
Tue Feb 11 15:33:56 PST 2014


schrieb Hamish:
> > I'm working with some weather model (WRF) output and I'll like to
> > import the results into proj4-aware software (gdal or grass gis).
> >
> > The LCC model domain specification takes center of region lat/lon as
> > input, not +lat_0, +lon_0. The values I've been given for +lat_1 and
> > +lat_2 are equal, and near to +lon_0. That doesn't look quite
> > right but the model seems happy enough with it:
> >
> > the values I was given:
> >
> > CEN_LAT = 40.26405f ;
> > CEN_LON = -76.99222f ;
> > TRULAT1 = 39.338f ;
> > TRUELAT2 = 39.338f ;
> > MOAD_CEN_LAT = 39.33799f ;
> > STAND_LON = -84.f ;

André wrote:
> I guess that should be a LCC 1SP projection with these parameters:
> +proj=lcc +lat_1=39.338 +lat_0=39.338 +lon_0=-84 +k_0=1 +x_0=0 +y_0=0 
> +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs

Thanks, unfortunately I tried that & it's nowhere close.


> > This trial and error gets me to within about 5% (see attached)
[ http://muck.otago.ac.nz/~hamish/sbss/lcc_grid_mismatch.png ]

> From the image it is hard to tell what grid line should be right or 
> wrong.

Sorry, I should have explained that: the black lines are the native
grid (contour lines created from the lat/lon raster grid values), and
the grey is an overlay of what my best-guess projection terms produce.

With a bit more trial and error using 1SP I've now got it matching a
little better, but it's not really satisfying to have to fudge it with
an random guess.

revised trial and error:
  http://muck.otago.ac.nz/~hamish/sbss/lcc_grid_mismatch2.png

-PROJ_INFO-------------------------------------------------
name       : Lambert Conformal Conic
proj       : lcc
a          : 6371229.000
es         : 0.0
f          : 0.0
lat_1      : 40
lat_0      : 33.05
lon_0      : -84.0
x_0        : 235000
y_0        : 0.000
-PROJ_UNITS------------------------------------------------
unit       : meter
units      : meters
meters     : 1.0

GRASS> g.region -gcl | grep center
center_long=-77.00767527
center_lat=39.85944826

but I'd really like to find the mathematical/code relationship between
the setup values I was given and what comes out the other end. Based
on other output grids I'm pretty happy that the lat/lon values in the
grids are ok, and it's the provided lcc terms which are the problem.


> For lon_0=-84, the 84W should be exactly vertical.

With +lon_0=-84 I need to set +x_0=235000 (or thereabouts) in order to
get the 84W meridian to be vertical; with +x_0 it is vertical at the
very left of the grid which according to the longitude grid values is
-87.018799. (the grid is 138x138 so I'm wildly guessing cell-center
registered not grid-conflence registered)

.. but +lon_0=-84 && +x_0=0 doesn't do it. I'd be surprised if the code
used a false easting, so I suspect the +lon_0 value really isn't 84W.
(and it's just on a sphere --nothing fancy, so I'd also be surprised
if there was any rotation or scaling going on Janne)


> Can you share sample coordinates?

sure, but I only have the grid and the lat/lon equivalents of the grid
and the angle-to-true-north grid data to go by, I don't have known-good
projected coordinates to test against beyond the center-lat/lon which
I can calculate. The x,y resolution "should" be 12000m, so the north,
east bounds in the following ascii grids are simply based on that
times the number of rows,cols (138x138):

  http://muck.otago.ac.nz/~hamish/sbss/xlat.txt.bz2
  http://muck.otago.ac.nz/~hamish/sbss/xlong.txt.bz2



thanks,
Hamish




More information about the Proj mailing list