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

  • To: "oracle-l" <oracle-l@xxxxxxxxxxxxx>
  • Date: Mon, 15 Aug 2005 16:41:15 +1000

Hi all,

I'm currently playing with storing simplistic geospatial information, and am 
interested in what experience others have of this.  I'll note now that this is 
*simplistic* ... in no way am I approaching the need of a GIS system or the 
like.  In essence, 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.   The data would be transformed by xslt or similar to the 
requisite target format (keyhole markup, google maps javascript), so I don't 
need to store any of that baggage.

What I am grappling with is how to keep the co-ordinate pair "atomic".  If I 
used separate fields for the latitude and longitude, an unknown point would 
have two nulls, a known point two values ... one of each would be "verboten", 
and hard to protect against using normal check constraints (or maybe I'm just 
having a senior moment).  Obviously a numeric field won't store two values ... 
stuffing them into a varchar2 or the like, with some arbitrary delimiter, is a 
bit of a kludge.  An object is appealing, but I'd prefer a purely relational 
solution.

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

So, anyone out there done this before, or have any suggestions?

Ciao
Fuzzy
:-)
--
//www.freelists.org/webpage/oracle-l

Other related posts: