[Proj] Help with use of swisstopo NTv2 grid shift ?

Sandro Santilli strk at keybit.net
Wed Jan 25 12:17:22 EST 2012


On Wed, Jan 25, 2012 at 11:14:18AM +0000, Mikael Rittri wrote:

> Maybe it would be possible to combine step (1) and (2) to a single cs2cs
> command, by replacing +proj=longlat by +proj=somerc etc. in the source CRS
> that uses the NTv2 grid. But I am not sure what ellipsoid to specify in that
> case. The +proj=somerc would need the Bessel ellipsoid to work properly, and
> that would perhaps confuse the grid conversion. 

The 2-steps version indeed also works:

  -- 2 steps
  SELECT name, ST_Distance( lv95,
   postgis_transform_geometry(
     postgis_transform_geometry(
       lv03,
       '+proj=somerc +lat_0=46.95240555555556 +lon_0=7.439583333333333 +k_0=1 +x_0=600000 +y_0=200000 +ellps=bessel +towgs84=674.4,15.1,405.3,0,0,0,0 +units=m +nadgrids=CHENYX06a.gsb +no_defs', -- CH1903 (epsg:21781) modified adding grid shift
       '+init=epsg:4326', -- CH1903+ pretending to be wgs84
       4150
     ),
     '+init=epsg:4150', -- CH1903+ proper
     '+init=epsg:2056', -- CH1903+/LV95 proper
     2056)
  ) from euref;

        name      |     st_distance
  ----------------+---------------------
   Zimmerwald     | 0.00692816117873887
   Chrischona     | 0.00428319953182237
   Pfaender       | 0.00016855795287734
   La Givrine     | 0.00555304264270726
   Monte Generoso | 0.00804385131339353
  (5 rows)

Now next step would be making such transformation available
with a single proj call.

Would it be possible to create an init file containing all "pretending"
referenced set of working transforms ?definitions so to be able to use
<CH1903+> as the pivot and <CH1903>, <CH1903/LV03>, <CH1903+/LV96> and maybe
<WGS84> to have a self-referenced set of working transforms ?

Is that what IGNF file is all about ? 

--strk;

  ()   Free GIS & Flash consultant/developer
  /\   http://strk.keybit.net/services.html


More information about the Proj mailing list