[postgis-users] Z coordinate value changes with st_transform

Jose Carlos Martinez jomarlla at cgf.upv.es
Fri Mar 30 04:22:32 PDT 2012


I didnt get nay answers from now.
Someone can tell me why postgis is changing the z coordinate and how i 
can change this default behavior?
Should I keep using  proj4.7 instead of proj4.8?

Before:
pg20=# select st_astext(st_transform(st_geomfromtext('POINT (700000 
4500000 100)', 23030), 4326));
                           st_astext
--------------------------------------------------------------
  POINT Z (-0.63662073736203 40.6248036513963 100)


Now:
pg20=# select st_astext(st_transform(st_geomfromtext('POINT (700000 
4500000 100)', 23030), 4326));
                           st_astext
--------------------------------------------------------------
  POINT Z (-0.63662073736203 40.6248036513963 168.35361468256)



On 27/03/2012 21:56, Jose Carlos Martinez Llario wrote:
> From proj4.8 changelog:
>
> "Preliminary support has been added for vertical datums using the 
> +geoidgrids= directive.  The geoidgrids are assumed to provide a 
> transformation from geoid elevations to ellipsoidal elevations and 
> they are discussed a bit in the VerticalDatums topic on the web site"
>
> I dont like the st_transform method can change my z coordinates by 
> default though, dont know if it is because PostGIS is not ready still 
> for proj4.8 or because it is the proj4.8 default behaviour.
>
> cheers,
> Jose
>
>
> On 27/03/2012 19:02, Jose Carlos Martinez wrote:
>> Hi, dont know if this is the expected behavior, maybe its because I 
>> built postgis with proj 4.8 or because something has changed in 
>> spatial_ref_sys. Dont know at what time it happened (I missed it).
>>
>> Before:
>> pg20=# select st_astext(st_transform(st_geomfromtext('POINT (700000 
>> 4500000 100)', 23030), 4326));
>>                           st_astext
>> --------------------------------------------------------------
>>  POINT Z (-0.63662073736203 40.6248036513963 100)
>>
>>
>> Now:
>> pg20=# select st_astext(st_transform(st_geomfromtext('POINT (700000 
>> 4500000 100)', 23030), 4326));
>>                           st_astext
>> --------------------------------------------------------------
>>  POINT Z (-0.63662073736203 40.6248036513963 168.35361468256)
>>
>> Using ST_AsKml Its changing the Z coordinate too.
>>
>> Someone can confirm when this change happened in PostGIS?
>>
>> Regards,
>> Jose
>>
>>
>> _______________________________________________
>> postgis-users mailing list
>> postgis-users at postgis.refractions.net
>> http://postgis.refractions.net/mailman/listinfo/postgis-users
>




More information about the postgis-users mailing list