GPS coordinates problem

Started by Timmy Siuover 6 years ago3 messagesgeneral
Jump to latest
#1Timmy Siu
timmy.siu@aol.com

Dear All Postgre Users,

I want to develop a new project on Lavarel 5 and Postgresql 11.

Now, I need Global Position System coordinates as a data type. How do I
define it in Postgresql 11 or 12?

Thanks for your help.

Timmy

#2Andreas Kretschmer
andreas@a-kretschmer.de
In reply to: Timmy Siu (#1)
Re: GPS coordinates problem

Am 08.10.19 um 12:50 schrieb Timmy Siu:

Now, I need Global Position System coordinates as a data type. How do
I define it in Postgresql 11 or 12?

consider PostGIS.

Regards, Andreas

--
2ndQuadrant - The PostgreSQL Support Company.
www.2ndQuadrant.com

#3Robert Heinen
rob@216software.com
In reply to: Andreas Kretschmer (#2)
Re: GPS coordinates problem

You can use the postgis extension:

create extension postgis;

Then you can create a geography coulmn

location geography( point, 4326)

and insert a lat /long as a point like this:
ST_GeographyFromText('SRID=4326;POINT(%(longitude)s %(latitude)s)'),

On Tue, Oct 8, 2019 at 1:30 PM Andreas Kretschmer <andreas@a-kretschmer.de>
wrote:

Show quoted text

Am 08.10.19 um 12:50 schrieb Timmy Siu:

Now, I need Global Position System coordinates as a data type. How do
I define it in Postgresql 11 or 12?

consider PostGIS.

Regards, Andreas

--
2ndQuadrant - The PostgreSQL Support Company.
www.2ndQuadrant.com