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.

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?

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.

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?

I am downloading FWTools142.exe separately, in case that helps. But in the meantime any advice or explanation would be appreciated.
--
John

John Abraham wrote:
Well I did manage to get something to work. I'm not sure if setting the path to the Postgres libraries was important or not.

In QGIS I'm  able to connect to the database in QGIS using
db.connect driver=pg database=postgis schema=public

and then I'm able to import a shapefile into the PostGIS database using

v.in.ogr dsn=C:\MontgomeryShapefiles\Autauga\BLDG_FOOTPRINT.shp output=bldg_footprint2 -o


That put a table in the database from the shapefile. Not sure what to do with it now, because I guess grass vector layers aren't PostGIS tables, and when I try to add it as a GRASS vector layer QGIS crashes. But it's movement foreward anyways.

Thanks for caring, I'll struggle some more and try to figure this thing out. I think I have a paradigm problem in that I'm expecting everything to be stored in a PostGIS database using PostgreSQL, but Grass seems to be insisting on keeping things in its own dbf files instead.
--
John

Moritz Lennert wrote:
John Abraham wrote:
I am having a heck of a time getting a connection to PostGIS/PostgreSQL to work.

[...]

I can't say anything about QGIS, but:


I also installed grass63RC1 standalone. I got it running, but can't connect to my data. I've tried every connection string I can think of, and I always get
Unable to open datasource.

This could be because GRASS doesn't find the path to your postgres libraries.

For the standalone wingrass binary, you can set the path in the grass63.bat file using something like this:

set PATH=c:\PathToPostgres\lib;%PATH%

Be sure to put the postgres path at the beginning, not after the %PATH% because this could cause a library conflict.


I went into the ControlPanel -> Administrative Tools -> Datasources and defined an ODBC datasource that seems to connect to the database, but I have no idea how to make Grass connect via a pre-defined ODBC connection.

ODBC is not compiled as a driver in the current version of the windows GRASS binaries. See http://geog-pc40.ulb.ac.be/grass/wingrass/winconfig.log for a list of what is and is not compiled.

It will in a future version.



------------------------------------------------------------------------

_______________________________________________
grassuser mailing list
grassuser@grass.itc.it
http://grass.itc.it/mailman/listinfo/grassuser

_______________________________________________
grassuser mailing list
grassuser@grass.itc.it
http://grass.itc.it/mailman/listinfo/grassuser

Reply via email to