[GRASS5] [bug #4075] (grass) grass and postgis issue
Kirk R. Wythers
kwythers at umn.edu
Thu Feb 9 15:23:34 EST 2006
On Feb 9, 2006, at 1:59 PM, Moritz Lennert wrote:
> GRASS doesn't need the geometry since it is stored in the GRASS
> format, so
> why should it keep this column. What is it you want to do exactly:
> import
> a postgis map into GRASS, or view a postgis map with GRASS ? See
> v.external it it is the latter.
>
> As for indexing, this obviously first of all depends on the database
> backend that you use for GRASS maps (e.g. the dbf backend wouldn't
> support
> indexing). You seem to use postgresql as backend, so indexing would be
> possible. However, most of the indexes are on the geometry column,
> so they
> would not be needed for a map in GRASS format. Why do you want these
> indexes ?
>
>
> Moritz
Thanks for the reply Moritz. This all started out as a "can I speed
this querry up" exercise. Perhaps the fundamental issue is my not
completely understanding how GRASS makes use of the postgis extension
to postgresql. You are correct in that I am using psotgresql for
database management. I have an attribute table of little over a
million lines of data in a postgres table that is associated with a
grass vector. The table contains point data based on simple xy utm
coordinates.
This allows me to run a query like:
d.vect vector_name size=2 color=blue where="species='WP' AND diam>40"
I would guess that it takes d.vect about a minute to draw the results
of this query. I have never been able to quite figure out how GRASS
works with the postgis extension. All I was trying to do was speed
things up a bit, so I added the postgis geometry and spatial indexing
to the posgresql table. When I discovered that GRASS then didn't
behave as I expected (g.copy, g.rename), I thought that there were
three possible explanations: 1. a bug, 2. I didn't have postgis
configured properly, 3. (most likely) user error, or user not
understanding how something was supposed to work.
Any enlightenment in that last area is much appreciated.
Kirk
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/grass-dev/attachments/20060209/95256e98/attachment.html
More information about the grass-dev
mailing list