473,399 Members | 3,888 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,399 software developers and data experts.

Latitude/Longitude data types and functions

CSN
I looked through the docs and contrib, but didn't see
anything related to storing and using latitude and
longitude values. I have data in the form of 12° 34'
N, 12° 34' W.

Would any of the geometric data types work well for
this type of data? Or just convert them to decimals?
Are there any functions for converting lat/long
to/from decimals/DDMMSS NSEW?

Thanks

__________________________________
Do you Yahoo!?
Yahoo! Mail is new and improved - Check it out!
http://promotions.yahoo.com/new_mail

---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
(send "unregister YourEmailAddressHere" to ma*******@postgresql.org)

Nov 23 '05 #1
5 8081

Didn't /contrib/earthdistance help?

---------------------------------------------------------------------------

CSN wrote:
I looked through the docs and contrib, but didn't see
anything related to storing and using latitude and
longitude values. I have data in the form of 12° 34'
N, 12° 34' W.

Would any of the geometric data types work well for
this type of data? Or just convert them to decimals?
Are there any functions for converting lat/long
to/from decimals/DDMMSS NSEW?

Thanks

__________________________________
Do you Yahoo!?
Yahoo! Mail is new and improved - Check it out!
http://promotions.yahoo.com/new_mail

---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
(send "unregister YourEmailAddressHere" to ma*******@postgresql.org)


--
Bruce Momjian | http://candle.pha.pa.us
pg***@candle.pha.pa.us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073

---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
(send "unregister YourEmailAddressHere" to ma*******@postgresql.org)

Nov 23 '05 #2
CSN

Ah, that should work.

The README for contrib/cube states:

To install the type, run
make
make install

For this to work, make sure that:
.. the cube source directory is in the postgres contrib
directory
.. the user running "make install" has postgres
administrative authority
.. this user's environment defines the PGLIB and PGDATA
variables and has
postgres binaries in the PATH.

So I did:
$ export PGLIB=/usr/lib/pgsql
$ export PGDATA=/var/lib/pgsql/data
$ make
$ make install
mkdir /usr/share/pgsql/contrib
make: *** [installdirs] Error 1

$ pg_config --configure
'--prefix=/usr' '--datadir=/usr/share/pgsql'
'--libdir=/usr/lib/pgsql'
'--includedir=/usr/include/pgsql'

Is PGLIB and/or PGDATA ignored? What should I do so
'make install' works?

Thanks,
CSN


--- Bruce Momjian <pg***@candle.pha.pa.us> wrote:

Didn't /contrib/earthdistance help?

---------------------------------------------------------------------------
CSN wrote:
I looked through the docs and contrib, but didn't

see
anything related to storing and using latitude and
longitude values. I have data in the form of 12°

34'
N, 12° 34' W.

Would any of the geometric data types work well

for
this type of data? Or just convert them to

decimals?
Are there any functions for converting lat/long
to/from decimals/DDMMSS NSEW?

Thanks

__________________________________
Do you Yahoo!?
Yahoo! Mail is new and improved - Check it out!
http://promotions.yahoo.com/new_mail

---------------------------(end of

broadcast)---------------------------
TIP 2: you can get off all lists at once with the

unregister command
(send "unregister YourEmailAddressHere" to

ma*******@postgresql.org)


--
Bruce Momjian |
http://candle.pha.pa.us
pg***@candle.pha.pa.us | (610)
359-1001
+ If your life is a hard drive, | 13 Roberts
Road
+ Christ can be your backup. | Newtown
Square, Pennsylvania 19073



__________________________________
Do you Yahoo!?
Yahoo! Mail - 50x more storage than other providers!
http://promotions.yahoo.com/new_mail

---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
(send "unregister YourEmailAddressHere" to ma*******@postgresql.org)

Nov 23 '05 #3
CSN <co*******************@yahoo.com> writes:
I looked through the docs and contrib, but didn't see
anything related to storing and using latitude and
longitude values.


I think you want to look at the PostGis project:
http://postgis.refractions.net

regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to ma*******@postgresql.org so that your
message can get through to the mailing list cleanly

Nov 23 '05 #4
CSN wrote:
For this to work, make sure that:
. the cube source directory is in the postgres contrib
directory
. the user running "make install" has postgres
administrative authority
. this user's environment defines the PGLIB and PGDATA
variables and has
postgres binaries in the PATH.


These installation instructions are completely bogus. The new text that
I just committed reads:

The user running "make install" may need root access; depending on how
you configured the PostgreSQL installation paths.

--
Peter Eisentraut
http://developer.postgresql.org/~petere/
---------------------------(end of broadcast)---------------------------
TIP 5: Have you checked our extensive FAQ?

http://www.postgresql.org/docs/faqs/FAQ.html

Nov 23 '05 #5
CSN wrote:
I looked through the docs and contrib, but didn't see
anything related to storing and using latitude and
longitude values. I have data in the form of 12° 34'
N, 12° 34' W.

Would any of the geometric data types work well for
this type of data? Or just convert them to decimals?
Are there any functions for converting lat/long
to/from decimals/DDMMSS NSEW?

Thanks


Have a look at pgSphere
http://gborg.postgresql.org/project/...rojdisplay.php

It has no release yet, but I want to do it this summer.
Check it out and send me possible bug reports.

Regards,
Janko Richter

---------------------------(end of broadcast)---------------------------
TIP 7: don't forget to increase your free space map settings

Nov 23 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: jack | last post by:
not sure exactly where I should ask this question, but im looking for a database of Australian Postcodes that included the longitude/latitude. Does anyone know of such a thing? Preferably...
4
by: YS Sze | last post by:
If you know the exact longitude and latitude for a specific location, would anyone think it'd make any sense to find out if this set of location numbers is really part of the Fibonacci series or...
2
by: kbperry | last post by:
I am not sure if this is the right place for this, but I thought it was worth a shot. What I want: Enter a From: street address and a To: street address, and then specify an interval (say...
6
by: helpneeded | last post by:
Hi I am a novice using the <maptag. I have a question. I would really appreciate if you could answer me. I want to use the <maptag to dynamically update my map with coordinates. These...
1
by: ttamilvanan81 | last post by:
Hai everyone, I need to find the Latitude and Longitude values for any one of the Particular location from the Google Maps, using pure java class. I know, it's done by using javascript, but i...
1
by: monkeyxu | last post by:
Hi, Postgresql/PostGIS Guru I am new for both Postgresql/PostGIS and need help for converting point () to latitude and longitude degrees using some kind of PostGIS functions. I have a ship's point...
5
by: arial | last post by:
Hi all, I have a sql .bak file which i need to convert into xml file. can someone help with this? pointing out to some tutorial or some suggetion on how to start? Thak you,
1
by: alan5 | last post by:
I want to answer on the topic australian postcode db with longitude/latitude posted by jack. He wrote: not sure exactly where I should ask this question, but im looking for a database of...
1
omerbutt
by: omerbutt | last post by:
hi i am trying to store the longitude and latitude i have made the table with 3 columns codes, longitude , latitude and the type for longitude and latitude is decimal(15,11) but there are different...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.