[postgis-devel] [PostGIS] #1742: PostGIS 2.0 alters Z-coordinate

Jose Carlos Martinez Llario jomarlla at cgf.upv.es
Fri Mar 30 13:19:19 PDT 2012


On 30/03/2012 22:10, PostGIS wrote:
> #1742: PostGIS 2.0 alters Z-coordinate
> -----------------------+----------------------------------------------------
>    Reporter:  pramsey   |       Owner:  pramsey
>        Type:  defect    |      Status:  closed
>    Priority:  critical  |   Milestone:  PostGIS 2.0.0
>   Component:  postgis   |     Version:  2.0.x
> Resolution:  invalid   |    Keywords:
> -----------------------+----------------------------------------------------
>
> Comment(by lrssvt):
>
>   +towgs84 parameter depends on the area where you are, within the UTM zone
>   30.
>   So it is at the discretion of the user who uses! For example, for Italy
>   with EPSG:3004 or 3003, it is:
>
>   {{{
>   +towgs84=-104.1,-49.1,-9.9,0.971,-2.917,0.714,-11.68     Italy (Peninsular
>   Part), Accuracy 3-4m
>   +towgs84=-168.6,-34.0,38.6,-0.374,-0.679,-1.379,-9.48    Italy (Sardinia),
>   Accuracy 3-4m
>   +towgs84=-50.2,-50.4,84.8,-0.690,-2.012,0.459,-28.08     Italy (Sicily),
>   Accuracy 3-4m
>   }}}
>
>   PostGIS 2.0 uses this:
>
>   {{{
>   +towgs84=-104.1,-49.1,-9.9,0.971,-2.917,0.714,-11.68
>   }}}
>
>   so, for Sardinia that leads to gross errors!
>

Im did some tests:
With nad grids then everything is fine (and results are much more 
accurate compared with 7 parameter transformation)
s2=# update spatial_ref_sys set proj4text = '+proj=utm +zone=30 
+ellps=intl +units=m nadgrids=PENR2009.gsb +no_defs' where srid = 23030;
UPDATE 1
update spatial_ref_sys set proj4text = '+proj=longlat +ellps=intl 
+units=m nadgrids=PENR2009.gsb +no_defs' where srid = 4230;
UPDATE 1
select st_asewkt(st_transform(st_geomfromtext('POINT (700000 4500000 
100)',23030), 4326));
                         st_asewkt
----------------------------------------------------------
  SRID=4326;POINT(-0.636674269368576 40.6247819719433 100)

With the other model, then one should use a 2d transformation instead of 
7 parameter approach but not sure!
regards,
Jose





More information about the postgis-devel mailing list