<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<DEFANGED_META content="text/html; charset=iso-8859-1" http-equiv=Content-Type>
<DEFANGED_META content="MSHTML 5.00.2614.3500" name=GENERATOR>
 <!-- <DEFANGED_STYLE> --> </DEFANGED_STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT face=Arial size=2>Right, it is actually not that simple to read a 
postgresql/postgis layer from grass5.1</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>after reading and trying, trying and reading, it 
seem that postgis file structure is not suited for grass5.1 postgrass directly 
reading.</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>In fmrt files i am ask to provide several fields 
for grass to be able to find the geometry and category data.</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>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?).</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>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?</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>which geometry type are allowed in Grass, i have an 
int4 from &gt;0 to &lt; 5, which are those? which int is equivalente to point, 
which to line, which to polyline, which to area and so on?</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>Juanse</FONT></DIV>
<DIV><FONT face=Arial size=2>temuko-Chile</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;</DIV>
<BLOCKQUOTE 
style="BORDER-LEFT: #000000 2px solid; MARGIN-LEFT: 5px; MARGIN-RIGHT: 0px; PADDING-LEFT: 5px; PADDING-RIGHT: 0px">
  <DIV DEFANGED_STYLE="FONT: 10pt arial">----- Original Message ----- </DIV>
  <DIV 
  style="BACKGROUND: #e4e4e4; FONT: 10pt arial; font-color: black"><B>From:</B> 
  <A href="mailto:georef@tie.cl" title=georef@tie.cl>Juanse</A> </DIV>
  <DIV DEFANGED_STYLE="FONT: 10pt arial"><B>To:</B> <A 
  href="mailto:Rich@GreenwoodMap.com" title=Rich@GreenwoodMap.com>Richard 
  Greenwood</A> </DIV>
  <DIV DEFANGED_STYLE="FONT: 10pt arial"><B>Cc:</B> <A 
  href="mailto:postgis-users@postgis.refractions.net" 
  title=postgis-users@postgis.refractions.net>postgis-users@postgis.refractions.net</A> 
  ; <A href="mailto:GRASSList@baylor.edu" 
  title=GRASSList@baylor.edu>GRASSList@baylor.edu</A> </DIV>
  <DIV DEFANGED_STYLE="FONT: 10pt arial"><B>Sent:</B> Monday, November 25, 2002 9:04 
  PM</DIV>
  <DIV DEFANGED_STYLE="FONT: 10pt arial"><B>Subject:</B> [GRASSLIST:5069] RE: Grass to 
  Postgres</DIV>
  <DIV><BR></DIV>
  <DIV><FONT face=Arial size=2>I have pass the first wall. I need some Grass 
  help.</FONT></DIV>
  <DIV>&nbsp;</DIV>
  <DIV><FONT face=Arial size=2>what is the meaning of Location, mapset and 
  database.</FONT></DIV>
  <DIV>&nbsp;</DIV>
  <DIV><FONT face=Arial size=2>I sort get that they are related to the actual 
  path where the data is? Am i correct?</FONT></DIV>
  <DIV>&nbsp;</DIV>
  <DIV><FONT face=Arial size=2>I have made the following dir 
  structure</FONT></DIV>
  <DIV>&nbsp;</DIV>
  <DIV><FONT face=Arial size=2>Inside Home i have created Mapa dir, and inside 
  it a vector dir and inside it a rio dir</FONT></DIV>
  <DIV>&nbsp;</DIV>
  <DIV><FONT face=Arial size=2>/home</FONT></DIV>
  <DIV><FONT face=Arial size=2>/home/mapa</FONT></DIV>
  <DIV><FONT face=Arial size=2>/home/mapa/vector</FONT></DIV>
  <DIV><FONT face=Arial size=2>/home/mapa/vector/rio</FONT></DIV>
  <DIV>&nbsp;</DIV>
  <DIV><FONT face=Arial size=2>inside rio i have make two files:</FONT></DIV>
  <DIV><FONT face=Arial size=2>&nbsp;head (with nothing in it)</FONT></DIV>
  <DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
  <DIV><FONT face=Arial size=2>and frmt with</FONT></DIV>
  <DIV><FONT face=Arial size=2>FORMAT:postgis</FONT></DIV>
  <DIV><FONT face=Arial size=2>HOST:192.168.0.1</FONT></DIV>
  <DIV><FONT face=Arial size=2>PORT:5432&nbsp;&nbsp;&nbsp;</FONT></DIV>
  <DIV><FONT face=Arial size=2>DATABASE:ejercicio</FONT></DIV>
  <DIV><FONT face=Arial size=2>USER:postgres</FONT></DIV>
  <DIV><FONT face=Arial size=2>PASSWORD:xxxx</FONT></DIV>
  <DIV><FONT face=Arial size=2>GEOM_TABLE:rios</FONT></DIV>
  <DIV><FONT face=Arial size=2>CAT_TABLE:rios</FONT></DIV>
  <DIV><FONT face=Arial size=2>#GEOM_ID:</FONT></DIV>
  <DIV><FONT face=Arial size=2>#GEOM_TYPE:</FONT></DIV>
  <DIV><FONT face=Arial size=2>#GEOM_GEOM:</FONT></DIV>
  <DIV><FONT face=Arial size=2>#CAT_ID:</FONT></DIV>
  <DIV><FONT face=Arial size=2>#CAT_FIELD:</FONT></DIV>
  <DIV><FONT face=Arial size=2>#CAT_CAT:</FONT></DIV>
  <DIV>&nbsp;</DIV>
  <DIV><FONT face=Arial size=2>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?</FONT></DIV>
  <DIV>&nbsp;</DIV>
  <DIV><FONT face=Arial size=2>after running grass51 i have set</FONT></DIV>
  <DIV>&nbsp;</DIV>
  <DIV><FONT face=Arial size=2>location:&nbsp;&nbsp;&nbsp; vector</FONT></DIV>
  <DIV><FONT face=Arial size=2>Mapset: &nbsp;&nbsp;&nbsp; rio</FONT></DIV>
  <DIV><FONT face=Arial size=2>database: /home/mapa/</FONT></DIV>
  <DIV><FONT face=Arial size=2>&lt;esc&gt;&lt;enter&gt;</FONT></DIV>
  <DIV>&nbsp;</DIV>
  <DIV><FONT face=Arial size=2>welcome to grass 5.1</FONT></DIV>
  <DIV><FONT face=Arial size=2>bla bla bla</FONT></DIV>
  <DIV><FONT face=Arial size=2>GRASS:/home/map/vector/rio&gt; d.mon 
  start=x0</FONT></DIV>
  <DIV><FONT face=Arial size=2>d.mon: error while lodaing shared libraries: 
  libpd.so: cannot open shared object file: No such file or 
  directory.</FONT></DIV>
  <DIV>&nbsp;</DIV>
  <DIV><FONT face=Arial size=2><FONT face=Arial 
  size=2>GRASS:/home/map/vector/rio&gt;</FONT></FONT></DIV>
  <DIV>&nbsp;</DIV>
  <DIV><FONT face=Arial size=2>where do i have the mistake?</FONT></DIV>
  <DIV>&nbsp;</DIV>
  <DIV><FONT face=Arial size=2>Do I need that pqsql library installed in the 
  client machine? why?</FONT></DIV>
  <DIV><FONT face=Arial size=2>Is is already installed on the pgsql 
  server.</FONT></DIV>
  <DIV>&nbsp;</DIV>
  <DIV><FONT face=Arial size=2>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?</FONT></DIV>
  <DIV>&nbsp;</DIV>
  <DIV><FONT face=Arial size=2>Juanse</FONT></DIV>
  <DIV><FONT face=Arial size=2>temuko-Chile</FONT></DIV>
  <DIV>&nbsp;</DIV>
  <BLOCKQUOTE 
  style="BORDER-LEFT: #000000 2px solid; MARGIN-LEFT: 5px; MARGIN-RIGHT: 0px; PADDING-LEFT: 5px; PADDING-RIGHT: 0px">
    <DIV DEFANGED_STYLE="FONT: 10pt arial">----- Original Message ----- </DIV>
    <DIV 
    style="BACKGROUND: #e4e4e4; FONT: 10pt arial; font-color: black"><B>From:</B> 
    <A href="mailto:Rich@GreenwoodMap.com" title=Rich@GreenwoodMap.com>Richard 
    Greenwood</A> </DIV>
    <DIV DEFANGED_STYLE="FONT: 10pt arial"><B>To:</B> <A href="mailto:georef@tie.cl" 
    title=georef@tie.cl>Juanse</A> </DIV>
    <DIV DEFANGED_STYLE="FONT: 10pt arial"><B>Sent:</B> Monday, November 25, 2002 8:16 
    PM</DIV>
    <DIV DEFANGED_STYLE="FONT: 10pt arial"><B>Subject:</B> Re: Grass to Postgres</DIV>
    <DIV><BR></DIV>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.<BR><BR>Best regards,<BR>Rich<BR><BR>At 08:09 PM 
    11/25/2002 -0300, you wrote:<BR>
    <BLOCKQUOTE class=cite type="cite" cite><FONT face=arial size=2>Hi 
      Richard</FONT><BR>&nbsp;<BR><FONT face=arial size=2>Sorry to bother 
      directly but seem that this Grass to Postgres is to much for a new 
      comer.</FONT><BR>&nbsp;<BR><FONT face=arial size=2>have you tried it 
      yet?</FONT><BR>&nbsp;<BR><FONT face=arial size=2>can i bother with some 
      questions?</FONT><BR>&nbsp;<BR><FONT face=arial size=2>Having the data 
      already in postgreSQL/PostGIS, how to read it with 
      Grass?</FONT><BR>&nbsp;<BR><FONT face=arial size=2>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.</FONT><BR>&nbsp;<BR><FONT 
      face=arial size=2>Juanse</FONT><BR><FONT face=arial 
      size=2>temuko-Chile</FONT><BR>&nbsp;<BR>&nbsp;<BR><FONT face=arial 
      size=2><BR>---<BR>Outgoing mail is certified Virus Free.<BR>Checked by AVG 
      anti-virus system (<A 
      href="http://www.grisoft.com">http://www.grisoft.com</A>).<BR>Version: 
      6.0.417 / Virus Database: 233 - Release Date: 
    08/11/02</FONT></BLOCKQUOTE><X-SIGSEP>
    <P></X-SIGSEP><BR>Richard W. Greenwood, PLS<BR>Greenwood Mapping, 
    Inc.<BR>Rich@GreenwoodMap.com<BR>(307) 733-0203<BR><A 
    href="http://www.greenwoodmap.com/" 
    eudora="autourl">http://www.GreenwoodMap.com</A> 
</P></BLOCKQUOTE></BLOCKQUOTE></BODY></HTML>