Ticket #1676 (closed defect: worksforme)

Opened 16 months ago

Last modified 14 months ago

Problem in converting from RT90(SRID=3021) to WGS84(SRID=4326)

Reported by: arashamiri Owned by: pramsey
Priority: high Milestone: PostGIS 1.4.3
Component: postgis Version: 1.5.X
Keywords: Cc:

Description

I try with two different versions of postgreSQL and postGIS. With the same SQL.

I want to convert coordinates in RT90(SRID=3021) to WGS84(SRID=4326)

Select * From ST_X(ST_Transform(ST_SetSRID(ST_Point(1335932, 6177809), 3021), 4326)) as long, ST_Y(ST_Transform(ST_SetSRID(ST_Point(1335932, 6177809), 3021), 4326)) as lat

First: PostgresSQL versione 8.4 , postgis-1.4.2 Result: Long: 13.198086050257 Lat: 55.7017960558017

Second: PostgresSQL versione 9.1 , postgis-1.5.3 Result: Long: 13.1954101954645 Lat: 55.7017121131652

The first seems wrong. The results are actually the lat,long in the RT_1990(SRID=4124).

The second seems correct and the results are in WGS84(SRID=4326) which they should be.

Change History

Changed 16 months ago by strk

It is PROJ that matters here, and proj4text entry in spatial_ref_sys. Compare the two proj4text values for SRIDS 3021 and 4326 and see if they differ. Also report version of PROJ (select postgis_full_version() should tell you)

Changed 14 months ago by pramsey

  • status changed from new to closed
  • resolution set to worksforme

Need feedback from user to resolve this, as per strk's comment. Almost certainly a change in proj4text between versions.

Note: See TracTickets for help on using tickets.