[postgis-users] Degrees to meters

marco vieira maovieira at gmail.com
Mon Jun 19 07:02:33 PDT 2006


Kevin:
 David is right: You should get basic understading before continuing. I will
help you clearing some points about your text:

> I have a point (-7.48081E,39.821566N), in WGS-84, and I want it to be in
lisbon datum with the units in meters.
(1) Ok. This point can be in WGS84 datum. It means that this point is
located on a WGS-84 ellipsoid that is geocentric (origin in mass centre of
the earth). Always a datum is "origin + ellipsoid" definition. In some cases
(local datuns) this origin is located on the ground in some country and is
defined by an angle measurements (see "Geodesy for the Layman" for good
explanations).
(2) There is no information here about projection (the way that you see
things in the earth), or, in fact, "N" and "E" letters indicates that is
some cartesian projection, but you cant determine what projection is (can be
created by anyone). Usually "N" and "E" letters is used by UTM projection
(that have units in meters) but in this case there is no negative values:
your point coordinates appear to be latitude and longitude (in degress not
in meters).

> I have created a new datum-> "+proj=tmerc +lat_0=39.6666667 +lon_0=-
8.131905 +k=1.000000 +x_0=0  +y_0=0 +a=6378388 +b=6356911.9 +units=m
+no_defs ".
(1) You  wasn't create a datum, you create a geodesic system of reference
(srid) composed by a projection (Transverse Mercatur) + elipsoid (Hayford
can be called by ellps=intl parameter).
(2) This values appear wrongs. lat_0, lon_0 is defined for another purpouse.
The only way to define this is understanding what each parameter means.
(3) What in fact tou want? Probably you dont need to create another
projection to display maps or to compare coordinates. It is used when some
regional system of reference is not described in spatial_ref_sys or when you
want to create your own srid (like in topographic mesurements or when you
will diplay the world with some special distortions). Both cases you have to
know exactly what you want.

> Note that point of reference of lisbon is =-8.131905 E,39.6666667 N and a
and b refers to the ellipsoid of Hayford.
> Well I think that this should work but the problem is that when i do the
convertion the coordinates of the point is:X->56542.734,Y->17497.474;
> but it should be something like:X-> 55838.227,Y->17741.34;
(1) Where come this coordinates? There is two keys in a srid conversion:
knows the srid of source and knows the srid of destination. Probably your
source srid is in latlong projection (that uses degress unit)  and in WGS-84
datum but what is the srid (projection + datum) of your destination
projection? Unless you know it you cant make a conversion. If you don't know
it, probably you can't guess it. Ask to the creator of this map.

Basicly you have some several steps to do:
(1) Understand basic concepts like David Bitner sad;
(2) Confirm the source srid and the destination srid
(3) Check if postgresql have the srids that you need
(4) Make the conversion.

Regards

-- 
Marco Vieira
+55 21 9499-6800
e-mail: maovieira at gmail.com


