<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html style="direction: ltr;">
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
<title></title>
</head>
<body style="direction: ltr;" bidimailui-charset-is-forced="true"
bidimailui-detected-decoding-type="latin-charset" bgcolor="#ffffff"
text="#000000">
On 05/19/2011 10:36 PM, Clay, Bruce wrote:
<blockquote
cite="mid:C482FF98AE985A47B8C982FD429C9E34D8C019@daytonmsg2k3.AERO.BALL.COM"
type="cite">
<meta http-equiv="Content-Type" content="text/html;
charset=ISO-8859-1">
<meta content="MSHTML 6.00.6002.18407" name="GENERATOR">
<font color="#000000" face="Arial" size="2">
</font>
<div><font color="#000000" face="Arial" size="2"><br>
This is probably a question for the QGis folks but I wanted to
check here first where ther is likely a larger audience.</font></div>
<div><font color="#000000" face="Arial" size="2"> </font></div>
<div><font color="#000000" face="Arial" size="2">I create several
spatial tables using PostGis and all are visible in QGis on
their own.</font></div>
<div><font color="#000000" face="Arial" size="2"> </font></div>
<div><font color="#000000" face="Arial" size="2">When I create a
view in PostGis that reaches into a variety of tables I see
the name of the view in QGis but the type is "Waiting" and I
get an error indicating that QGis can not load the data
because it is "unable to determine srid and column shape in
<view name>" then it shows an error <view
name>(shape) sql is an invalid layer.</font></div>
</blockquote>
<br>
<br>
You probably need to create an entry in the geometry_columns table
for this new view. Something like:<br>
<br>
INSERT INTO geometry_columns \<br>
(f_table_catalog,f_table_schema,f_table_name,f_geometry_column,srid,type,coord_dimension)
\<br>
VALUES (....);<br>
<br>
or even better, use the PostGIS function addgeometrycolumn()<br>
<br>
<blockquote
cite="mid:C482FF98AE985A47B8C982FD429C9E34D8C019@daytonmsg2k3.AERO.BALL.COM"
type="cite">
<div><font color="#000000" face="Arial" size="2">The SQL is used
to create the view follows:</font></div>
<div><font color="#000000" face="Arial" size="2"> </font></div>
<div><font color="#000000" face="Arial" size="2">CREATE OR REPLACE
VIEW mission_data.S1_objects AS<br>
select M1.object_name, M2.center_lat, m2.center_lon,
M2.scene_id, M2.OID, <br>
ST_Transform(M2.shape,4326) as shape from
mission_data.mission_info M1<br>
join mission_data.objects M2 ON M1.object_name =
M2.object_name <br>
where M1.mission_name = 'E3 Scenario 1' and M1.list_title =
'Object List';</font></div>
<div><font color="#000000" face="Arial" size="2"> </font></div>
<div><font color="#000000" face="Arial" size="2">and I alos tried
a simpler query</font></div>
<div><font color="#000000" face="Arial" size="2"> </font></div>
<div><font color="#000000" face="Arial" size="2">CREATE VIEW
mission_data.S1_test AS<br>
SELECT OID, ST_Transform(shape,4326) As shape, object_name<br>
FROM mission_data.objects;</font></div>
<div><font color="#000000" face="Arial" size="2"> </font></div>
<div><font color="#000000" face="Arial" size="2">but they both
gave the same errors</font></div>
<div><font color="#000000" face="Arial" size="2"> </font></div>
<div><font color="#000000" face="Arial" size="2">I did search the
QGis forum web site but did not find anything clues or
reported issues</font></div>
<div><font color="#000000" face="Arial" size="2"> </font></div>
<div><font color="#000000" face="Arial" size="2">Bruce</font></div>
<div> </div>
<br>
<br>
This mail was received via Mail-SeCure System.<br>
<pre>
This message and any enclosures are intended only for the addressee. Please
notify the sender by email if you are not the intended recipient. If you are
not the intended recipient, you may not use, copy, disclose, or distribute this
message or its contents or enclosures to any other person and any such actions
may be unlawful. Ball reserves the right to monitor and review all messages
and enclosures sent to or from this email address.</pre>
<pre wrap="">
<fieldset class="mimeAttachmentHeader"></fieldset>
_______________________________________________
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>
This mail was received via Mail-SeCure System.
</pre>
</blockquote>
<br>
</body>
</html>