[GRASSLIST:27] Re: Why use a database?

Trevor Wiens twiens at interbaun.com
Sun Mar 12 09:32:40 EST 2006


On Sat, 11 Mar 2006 16:09:24 -0800
Michael Rensing <michael.rensing at shaw.ca> wrote:

> I see that the dbf database is the default for adding attributes to 
> vector layers, but I'm not sure what else you need a database for in 
> GIS. I thought I'd ask the enthusiasts.
> - Why would I want to use (e.g.) SQLite instead of dbf?
> - Why would I want to use PostGIS?
> 
> Would any of these solutions speed up the loading and/or processing of 
> layers, either raster or vector, or both?
> 
> TIA,
> Michael
> 

Michael,

I should preface my comments by saying that I'm a long time database
programmer and users so my point of view is definitely biased by that.

Basically using a real database over a flat file system like dbf is
about the need for control when doing attribute management. For
myself, I use GRASS mostly as a means to extract attributes from
buffered points from raster layers which I then use for statistical
modelling. I use this approach rather than the GRASS / R
interface because by storing the values of interest in a database table
makes it easier to use multiple times rather than having to extract
them every time. Therefore I store everything in PostgreSQL so that I
can access it easily from my statistical programs. Being in a real
database environment gives me easy control over multiple
classifications of GIS objects through a natural and easy to use
fashion. The new GRASS vector format does provide some support for this
through multiple categories and through the ability to link multiple
tables to a single vector file through a feature which is confusingly
named layers. These layers are not as one would expect, but are
multiple classifications of an existing topology layer in a single
vector file through links to multiple attribute tables. 

PostGIS is another animal altogether in my opinion. As you probably
know it is an add in module for PostgreSQL. I don't use it as a
data source in GRASS because I don't like the interface. Instead I use
PostGIS instead of GRASS for some vector processing as I find it
easier to use and gives me much more control. However since PostGIS
doesn't support topology there are some vector operations that can not
be done in that environment that can be done easily in GRASS. I like
GRASS just fine, but if I could do everything in PostGIS I would simply
because it is easier for me.

In summary, there are no speed benefits AFAIK, but at least for me, use
of PostgreSQL and PostGIS is about control and ease of use. For people
who are not familiar with SQL, they tend to avoid PostgreSQL and
PostGIS because they find the setup and use daunting.

I hope that helps.

T
-- 
Trevor Wiens 
twiens at interbaun.com

The significant problems that we face cannot be solved at the same 
level of thinking we were at when we created them. 
(Albert Einstein)




More information about the grass-user mailing list