hello
hello
say using postgresql, I have create a geodatabase containing a polygon field
as data type with coords in this way:
here is the structure of table:
------
aa int
bb varchar(19)
geo_form polygon (as example data format '(4,4),(6,6),(-3,1),(2,9)' )
-------
how can I transfer this table to grass to be able to see geo_form(polygon) in grass monitor as in vector shape ?
regards
Ahmet Temiz
______________________________________
XamimeLT - installed on mailserver for domain @deprem.gov.tr
Queries to: postmaster@deprem.gov.tr
______________________________________
The views and opinions expressed in this e-mail message are the sender's own
and do not necessarily represent the views and the opinions of Earthquake Research Dept.
of General Directorate of Disaster Affairs.
Bu e-postadaki fikir ve gorusler gonderenin sahsina ait olup, yasal olarak T.C.
B.I.B. Afet Isleri Gn.Mud. Deprem Arastirma Dairesi'ni baglayici nitelikte degildir.
Dear all,
I want to export raster to postgres by using r.to.pg but the result is an error message like this:
cat: /home/firman/.grassrc5: No such file or directory
Please select database with g.select.pg or db.connect
I have tried to use g.select.pg but it wasn't change anything.
What I get from this error message is GRASS tried to read .grassrc5, but GRASS 5.4 that I used is
reading .grassrc54.
Is there anybody can help?
Thanks,
Firman Hadi,
Institute Technology of Bandung,
Indonesia
On Thu, June 16, 2005 11:22, Firman Hadi said:
Dear all,
I want to export raster to postgres by using r.to.pg but the result is
an error message like this:
cat: /home/firman/.grassrc5: No such file or directory
Please select database with g.select.pg or db.connect
I have tried to use g.select.pg but it wasn't change anything.
What I get from this error message is GRASS tried to read .grassrc5, but
GRASS 5.4 that I used is
reading .grassrc54.
Is there anybody can help?
ln -s .grassrc54 .grassrc5
Moritz
On Thu, 16 Jun 2005, Moritz Lennert wrote:
On Thu, June 16, 2005 11:22, Firman Hadi said:
cat: /home/firman/.grassrc5: No such file or directory
Please select database with g.select.pg or db.connect
I have tried to use g.select.pg but it wasn't change anything.
What I get from this error message is GRASS tried to read .grassrc5, but
GRASS 5.4 that I used is
reading .grassrc54.
Is there anybody can help?
ln -s .grassrc54 .grassrc5
It would be better to fix the bug in r.to.pg. I see it does:
# check for database settings
DB_DATABASE=`cat ~/.grassrc5 | grep DB_DATABASE| cut -d' ' -f2`
which looks very hackish.
As I understand it the correct way to do this would be more like:
DB_DATABASE=`eval g.gisenv get=DB_DATABASE`
This assumes these database variables are GRASS variables stored in the .grassrc file. Which I think they are; I have never used the database support in GRASS <5.7.
Could you try changing that line in the r.to.pg script; also the following
DB_DATABASE=`cat ~/.grassrc5 | grep PG_DBASE| cut -d' ' -f2`
should be changed to
DB_DATABASE=`eval g.gisenv get=PG_DBASE`
Does that work?
Paul
Sorry by last reply about this was wrong; leave out the evals.
THe lines
DB_DATABASE=`cat ~/.grassrc5 | grep DB_DATABASE| cut -d' ' -f2`
DB_DATABASE=`cat ~/.grassrc5 | grep PG_DBASE| cut -d' ' -f2`
should actually be changed to
DB_DATABASE=`g.gisenv get=DB_DATABASE`
DB_DATABASE=`g.gisenv get=PG_DBASE`