Conversion between LCC_1SP and LCC_2SP

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Conversion between LCC_1SP and LCC_2SP

Even Rouault-2

Hi,

 

This is just for your information, in case others bang their heads as I did.

I wanted to write a dataset with a SRS expressed in Lambert Conformal Conic 1SP (LCC_1SP)

but the target file format (MapInfo .mif/.tab) only supports LCC_2SP apparently

 

The EPSG guidance( and Snyder ) mentions:

"""From the one standard parallel and its scale factor it is possible to

derive the equivalent two standard parallels and then treat the projection

as a two standard parallel Lambert conical conformal, but this

procedure is seldom adopted.""""

 

Obviously, the proof was left as an exercice to the readers. So did I, as

I couldn't find existing implementations.

 

You can find the result here:

https://github.com/OSGeo/gdal/blob/e3f1db90d60968dd5a1b6618cfc4b1dfa1ea3521/gdal/ogr/ogrspatialreference.cpp#L7241

 

This requires an iterative method to solve StdParallel1 and StdParallel2.

 

So for example EPSG:27584

'+proj=lcc +lat_1=42.165 +lat_0=42.165 +lon_0=0 +k_0=0.99994471

+x_0=234.358 +y_0=4185861.369 +a=6378249.2 +b=6356515 +towgs84=-168,-60,320,0,0,0,0

+pm=paris +units=m +no_defs'

 

is equivalent to

'+proj=lcc +lat_1=42.76766346938247 +lat_2=41.56038784121728 +lat_0=42.165

+lon_0=0 +x_0=234.358 +y_0=4185861.369 +a=6378249.2 +b=6356515 +towgs84=-168,-60,320,0,0,0,0

+pm=paris +units=m +no_defs '

 

And the reverse (LCC_2SP -> LCC_1SP) also works ( requires modifying the false

northing in the general case ):

https://github.com/OSGeo/gdal/blob/e3f1db90d60968dd5a1b6618cfc4b1dfa1ea3521/gdal/ogr/ogrspatialreference.cpp#L7333

 

and EPSG:2154

'+proj=lcc +lat_1=49 +lat_2=44 +lat_0=46.5 +lon_0=3 +x_0=700000 +y_0=6600000

+ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs'

 

is equivalent to

''+proj=lcc +lat_1=46.5194302239868 +lat_0=46.5194302239868 +lon_0=3 +k_0=0.9990510286374693

+x_0=700000 +y_0=6602157.83881033 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs'

 

Even

 

--

Spatialys - Geospatial professional services

http://www.spatialys.com


_______________________________________________
Proj mailing list
[hidden email]
http://lists.maptools.org/mailman/listinfo/proj