Tuesday, 30 October 2012

Oracle Spatial

Here are a few reminders for how to do the Oracle Spatial stuff

Using a Spatial Column

To use a spatial column in a table you need to create spatial metadata and a spatial index.  In SQL Developer you can do this by right clicking on the table and choosing Spatial - Update Spatial Metadata and Spatial - Create Spatial Index.  At this point many standard tools will be able to query and display the geometry out of the box.

Tools

uDig
http://udig.refractions.net/
Displays a Oracle Spatial Geometry by just choosing the column.  It is based on the Eclipse RCP (Rich Client Platform)

Georaptor
http://sourceforge.net/projects/georaptor/
A useful plugin for SQL Developer which makes the creation of the index and metadata more simple.  It has a viewer which is available within SQL Developer.

Validating Geometry

To validate a geometry column in a table you can use

    select sdo_geom.validate_geometry(<column_name>, 0.05) from <table_name>

where 0.05 is a tolerance value.


















No comments:

Post a Comment