[GRASS-user] Joining vectors by location

Daniel Lee lee at isi-solutions.org
Sat Nov 26 06:53:06 EST 2011


2011/11/24 Micha Silver <micha at arava.co.il>

> There are two separate metadata tables in newer PostGIS versions. The
> original geometry_columns is a real table as listed above. In addition
> there is support for the geography data type for layers in geographic
> (Lat/Lon) coordinate systems. With the geography type comes a new set of
> metadata, geography_columns. But this is indeed a view, not a real table.
> You'll see it with :
> geodata=# \dv
>
Gotcha, you're right there. I hadn't seen it.

The question remains why are you getting this error?
> Does the table perhaps already exist in your PostGIS database from the
> previous failed exports?
>
No, it hadn't. But now I've made a new template with a new database, I'm
hoping for more success.

2011/11/25 Moritz Lennert <mlennert at club.worldonline.be>

> The single quotes are not positioned correctly here. It should be:
>
>
> v.out.ogr in=Gebaeude_Globalstrahlung dsn='PG:host=localhost dbname=test
> user=lee password=XXX' type=area format=PostgreSQL
>
> BTW: your single quotes look like backticks. That might also cause
> problems. Are you working on the command line or in a GUI ?
>
That's right with the quotes. I think I'd put together the command in the
GUI and then tried pasting it into the command line, maybe that's how the
backticks got in there. I'd already tried it with the quotes in the right
place, but perhaps I had a problem because they were backticks.

2011/11/25 Pankaj Kr Sharma <pkscwc at gmail.com>

> Try to find the owner of your geography tables.
> Most probably, it will be "postgres".
> So, login as "postgres" and from their grant all on geography tables to
> the desired owner.
>
Great tip. I did try that in the old version, but it didn't make a
difference. In the new template that I made before I copied it for the
current database I'm trying to work in I set GRANT ALL on all tables to
public, which is the schema my user's in, I think.

2011/11/25 Richard Chirgwin <rchirgwin at ozemail.com.au>

> Database permissions in Grass-GIS are stored by mapset - you can only have
> one set of database parameters stored for one mapset. Moving data between
> database types is simplest and most reliable if you use different mapsets
> for different databases.
>
> Hence: if you've created maps with DBF permissions, I suggest:
>
> 1. create new mapset, and enter Grass-GIS in the new mapset.
> 2. set database connection for new mapset using db.connect and db.login
> 3. use g.copy vect=map at oldmapset,map (running in the target mapset)
>
> This will create the tables in the target mapset, linked to maps in the
> target.
>
> Note that you have to present the right credentials to PostGIS - owner and
> password.
>
I think this'll be the best way for me. I can reproject everything while
I'm at it, too. I've now made a separate location and am going to do
everything from there.
That should mean that I connect the mapset to the database and when I
import stuff into that mapset it's automatically imported into the
database? Then I'm basically working on the vectors, etc. IN my PostGIS
database? That would be nice.

Thanks for all the help! I'll report back in a few minutes as soon as I've
given it a try.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/grass-user/attachments/20111126/c5fc4801/attachment.html


More information about the grass-user mailing list