2006/6/19, David William Bitner <bitner at gyttja.org>:
>
> You are still trying to convert from a sphere to a sphere... on a sphere,
> you are always going to have angular coordinates like lat, lon.  As we've
> said before, you need to find a projected coordinate system -- that is one
> where the sphere has been converted to a flat surface.  The three concepts
> which you really need to gain a basic understanding of before continuing on
> are datum, spheroid/ellipsoid/geooid, and projection.  Without understanding
> these in a basic way, you will continue to be lost.
>
> http://en.wikipedia.org/wiki/Map_projection
> http://en.wikipedia.org/wiki/Datum
>
> Somebody previously sent some links to some other resources as well.
>
> We really would like to help you, but you are really getting into an area
> where you really should (perhaps I'm too much of a geographer) understand
> what is going on.
>
> Please don't be disheartened.  Stepping back for a little bit here to do
> some extra homework will really help you as you do work in the geography
> world.
>
> David
>
>
>
>
> On 6/18/06, Kevin martins <martins506 at hotmail.com> wrote:
> >
> > Hi folks,
> >
> > Well ,a few days ago i had a problem with coordinates projeted on
> > maps.Well, I still have that problem:
> >
> > I have a point (-7.48081E,39.821566N), in WGS-84, and I want it to be in
> > lisbon datum with the units in meters.
> > I have created a new datum-> "+proj=tmerc +lat_0=39.6666667 +lon_0=-
> > 8.131905 +k=1.000000 +x_0=0  +y_0=0 +a=6378388 +b=6356911.9 +units=m
> > +no_defs ".
> > Note that point of reference of lisbon is =-8.131905 E,39.6666667 N and
> > a and b refers to the ellipsoid of Hayford.
> > Well I think that this should work but the problem is that when i do the
> > convertion the coordinates of the point is:X->56542.734,Y->17497.474;
> > but it should be something like:X-> 55838.227,Y->17741.34;
> >
> > What am I doing wrong? Could you help me pplllllllllllleeeeeeeeese?
> > Cheers
> > Kevin
> >
> >
> >
> >
> > -----------------------------------------------
> > > Date: Wed, 14 Jun 2006 16:45:35 -0300
> > > From: maovieira at gmail.com
> > > To: postgis-users at postgis.refractions.net
> > > Subject: Re: Re: Re: [postgis-users] Degrees to meters
> > >
> > > Kevin:
> > >  You can treat "geographic" with two aprouches:
> > >     Geographic is all coordinates projected over the earth (in any
> > units)
> > >     Geographic is a alias to latlon "projection" (in fact Plate Careé
> > projection when displayed). It is more used in some countries.
> > >  Both treat projections, not Data (plural of Datum).You told about two
> > different Datum (origin+ellipsoid) in the same projection and that was the
> > conversion made.
> > > If  you want your map in different Datum (4326 represents WGS84 datum
> > in latlong projection, then I supose you are talking about WGS-84) in a
> > metric projection you must:
> > >   (A) Make a datum (ellipsoid + origin) conversion
> > >   (B) Project your map in a cartesian projection using a metric
> > system.
> > > This can be done in one step but in fact it is two.
> > > Step B depends of many factors (shape of your map,  type of distortion
> > desired,  position on the globe, etc).
> > > If you want to display this points you must considere this things to
> > choose a projection but if you want to compare this data with another map
> > (like calculate distances from one point table to another) you must convert
> > to the same projection that another table was. To calculate distance from
> > two tables in latlon you can use distance_sphere function to take answer in
> > meters.
> > > Maybe the best way to choose the right way is to give more information
> > about your objective to the list.
> > > Regards.
> > > 2006/6/14, Kevin martins < martins506 at hotmail.com >:
> > > Yes it's just like you said, but how can I get a data in longlat in
> > a  Geographic Coords  to a data in meters in another  Geographic Coords ?
> > > _________________________________________________________________
> > > Esteja entre os primeiros a experimentar o futuro das mensagens
> > instantâneas: avalie a versão beta do Windows Live Messenger
> > >
> > http://ideas.live.com/programpage.aspx?versionId=0eccd94b-eb48-497c-8e60-c6313f7ebb73_______________________________________________
> > > postgis-users mailing list
> > > postgis-users at postgis.refractions.net
> > > http://postgis.refractions.net/mailman/listinfo/postgis-users
> > > --
> > > Marco Vieira
> > > +55 21 9499-6800
> > > e-mail: maovieira at gmail.com
> >
> > _________________________________________________________________
> > Esteja entre os primeiros a verem o futuro do Hotmail: experimente a
> > versão beta do Windows Live Mail
> > http://ideas.live.com/programpage.aspx?versionId=5d21c51a-b161-4314-9b0e-4911fb2b2e6d_______________________________________________
> >
> > postgis-users mailing list
> > postgis-users at postgis.refractions.net
> > http://postgis.refractions.net/mailman/listinfo/postgis-users
> >
>
>
>
> --
> ************************************
> David William Bitner
> bitner at gyttja.org
>
> _______________________________________________
> postgis-users mailing list
> postgis-users at postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-users
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20060619/1990fbaf/attachment.html>


More information about the postgis-users mailing list