<div>Hi Jason, </div>
<div> </div>
<div>You could try a DATA string something like this ... </div>
<div> </div>
<div>DATA "the_geom FROM (SELECT * FROM sounding.sdgonly_20050722point WHERE elevation > 0 AND mod(gid, 300) = 1 GROUP BY the_geom HAVING max(dispx) > 86738) AS foo USING UNIQUE gid USING SRID=26910"</div>
<div> </div>
<div>.... I've capitalized the SQL keywords just to make them more readable. The DATA string should all be on one line (not sure how this will post to the list).</div>
<div>.... Use the appropriate SRID number in place of 26910, representing the projection of your data. </div>
<div> </div>
<div>Cheers,<br>Ken Lord</div>
<div>Vancouver BC</div><br><br>
<div><span class="gmail_quote">On 8/15/05, <b class="gmail_sendername">Jason FU</b> <<a href="mailto:tsfu@hkucs.org">tsfu@hkucs.org</a>> wrote:</span>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">What do I do for the sql statement as follows:<br><br>select the_geom from sounding.sdgonly_20050722point
<br>where elevation > 0 and mod(gid, 300) = 1<br>group by the_geom<br>having max(dispx) > 86738<br><br>?<br><br>================================================================<br><br>CREATE TABLE sounding.sdgonly_20050722point
<br>(<br>gid serial NOT NULL,<br>recno int8,<br>elevation float8,<br>dataflags int8,<br>dispx float8,<br>dispy float8,<br>size float8,<br>angle float8,<br>scale int8,<br>keyword varchar,<br>usernum int8,<br>fcode varchar,
<br>datatype int4,<br>descflags int8,<br>themenum int8,<br>indexkey varchar,<br>superflags int8,<br>sourceid varchar,<br>the_geom geometry,<br>CONSTRAINT sdgonly_20050722point_pkey PRIMARY KEY (gid),<br>CONSTRAINT enforce_dims_the_geom CHECK (ndims(the_geom) = 2),
<br>CONSTRAINT enforce_geotype_the_geom CHECK (geometrytype(the_geom) =<br>'POINT'::text OR the_geom IS NULL),<br>CONSTRAINT enforce_srid_the_geom CHECK (srid(the_geom) = -1)<br>)<br>WITH OIDS;<br>================================================================
<br>I tried this one in MapServer but it doesn't work at all.<br><br>DATA "the_geom from sounding.sdgonly_20050722point"<br>FILTER " (elevation > 0 and mod(gid, 300) = 1) # group by the_geom "<br><br>
Please advise.<br><br>Thanks.<br><br>Jason<br></blockquote></div>