# Lambert projection with one or two standard parallels and proj4

I'm sure there is a gap in my understanding, but I haven't been able to identify where it is, nor how to fill it. My issue is this:

• I'm transforming lon lat coordinates into a lambert conformal conic projection.

• The lambert projection uses a single standard parallel 46.244 and the central meridian is 17.0. And it's on a spherical ellipsoid, but that's not particularly relevant here. I am using packages that use the proj4 library.

• I test the transformation using linux tool cs2cs as follows:

echo "15.220483 48.437298" | cs2cs +proj=lonlat +to +proj=lcc
+lat_1=46.244 +lat_0=46.244 +lon_0=17. +a=6367470 +b=6367470 +ellps=sphere +datum=WGS84

-131346.80 245318.16

• I also understand that the one-standard parallel form is the same as the two-standard parallel form if the two standard parallels are the same. It is more convenient for me to give all parallels in my scripts. So I also test with:

echo "15.220483 48.437298" | cs2cs +proj=lonlat +to +proj=lcc +lat_1=46.244 +lat_2=46.244 +lat_0=46.244 +lon_0=17. +a=6367470 +b=6367470 +ellps=sphere +datum=WGS84

-131290.66 245281.34

yet I get different results. Any ideas as to why?

And at very least, which should I use?

## 2 Answers

A good point made by Rene W.

Here is the answer:

add +no_defs to your first example in order to avoid unwanted default values

about this part: +a=6367470 +b=6367470 +ellps=sphere +datum=WGS84 +datum=WGS84 is a shorthand for: +ellps=WGS84 +towgs84=0,0,0.

You already have +ellps=sphere. Your reference surface cannot be a shpere and the WGS84 ellipsoid at the same time. As you already have +a=6367470 and +b=6367470, you should drop both +ellps=sphere and +datum=WGS84`

in case of doubts, use cs2cs -v for more info about which parameters are actually takes, and which are ignored

Hermann

and

The default values of lat_1 and lat_2 are 33 and 45, so in your first example you had +lat_1=46.244 +lat_2=45 which is not what you intended. The second example does what you wanted.

Charles

The answer is here!

many thanks to the responders on the proj mailing list.

• Don't just post a link as links may break. Please include at least the core of the solution in the answer and the link can point people onward for further reading, extra's, etc. That way future visitors can always see the actual answer even if the target site is down. Commented Apr 25, 2013 at 14:08