Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> Re: Storing co-ordinate / spatial information in non-GIS systems

Re: Storing co-ordinate / spatial information in non-GIS systems

From: Jason Heinrich <jheinrich_at_pcci.edu>
Date: Mon, 15 Aug 2005 08:59:57 -0500
Message-ID: <BF260A0D.9815%jheinrich@pcci.edu>


> Other dbs have implemented coordinate datatypes (PostgreSQL for instance) -
> someone might have done a port and had a bright idea.

Oracle has a geometric datatype (MDSYS.SDO_GEOMETRY), and a bunch of functions for working with geometric data, included in the Locator component of their Intermedia option (which is included free with both Standard and Enterprise editions). This is a subset of the full-blown Spatial option, which provides advanced functionality useful for GIS systems.

Coordinate, or point, data such as latitude/longitude is some of the simplest to work with. Oracle even provides a truckload of coordinate systems to use when doing distance calculations and such, so you don't have to deal with such sticky things like account for the curvature of the earth (which isn't spherical) yourself.

Unfortunately, the syntax for manipulating this data isn't completely straightforward. I recommend reviewing the Spatial User's Guide and Reference for more information on that.

> I'd like to store information like co-ordinate pairs (lat,
> long), a zoom level, etc. for interfacing with services like Google Earth,
> Google Maps, etc.

Having said all that, SDO_GEOMETRY won't help you very much when interfacing with outside web services. Even if you do use SDO_GEOMETRY, I still recommend storing the latitude and longitude separately in a more readable format such as NUMBER. Others have already made comments on keeping that data atomic: my vote is a check constraint like David outlined.



Jason Heinrich
Oracle Database Administrator
Pensacola Christian College
(850) 478-8496 x2509
jheinrich_at_pcci.edu
--
http://www.freelists.org/webpage/oracle-l
Received on Mon Aug 15 2005 - 09:01:58 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US