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

Reply via email to