Received: from localhost (maia-2.hub.org [200.46.204.187]) by postgresql.org (Postfix) with ESMTP id 6A5089FB95A for ; Thu, 26 Apr 2007 01:11:11 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.187]) (amavisd-maia, port 10024) with ESMTP id 99651-01 for ; Thu, 26 Apr 2007 01:11:06 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.4 Received: from bay0-omc3-s41.bay0.hotmail.com (bay0-omc3-s41.bay0.hotmail.com [65.54.246.241]) by postgresql.org (Postfix) with ESMTP id B42699FB378 for ; Thu, 26 Apr 2007 01:11:06 -0300 (ADT) Received: from hotmail.com ([64.4.53.62]) by bay0-omc3-s41.bay0.hotmail.com with Microsoft SMTPSVC(6.0.3790.2668); Wed, 25 Apr 2007 21:11:05 -0700 Received: from mail pickup service by hotmail.com with Microsoft SMTPSVC; Wed, 25 Apr 2007 21:11:05 -0700 Message-ID: Received: from 64.215.166.184 by by19fd.bay19.hotmail.msn.com with HTTP; Thu, 26 Apr 2007 04:11:02 GMT X-Originating-IP: [203.125.54.38] X-Originating-Email: [ntuser155@hotmail.com] X-Sender: ntuser155@hotmail.com In-Reply-To: <20070425141655.GA5472@winnie.fuhr.org> From: "Nemo Terry" To: mike@fuhr.org Cc: pgsql-sql@postgresql.org Subject: Re: Which function transform x,y to latitude/longitude? Date: Thu, 26 Apr 2007 12:11:02 +0800 Mime-Version: 1.0 Content-Type: text/plain; charset=gb2312; format=flowed X-OriginalArrivalTime: 26 Apr 2007 04:11:05.0308 (UTC) FILETIME=[E8D0D1C0:01C787B8] X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=1.909 tagged_above=0 required=5 tests=BAYES_50=0.001, DNS_FROM_RFC_ABUSE=0.2, DNS_FROM_RFC_POST=1.708, MSGID_FROM_MTA_HEADER=0 X-Spam-Level: * X-Archive-Number: 200704/255 X-Sequence-Number: 28255 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 >To: Nemo Terry >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鈥檛 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