<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=UTF-8" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Hi Johannes.<br>
<br>
The supported geometry types in PostGIS gvSIG's drivers are:<br>
<br>
case POINT2D:<br>
aux = "<b>POINT</b>";<br>
break;<br>
case LINE2D:<br>
aux = "<b>MULTILINESTRING</b>";<br>
break;<br>
case POLYGON2D:<br>
aux = "<b>MULTIPOLYGON</b>";<br>
break;<br>
case MULTI2D:<br>
aux = "<b>GEOMETRY</b>";<br>
break;<br>
case MULTIPOINT:<br>
aux = "<b>MULTIPOINT</b>";<br>
break;<br>
<br>
<br>
If you need to mix LINESTRING and MULTILINESTRING, I advice you to set
geometry type to MULTILINESTRING always, although GEOMETRY will be ok
also, but then your layer will be treated like a DXF, DGN or DWG
(multiple types of geometries).<br>
More info about adding geometry columns in PostGIS:<br>
<a class="moz-txt-link-freetext" href="http://postgis.refractions.net/documentation/manual-1.3/ch06.html">http://postgis.refractions.net/documentation/manual-1.3/ch06.html</a><br>
(You can try this function: <span class="term">Probe_Geometry_Columns()).</span><br>
<br>
But I think this shouldn't be the problem. What is the name of your
layer?.<br>
The code to select geometry fields in Postgis gvSIG driver is this:<br>
<br>
String[] tokens = table_name.split("\\u002E", 2);<br>
String sql;<br>
if (tokens.length > 1)<br>
{<br>
sql = "select * from GEOMETRY_COLUMNS WHERE F_TABLE_SCHEMA
= '"<br>
+ tokens[0] + "' AND F_TABLE_NAME = '" +<br>
tokens[1] + "'";<br>
}<br>
else<br>
{<br>
sql = "select * from GEOMETRY_COLUMNS" +<br>
" where F_TABLE_SCHEMA = current_schema() AND F_TABLE_NAME
= '" + table_name + "'";<br>
<br>
}<br>
<br>
ResultSet rs = stAux.executeQuery(sql);<br>
while (rs.next())<br>
{<br>
String geomCol = rs.getString("F_GEOMETRY_COLUMN");<br>
list.add(geomCol);<br>
}<br>
rs.close(); stAux.close();<br>
<br>
<br>
<br>
This means that you can't use the character "." (period) in your table
name. Otherwise, it will be treated as your schema (for example,
public.tablename).<br>
<br>
Hopes it helps. Please, if you find the problem, let us know... I'm
curious :-)<br>
<br>
Fran Peñarrubia<br>
<a class="moz-txt-link-abbreviated" href="http://www.scolab.es">www.scolab.es</a><br>
<br>
<br>
Johannes Valenta escribió:
<blockquote
cite="mid:508eb2870910130953w7f0152b0q5e3db211f79d859a@mail.gmail.com"
type="cite">Hi list,<br>
<br>
after examining my postgis-layer more carefully I found out that I
mixed up Linestrings and Multilinestrings.<br>
This probably caused all the trouble as gvSIG does not know how to
handle this mix.<br>
Well, I am cleaning my layer...<br>
Thanks all!<br>
<br>
Johannes<br>
<br>
<div class="gmail_quote">2009/10/13 Johannes Valenta <span dir="ltr"><<a
moz-do-not-send="true" href="mailto:spatialjoe@googlemail.com">spatialjoe@googlemail.com</a>></span><br>
<blockquote class="gmail_quote"
style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div>Hi Fran, hi Vladimir,</div>
<div> </div>
<div>thanks for the input. </div>
<div>I think Fran is right with changing the fieldname "length" to
something else.</div>
<div>I ruled out any typos and also the table name should be no
problem.</div>
<div>My server is not public and I will have a look at my database
in the evening.</div>
<div>
<div>Regarding the geometry_columns table in Postgis everthing is
fine.</div>
<div> </div>
</div>
<div>Many thanks so far,</div>
<div> </div>
<div>Johannes<br>
</div>
<div class="gmail_quote">2009/10/13 Vladimir Peric <span dir="ltr"><<a
moz-do-not-send="true" href="mailto:vladimir.peric@beogis.com"
target="_blank">vladimir.peric@beogis.com</a>></span>
<div>
<div class="h5"><br>
<blockquote class="gmail_quote"
style="border-left: 1px solid rgb(204, 204, 204); margin: 0px 0px 0px 0.8ex; padding-left: 1ex;">Hi,<br>
<br>
I had the same problem and here is what solved the problem in my case.
In order GvSig to recognize the table as a layer candidate, there
should exist a table in PostreSQL, named <b>geometry_columns</b>. For
each table in the database that has a geometry column, a corresponding
row in the table <b>geometry_columns</b> should be present. The row in
this table can be manually added if needed.<br>
<br>
Hope this will help.<br>
<br>
Cheers,<br>
Vladimir
<div>
<div><br>
<br>
<br>
<br>
<br>
<div class="gmail_quote">On Tue, Oct 13, 2009 at 9:22 AM,
Johannes Valenta <span dir="ltr"><<a moz-do-not-send="true"
href="mailto:spatialjoe@googlemail.com" target="_blank">spatialjoe@googlemail.com</a>></span>
wrote:<br>
<blockquote class="gmail_quote"
style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div>Hi Virginia, <br>
thank you for responding. I am not able to choose the geometry column
within the listbox - it just stays blank. That's the problem.<br>
What could be the reason?<br>
</div>
<div>Best,</div>
<div> </div>
<div>Johannes<br>
<br>
</div>
<div class="gmail_quote">2009/10/13 virginia morales segura <span
dir="ltr"><<a moz-do-not-send="true"
href="mailto:morales_vir@gva.es" target="_blank">morales_vir@gva.es</a>></span>
<div>
<div><br>
<blockquote class="gmail_quote"
style="border-left: 1px solid rgb(204, 204, 204); margin: 0px 0px 0px 0.8ex; padding-left: 1ex;">Hi
Johannes,<br>
<br>
you must can to choose your geometry column at listbox of geometry. If<br>
you say that you have the column type geometry, you should choose it.<br>
Can you send us the layer that goes wrong.<br>
<br>
Regards.<br>
<br>
<br>
Johannes Valenta escribió:<br>
<div>
<div>> Hi list,<br>
><br>
> today I encountered a strange phenomenon. I tried to load a<br>
> postgis-layer into projects of both versions (1.1.2, 1.9 build1245)<br>
> which did not work.<br>
> In both versions the geometry column would not show up in the<br>
> corresponding field although I registered the layer in the
"geometry<br>
> columns" table in postgis as usual.<br>
> All other layers within my database work fine.<br>
> These are the columns of my layer:<br>
> pid integer,<br>
> highway text,<br>
> tracktype text,<br>
> label3 text,<br>
> belag numeric,<br>
> wegbreite numeric,<br>
> landnutz numeric,<br>
> length double precision,<br>
> the_geom geometry,<br>
> summe integer,<br>
> pid1 serial NOT NULL<br>
><br>
> Exporting the layer from postgis to shp and adding it to gvSIG
works<br>
> (so I obviously did not mess up the geometry type).<br>
> Any ideas /hints?<br>
><br>
> Best,<br>
><br>
> Johannes<br>
</div>
</div>
>
------------------------------------------------------------------------<br>
><br>
> _______________________________________________<br>
> Gvsig_internacional mailing list<br>
> <a moz-do-not-send="true"
href="mailto:Gvsig_internacional@listserv.gva.es" target="_blank">Gvsig_internacional@listserv.gva.es</a><br>
> <a moz-do-not-send="true"
href="http://listserv.gva.es/cgi-bin/mailman/listinfo/gvsig_internacional"
target="_blank">http://listserv.gva.es/cgi-bin/mailman/listinfo/gvsig_internacional</a><br>
><br>
<br>
_______________________________________________<br>
Gvsig_internacional mailing list<br>
<a moz-do-not-send="true"
href="mailto:Gvsig_internacional@listserv.gva.es" target="_blank">Gvsig_internacional@listserv.gva.es</a><br>
<a moz-do-not-send="true"
href="http://listserv.gva.es/cgi-bin/mailman/listinfo/gvsig_internacional"
target="_blank">http://listserv.gva.es/cgi-bin/mailman/listinfo/gvsig_internacional</a><br>
</blockquote>
</div>
</div>
</div>
<br>
<br>
_______________________________________________<br>
Gvsig_internacional mailing list<br>
<a moz-do-not-send="true"
href="mailto:Gvsig_internacional@listserv.gva.es" target="_blank">Gvsig_internacional@listserv.gva.es</a><br>
<a moz-do-not-send="true"
href="http://listserv.gva.es/cgi-bin/mailman/listinfo/gvsig_internacional"
target="_blank">http://listserv.gva.es/cgi-bin/mailman/listinfo/gvsig_internacional</a><br>
<br>
</blockquote>
</div>
<br>
<br clear="all">
<br>
</div>
</div>
-- <br>
Vladimir Perić<br>
General Manager<br>
BEOGIS d.o.o. Beograd<br>
Milutina Milankovića 130/109, Novi Beograd<br>
<br>
mob: +381642040889<br>
tel: +381112122810<br>
mail: <a moz-do-not-send="true"
href="mailto:vladimir.peric@beogis.com" target="_blank">vladimir.peric@beogis.com</a><br>
skype: vlada.peric<br>
site: <a moz-do-not-send="true" href="http://www.beogis.com/"
target="_blank">www.beogis.com</a><br>
<br>
_______________________________________________<br>
Gvsig_internacional mailing list<br>
<a moz-do-not-send="true"
href="mailto:Gvsig_internacional@listserv.gva.es" target="_blank">Gvsig_internacional@listserv.gva.es</a><br>
<a moz-do-not-send="true"
href="http://listserv.gva.es/cgi-bin/mailman/listinfo/gvsig_internacional"
target="_blank">http://listserv.gva.es/cgi-bin/mailman/listinfo/gvsig_internacional</a><br>
<br>
</blockquote>
</div>
</div>
</div>
<br>
</blockquote>
</div>
<br>
<pre wrap="">
<hr size="4" width="90%">
_______________________________________________
Gvsig_internacional mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Gvsig_internacional@listserv.gva.es">Gvsig_internacional@listserv.gva.es</a>
<a class="moz-txt-link-freetext" href="http://listserv.gva.es/cgi-bin/mailman/listinfo/gvsig_internacional">http://listserv.gva.es/cgi-bin/mailman/listinfo/gvsig_internacional</a>
</pre>
</blockquote>
<br>
</body>
</html>