Skip directly to content

Spatial databases embedded in gvSIG

on Tue, 22/11/2011 - 13:50
Description: 

There are several projects to provide spatial support to some Java database such as Derby, H2 or HSQLDB, but they only include to store geometries in the database and record some functions to perform some operations with them. It is not possible to integrate new indexes or new data types in the database as PostgreSQL has.

Mission of the project

Giving support to spatial indexes in some Java database such as derby, H2 or HSQLDB.

Objectives

These three databases are implemented in Java and let define new functions in java so that they can be used from SQL. As a consequence, it is easy to implement a wrapper on JTS and give limited support to spatial operations. SpatialDBBox (Spatial DB in a Box) is a method, promoted by GeoTools, that is based on these ideas.

There are implementations of H2SpatialDatabase , SpatialDerby and Hsql Binding for Spatial DB in a Box. But the main problem is that they do not have any type of spatial indexing and it is necessary to scan all data to apply a filter. That is the reason why it is so important to add spatial indexes to any of those databases.

Note that several manager libraries for spatial indexes have been developed in Java, and, in fact, gvSIG uses some of them:

  • JTS Quadtree
  • Java Spatial Index (RTree) Library
  • GeoTools QuadTree

So, the first step could be to integrate some of those libraries in the SQL engine of any of those databases. When it works the next step could be to create your own indexes. Another problem that SpatialDBBox has is that it does not recognize the geometry data type and it stores them in a binary field. So if the user tries to find out in which column a geometry is stored, there is not an automatic or easy way to do it.

PostgreSQL has a system for adding new data types to the database. It also has a mechanism to record types of indexes. Moreover, its spatial extensions record the type of geometry, a series of geometric functions and one or more index types appropriates for indexing geometries. It is possible it also has any system to find the optimizer that a spatial index may use.

This approach is interesting for giving spatial support to H2 or Derby. While the approach of SpatialDBBox is only to the group of functions that can handle geometries.

Project milestones

They will be defined according to the scope of each project.

Status: 
Student profile: 
Is needed a tutor?: 
Yes
Rating: 
Average: 4 (5 votes)

Post new comment

Safe HTML

  • Lines and paragraphs break automatically.
  • Allowed HTML tags: <a> <img> <em> <strong> <cite> <blockquote> <code> <ul> <ol> <li> <dl> <dt> <dd> <u> <br> <p> <span> <blockquote> <hr> <table> <tr> <td> <tbody> <thead> <tfoot> <th> <h1> <h2> <h3> <h4> <h5> <h6> <address> <div> <pre>
  • Web page addresses and e-mail addresses turn into links automatically.

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.