<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.6000.16809" name=GENERATOR></HEAD>
<BODY text=#000000 bgColor=#ffffff>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN class=594145415-09032009>Try
OpenJump with the dbquery plugin. You don't even need the
view.</SPAN></FONT></DIV>
<DIV><FONT face=Arial color=#0000ff size=2></FONT> </DIV>
<DIV><SPAN class=594145415-09032009><FONT face=Arial color=#0000ff
size=2>-Eric</FONT></SPAN></DIV>
<BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px">
<DIV class=OutlookMessageHeader dir=ltr align=left><FONT face=Tahoma
size=2>-----Original Message-----<BR><B>From:</B>
postgis-users-bounces@postgis.refractions.net
[mailto:postgis-users-bounces@postgis.refractions.net]<B>On Behalf Of
</B>Martin Fafard<BR><B>Sent:</B> Monday, March 09, 2009 11:11
AM<BR><B>To:</B> PostGIS Users Discussion<BR><B>Subject:</B> Re:
[postgis-users] PostGIS view in qgis<BR><BR></FONT></DIV>Eduin<BR><BR>Thank
you for the answer but it doesn't work. Since I create new objects from a view
(polygonize), it seem to be impossible to create a unique id in this view for
these objects. Someone else have ever aggregate geom in a view to see it in
qgis or other viewer??<BR><BR>Martin F<BR><BR>Eduin Yezid Carrillo Vega a
écrit :
<BLOCKQUOTE
cite=mid:75b8f7010903090440s3e848898o4956e575460be99a@mail.gmail.com
type="cite"><PRE wrap="">If your postgresql version is 8.0 or less you can use OID fields as
key identifier.
CREATE VIEW myview AS SELECT oid AS gid, the_geom FROM mytable;
In postgresql 8.3 you can force oid creation if WITH OIDS is specified
when the table is created
Eduin Yesid Carrillo Vega
Ingeniero Civil, Esp. Sistemas de Información Geográfica
Centro de Investigación y Desarrollo en Información Geográfica
Instituto Geográfico Agustín Codazzi - IGAC
Cr 30 48-51
Tel +57 1 3694000 ext 4593
Bogotá D.C., Colombia
On Mon, Mar 9, 2009 at 2:43 AM, Marc Jansen <A class=moz-txt-link-rfc2396E href="mailto:jansen.marc@gmx.de"><jansen.marc@gmx.de></A> wrote:
</PRE>
<BLOCKQUOTE type="cite"><PRE wrap="">HI Martin,
Martin Fafard schrieb:
</PRE>
<BLOCKQUOTE type="cite"><PRE wrap="">Hi
I polygonize linestrings in a view to see the result in qgis. But qgis
need gid. How can I create the gid column after an aggregate function in a
view?
</PRE></BLOCKQUOTE><PRE wrap="">AFAIK you can't. Maybe a table (created by your query) with a serial /
primary key helps.
--Marc
</PRE>
<BLOCKQUOTE type="cite"><PRE wrap="">Martin F
_______________________________________________
postgis-users mailing list
<A class=moz-txt-link-abbreviated href="mailto:postgis-users@postgis.refractions.net">postgis-users@postgis.refractions.net</A>
<A class=moz-txt-link-freetext href="http://postgis.refractions.net/mailman/listinfo/postgis-users">http://postgis.refractions.net/mailman/listinfo/postgis-users</A>
</PRE></BLOCKQUOTE><PRE wrap="">_______________________________________________
postgis-users mailing list
<A class=moz-txt-link-abbreviated href="mailto:postgis-users@postgis.refractions.net">postgis-users@postgis.refractions.net</A>
<A class=moz-txt-link-freetext href="http://postgis.refractions.net/mailman/listinfo/postgis-users">http://postgis.refractions.net/mailman/listinfo/postgis-users</A>
</PRE><PRE wrap=""><HR width="90%" SIZE=4>
No virus found in this incoming message.
Checked by AVG - <A class=moz-txt-link-abbreviated href="http://www.avg.com">www.avg.com</A>
Version: 8.0.237 / Virus Database: 270.11.9/1990 - Release Date: 03/08/09 17:17:00
</PRE></BLOCKQUOTE></BLOCKQUOTE></BLOCKQUOTE></BODY></HTML>