[GRASSLIST:5071] RE: Grass to Postgres

Juanse georef at tie.cl
Mon Nov 25 21:00:35 EST 2002

Right, it is actually not that simple to read a postgresql/postgis layer from grass5.1

after reading and trying, trying and reading, it seem that postgis file structure is not suited for grass5.1 postgrass directly reading.

In fmrt files i am ask to provide several fields for grass to be able to find the geometry and category data.

Postgis stores in one column in my case wkb_geometry, a string identifying at the same type the SRID, the geometry type and the actual geometry in wkb, with a constrain at the end that tell pgsql how this string is constructed (Am i right?).

Has anyone build a protocol or sql sentence to prepare a postgis table for the grass requiered format: ie separate geometry from category with the same ID on both tables, and in the geometry table separate the geometry from the geometry type?

which geometry type are allowed in Grass, i have an int4 from >0 to < 5, which are those? which int is equivalente to point, which to line, which to polyline, which to area and so on?


  ----- Original Message ----- 
  From: Juanse 
  To: Richard Greenwood 
  Cc: postgis-users at postgis.refractions.net ; GRASSList at baylor.edu 
  Sent: Monday, November 25, 2002 9:04 PM
  Subject: [GRASSLIST:5069] RE: Grass to Postgres

  I have pass the first wall. I need some Grass help.

  what is the meaning of Location, mapset and database.

  I sort get that they are related to the actual path where the data is? Am i correct?

  I have made the following dir structure

  Inside Home i have created Mapa dir, and inside it a vector dir and inside it a rio dir


  inside rio i have make two files:
   head (with nothing in it)
  and frmt with

  rios is a NTAM table in ejercicio. I am using it again for categories. Is that all right or i have to separate geometry from categories in pgsql/gis?

  after running grass51 i have set

  location:    vector
  Mapset:     rio
  database: /home/mapa/

  welcome to grass 5.1
  bla bla bla
  GRASS:/home/map/vector/rio> d.mon start=x0
  d.mon: error while lodaing shared libraries: libpd.so: cannot open shared object file: No such file or directory.


  where do i have the mistake?

  Do I need that pqsql library installed in the client machine? why?
  Is is already installed on the pgsql server.

  Do i need to make this path structure by hand for each layer i want to use in grass eventhough they are all stored in the same pgsql/GIS database?


    ----- Original Message ----- 
    From: Richard Greenwood 
    To: Juanse 
    Sent: Monday, November 25, 2002 8:16 PM
    Subject: Re: Grass to Postgres

    It is no bother at all, but I'm afraid that I have not tried connecting to PostGIS from GRASS. I have only used PostGIS with MapServer. Keep trying on the GRASS list and maybe try asking the Refractions guys for help. And please post your finding because I would like to give it a try if I ever find some time.

    Best regards,

    At 08:09 PM 11/25/2002 -0300, you wrote:

      Hi Richard
      Sorry to bother directly but seem that this Grass to Postgres is to much for a new comer.
      have you tried it yet?
      can i bother with some questions?
      Having the data already in postgreSQL/PostGIS, how to read it with Grass?
      I am making the head and frmt, but have question as to the definition of various entries, the same applies for location, mapset and database.

      Outgoing mail is certified Virus Free.
      Checked by AVG anti-virus system (http://www.grisoft.com).
      Version: 6.0.417 / Virus Database: 233 - Release Date: 08/11/02

    Richard W. Greenwood, PLS
    Greenwood Mapping, Inc.
    Rich at GreenwoodMap.com
    (307) 733-0203

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/grass-user/attachments/20021125/97241a1d/attachment.html

More information about the grass-user mailing list