On 15/11/07 05:09, John Abraham wrote:
I'm having some trouble with the database paradigm. Can someone answer
some questions?
1) is it possible to only use PostGIS and not use a Grass directory?
If so, what would you put in the "GIS Data Directory" on the opening
splash screen? I would rather store everything in PostGIS but I'm
starting to think that's not possible.
The only way to use PostGIS without storing the geometries in GRASS is
via v.external. I don't know which modules work with maps linked in via
v.external. For example, any module which creates a new map will create
it in GRASS, not in PostGIS, so you would have to export it manually via
v.out.ogr.
2) with db.connect, am I just setting the parameters for the connection
to the database to read attribute data? Or is it also linking to the
directory to display vector data without converting it using v.in.ogr?
No, only attribute data for vector geometries.
3) with v.out.ogr, can I export to PostGIS? It doesn't show up on the
dropdown list of formats, but on the man page it has an entry for
format=PostgreSQL.
v.out.ogr creates this list on the fly, so if you don't see it, this
might mean that your installation of ogr does not support PostgreSQL.
In both 6.3 and 6.2.3RC1, PostgreSQL is in the drop down list for me.
To use v.out.ogr with PostgreSQL:
v.out.ogr input=polygons type=area dsn="PG:host=localhost dbname=postgis
user=postgres" olayer=polymap format=PostgreSQL
(from the man page)
4) with v.in.org, is there anyway to enable more debugging information?
with the command
v.in.ogr -l {dsn=PG:host=localhost dbname=postgis user=John}
min_area=0.0001 snap=-1
I just get
Unable to open data source <PG:host=localhost dbname=postgis user=John>
and it's killing me to constantly see that error message and no other
information. How could I get more information about what is wrong?
You can try to connect to that data source with db.connect and then run
db.test.
You can also enable debugging information by setting the DEBUG variable:
g.gisenv set=DEBUG=3
I am downloading FWTools142.exe separately, in case that helps. But in
the meantime any advice or explanation would be appreciated.
If you want to only work with vector data and want it stored in PostGIS,
then I'm not sure GRASS is the right solution. You might want to look at
qgis or udig.
If you want to profit of the full analytical capacity of GRASS, you're
probably better off using the native GRASS format.
Moritz
_______________________________________________
grassuser mailing list
grassuser@grass.itc.it
http://grass.itc.it/mailman/listinfo/grassuser