[GRASS-user] v.colors usage

Markus Metz markus.metz.giswork at gmail.com
Wed Nov 7 10:32:38 PST 2018


On Wed, Nov 7, 2018 at 7:06 PM Rich Shepard <rshepard at appl-ecosys.com>
wrote:
>
> On Wed, 7 Nov 2018, Markus Metz wrote:
>
> > for sqlite, the database must be a path to a sqlite database, in your
> > case, as you used yourself before:
> >
database="$HOME/data/grassdata/willamette_basin/mercury/sqlite/sqlite.db"
>
>    Well, the situation here has become FUBAR and I need help fixing
things.
>
>    The geometry/database in grass has 8 maps, each with an associated
> attribute table. The stations map is connected to the postgres table:
>
> $ less data/grassdata/willamette_basin/mercury/vector/stations/dbln
>
1/stations|stations|cat|/home/rshepard/data/grassdata/willamette_basin/willamette-river-hg|pg
>
> Other maps still have their tables in the sqlite.db; e.g.,
>
1/FishD_AllSpecies_January2012|all_species|cat|$GISDBASE/$LOCATION_NAME/$MAPSET/sqlite/sqlite.db|sqlite
>
> so I tried to re-connect it to the postgres table using v.db.connect with
> this result:
>
> > v.db.connect map=all_species driver=pg
database="$HOME/data/grassdata/willamette_basin/willamette-river-hg"
table=all_species -o
> DBMI-PostgreSQL driver error:
> Connection failed.

for pg you don't specify a path/to/file as database, instead you use a
name: database=willamette-river-hg

Markus M

> FATAL:  database
"/home/rshepard/data/grassdata/willamette_basin/willamette-river" does not
exist
> DBMI-PostgreSQL driver error:
> Connection failed.
> FATAL:  database
"/home/rshepard/data/grassdata/willamette_basin/willamette-river" does not
exist
> WARNING: Unable to open database
>
</home/rshepard/data/grassdata/willamette_basin/willamette-river-hg>
>           by driver <pg>
> WARNING: Unable open database
>
</home/rshepard/data/grassdata/willamette_basin/willamette-river-hg>
>           by driver <pg>
> ERROR: Table <all_species> does not exist in database
>
</home/rshepard/data/grassdata/willamette_basin/willamette-river-hg>
>
>    Grass is connected to that database and I'm logged in:
> > db.connect -p
> driver: pg
> database:
/home/rshepard/data/grassdata/willamette_basin/willamette-river-hg
>
> and, of course, the table 'all_species' exists there:
>
> willamette-river-hg=# \d
>               List of relations
>   Schema |      Name      | Type  |  Owner
> --------+----------------+-------+----------
>   public | all_species    | table | rshepard
>
>    So, I've obviously missed a step or the proper syntax and have become
> sufficiently confused by what's to be done when connected to each database
> that I need to be shown the True Path to transferring the rest of the map
> attribute tables to the ones db.cop(ied) to the postgres database.
>
> TIA,
>
> Rich
>
>
> _______________________________________________
> grass-user mailing list
> grass-user at lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/grass-user
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/grass-user/attachments/20181107/7fe6d6c0/attachment.html>


More information about the grass-user mailing list