pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Which function transform x,y to latitude/longitude?
3+ messages / 2 participants
[nested] [flat]

* Which function transform x,y to latitude/longitude?
@ 2007-04-25 09:02 Nemo Terry <ntuser155@hotmail.com>
  2007-04-25 14:16 ` Re: Which function transform x,y to latitude/longitude? Michael Fuhr <mike@fuhr.org>
  0 siblings, 1 reply; 3+ messages in thread

From: Nemo Terry @ 2007-04-25 09:02 UTC (permalink / raw)
  To: pgsql-sql

Hi,

For example x= 38356.62 y= 42365.19.how to transform it to latitude 1.399948, longitude 193.92644?

Which function I could use? I don’t know the algorithm.

Initial data is: ("+proj=cass +a=6378137.0 +rf=298.257223563 +lat_0=1.287639n +lon_0=103.8516e +x_0=30000 +y_0=30000").

Thanks a lot.

bill

_________________________________________________________________
与联机的朋友进行交流,请使用 Live Messenger; http://get.live.com/messenger/overview 




^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: Which function transform x,y to latitude/longitude?
  2007-04-25 09:02 Which function transform x,y to latitude/longitude? Nemo Terry <ntuser155@hotmail.com>
@ 2007-04-25 14:16 ` Michael Fuhr <mike@fuhr.org>
  2007-04-26 04:11   ` Re: Which function transform x,y to latitude/longitude? Nemo Terry <ntuser155@hotmail.com>
  0 siblings, 1 reply; 3+ messages in thread

From: Michael Fuhr @ 2007-04-25 14:16 UTC (permalink / raw)
  To: Nemo Terry <ntuser155@hotmail.com>; +Cc: pgsql-sql

On Wed, Apr 25, 2007 at 05:02:02PM +0800, Nemo Terry wrote:
> For example x= 38356.62 y= 42365.19.how to transform it to latitude 
> 1.399948, longitude 193.92644?

Do you mean longitude 103.92644?  In what datum are the lat/lon
coordinates?  Where did you get the transformation in your example?

> Which function I could use? I don’t know the algorithm.
> 
> Initial data is: ("+proj=cass +a=6378137.0 +rf=298.257223563 
> +lat_0=1.287639n +lon_0=103.8516e +x_0=30000 +y_0=30000").

What's the source of these parameters?

You can perform transformations outside the database with PROJ.4
or inside the database with the PostGIS transform() function (which
uses PROJ.4).

http://proj.maptools.org/
http://postgis.refractions.net/

I don't see any exact matches in the PostGIS spatial_ref_sys table
for the parameters you posted you so if you use PostGIS then you
might have to insert a row to create your own spatial reference
system.  However, I did a few tests with your parameters and various
datums for the lat/lon and couldn't get the exact transformed values
in your example.

You might get more help on the PROJ.4 and PostGIS mailing lists.

-- 
Michael Fuhr



^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: Which function transform x,y to latitude/longitude?
  2007-04-25 09:02 Which function transform x,y to latitude/longitude? Nemo Terry <ntuser155@hotmail.com>
  2007-04-25 14:16 ` Re: Which function transform x,y to latitude/longitude? Michael Fuhr <mike@fuhr.org>
@ 2007-04-26 04:11   ` Nemo Terry <ntuser155@hotmail.com>
  0 siblings, 0 replies; 3+ messages in thread

From: Nemo Terry @ 2007-04-26 04:11 UTC (permalink / raw)
  To: mike@fuhr.org; +Cc: pgsql-sql

I just know the correct data must be longitude 103.926669,latitude0.111827.
x,y from Cassini system.
Could you give me the source code how you calculate.Thanks a lot! 

>From: Michael Fuhr <mike@fuhr.org>
>To: Nemo Terry <ntuser155@hotmail.com>
>CC: pgsql-sql@postgresql.org
>Subject: Re: [SQL] Which function transform x,y to latitude/longitude?
>Date: Wed, 25 Apr 2007 08:16:56 -0600
>
>On Wed, Apr 25, 2007 at 05:02:02PM +0800, Nemo Terry wrote:
> > For example x= 38356.62 y= 42365.19.how to transform it to latitude
> > 1.399948, longitude 193.92644?
>
>Do you mean longitude 103.92644?  In what datum are the lat/lon
>coordinates?  Where did you get the transformation in your example?
>
> > Which function I could use? I don���t know the algorithm.
> >
> > Initial data is: ("+proj=cass +a=6378137.0 +rf=298.257223563
> > +lat_0=1.287639n +lon_0=103.8516e +x_0=30000 +y_0=30000").
>
>What's the source of these parameters?
>
>You can perform transformations outside the database with PROJ.4
>or inside the database with the PostGIS transform() function (which
>uses PROJ.4).
>
>http://proj.maptools.org/
>http://postgis.refractions.net/
>
>I don't see any exact matches in the PostGIS spatial_ref_sys table
>for the parameters you posted you so if you use PostGIS then you
>might have to insert a row to create your own spatial reference
>system.  However, I did a few tests with your parameters and various
>datums for the lat/lon and couldn't get the exact transformed values
>in your example.
>
>You might get more help on the PROJ.4 and PostGIS mailing lists.
>
>--
>Michael Fuhr
>
>---------------------------(end of broadcast)---------------------------
>TIP 3: Have you checked our extensive FAQ?
>
>                http://www.postgresql.org/docs/faq

_________________________________________________________________
与世界各地的朋友进行交流,免费下载  Live Messenger; http://get.live.com/messenger/overview 




^ permalink  raw  reply  [nested|flat] 3+ messages in thread


end of thread, other threads:[~2007-04-26 04:11 UTC | newest]

Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2007-04-25 09:02 Which function transform x,y to latitude/longitude? Nemo Terry <ntuser155@hotmail.com>
2007-04-25 14:16 ` Michael Fuhr <mike@fuhr.org>
2007-04-26 04:11   ` Nemo Terry <ntuser155@hotmail.com>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox