[GRASSLIST:5077] RE: Grass to Postgres

Juanse georef at tie.cl
Mon Nov 25 22:30:37 EST 2002


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

  This gives a good overview:

  I been over it, also over the pdf of http://www.rcost.unisannio.it/antoniol/students/PostGrass/
  also others of topology.

    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?).

  I don't think it is a string, I think it is a BLOB (a Binary Large OBject) and PostgreSQL displays it as a string (with the help of PostGIS). And where do you see this "constrain at the end that tell pgsql how this string is constructed"?

  You are probably right, if i do ssh \d rios in the type description of wkb_geometry column i get geometry as type and at the end of the table's type table  i get this sentence.

  Unique keys: rios_ogc_fid_key
  Check constraints: "$1" (srid(wkb_geometry) = -1)
                     "$2" ((geometrytype(wkb_geometry) = 'LINESTRING'::text) OR (wkb_geometry IS NULL))

  What is this BLOB type? How do you decompose it?

  I must recall i am doing an on purpose very long turn/detour/datajuggling, just to stress posibilities: An original ArcInfo E00 (clean and build) import77 to arcview, save as shape, Utranslated to tab and then loaded to pgsql/gis ejercicio database via ogr2ogr. I didn't put the correct srid, but -1 non earth plane shouldn't matter.

  In ejercicios db i have related tables for rios linestring layer rios: rios_ogc_fid_seq and one tuple in geometry_columns table. I also have loaded spatial_ref_sys in ejercicio db.

  I should have started with a point table with one attibute, but ... i know this rios very well , ja! and all other tables/layers in ejercicios db are already online with mapserver!! Is the front end the part at this moment. i will love to be able to connect mapinfo to this ... but that does not depend on us.
    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?

  This might help:

  Thanks, I will take a look:


  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: 09/11/02
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/grass-user/attachments/20021126/d6d088c9/attachment.html

More information about the grass-user mailing list