Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Mailing Lists -> Oracle-L -> Re: Storing co-ordinate / spatial information in non-GIS systems
> 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.
-- http://www.freelists.org/webpage/oracle-lReceived on Mon Aug 15 2005 - 09:01:58 CDT
![]() |
![]() |