<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 12pt;
font-family:Calibri
}
--></style></head>
<body class='hmmessage'><div dir='ltr'><div>Thomas,</div><div><br></div><div>Here is my complete map file when all the postgis layers are combined. Like I said, I can call all of these layers</div><div>if I put just one layer in a .map file but can't get it to work with more than one.</div><div><br></div><div>Thanks!</div><div><br></div><div>MAP</div><div> DEBUG 5</div><div> CONFIG "MS_ERRORFILE" "/media/D_Drive/www/gis/logs/error_file.log"<span class="Apple-tab-span" style="white-space:pre"> </span></div><div> EXTENT -126 25 -64 50</div><div> #EXTENT -123 47 -122 48 </div><div> IMAGECOLOR<span class="Apple-tab-span" style="white-space:pre"> </span>153 179 204</div><div> IMAGETYPE<span class="Apple-tab-span" style="white-space:pre"> </span>PNG24</div><div> SHAPEPATH<span class="Apple-tab-span" style="white-space:pre"> </span>data/</div><div> FONTSET<span class="Apple-tab-span" style="white-space:pre"> </span>data/fonts/fonts.list</div><div> SIZE 1000 500</div><div> #SIZE 800 800</div><div> #SCALEDENOM 50000 </div><div> UNITS DD</div><div><span class="Apple-tab-span" style="white-space:pre"> </span></div><div> PROJECTION</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>"+proj=longlat +ellps=WGS84"</div><div> END</div><div><span class="Apple-tab-span" style="white-space:pre"> </span></div><div> OUTPUTFORMAT</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>NAME<span class="Apple-tab-span" style="white-space:pre"> </span>png</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>DRIVER<span class="Apple-tab-span" style="white-space:pre"> </span>"AGG/PNG"</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>MIMETYPE<span class="Apple-tab-span" style="white-space:pre"> </span>"image/png"</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>IMAGEMODE<span class="Apple-tab-span" style="white-space:pre"> </span>RGBA</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>EXTENSION<span class="Apple-tab-span" style="white-space:pre"> </span>"png"</div><div> END</div><div><span class="Apple-tab-span" style="white-space:pre"> </span></div><div> WEB</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>IMAGEPATH<span class="Apple-tab-span" style="white-space:pre"> </span>"/media/D_Drive/www/gis/tmp/"</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>IMAGEURL<span class="Apple-tab-span" style="white-space:pre"> </span>"gis/tmp/"</div><div> END</div><div><br></div><div> SYMBOL</div><div> NAME "circle"</div><div> TYPE ELLIPSE</div><div> FILLED TRUE</div><div> POINTS 1 1 END</div><div> END</div><div><br></div><div> LAYER</div><div> NAME states</div><div> DATA STATES</div><div> STATUS ON</div><div> TYPE Polygon</div><div> </div><div> CLASS</div><div> OUTLINECOLOR 255 255 255</div><div> COLOR 155 155 155</div><div> END # Class</div><div> END # Layer</div><div><br></div><div> LAYER</div><div> NAME business_rd1</div><div> CONNECTIONTYPE POSTGIS</div><div> CONNECTION "host=localhost dbname=Business user=postgres password=xxxx port=5432"</div><div> DATA "geom From business_rd1 as rd1 using unique id using srid=4326" </div><div> PROCESSING "CLOSE_CONNECTION=DEFER"</div><div> #MINSCALE 10000000 </div><div><span class="Apple-tab-span" style="white-space:pre"> </span>STATUS ON</div><div> TYPE POINT</div><div> CLASS</div><div> SYMBOL 'circle'</div><div> SIZE 2</div><div> COLOR 255 0 0 </div><div> END</div><div> END # Class</div><div> END # Layer</div><div><br></div><div> LAYER</div><div> NAME business_rd2</div><div> CONNECTIONTYPE POSTGIS</div><div> CONNECTION "host=localhost dbname=Business user=postgres password=xxxxx port=5432"</div><div> DATA "geom From business_rd2 as rd2 using unique id using srid=4326" </div><div> PROCESSING "CLOSE_CONNECTION=DEFER"</div><div> #MINSCALE 1000000 </div><div><span class="Apple-tab-span" style="white-space:pre"> </span>STATUS ON</div><div> TYPE POINT</div><div> CLASS</div><div> SYMBOL 'circle'</div><div> SIZE 2</div><div> COLOR 0 255 0</div><div> END</div><div> END # Class</div><div> END # Layer</div><div> </div><div> LAYER</div><div> NAME business_rd3</div><div> CONNECTIONTYPE POSTGIS</div><div> CONNECTION "host=localhost dbname=Business user=postgres password=xxxx port=5432"</div><div> DATA "geom From business_rd3 as rd3 using unique id using srid=4326" </div><div> PROCESSING "CLOSE_CONNECTION=DEFER"</div><div> #MINSCALE 100000 </div><div><span class="Apple-tab-span" style="white-space:pre"> </span>STATUS ON</div><div> TYPE POINT</div><div> CLASS</div><div> SYMBOL 'circle'</div><div> SIZE 2</div><div> COLOR 0 0 255 </div><div> END</div><div> END # Class</div><div> END # Layer</div><div><br></div><div> LAYER</div><div> NAME business_rd4</div><div> CONNECTIONTYPE POSTGIS</div><div> CONNECTION "host=localhost dbname=Business user=postgres password=xxxxx port=5432"</div><div> DATA "geom From business_rd4 as rd4 using unique id using srid=4326" </div><div> PROCESSING "CLOSE_CONNECTION=DEFER"</div><div> #MINSCALE 10000 </div><div><span class="Apple-tab-span" style="white-space:pre"> </span>STATUS ON</div><div> TYPE POINT</div><div> CLASS</div><div> SYMBOL 'circle'</div><div> SIZE 2</div><div> COLOR 255 0 255 </div><div> END</div><div> END # Class</div><div> END # Layer</div><div>END # Map File</div><div><br></div><br>Michael McInnis
6033 44th Ave. N.E.
Seattle, WA 98115
206 517-4701<br><br><div>> Date: Fri, 9 Aug 2013 17:44:02 +0200<br>> Subject: Re: [mapserver-users] drawing multiple layers from postgis<br>> From: thomas.bonfort@gmail.com<br>> To: mmcinnis59@msn.com<br>> CC: mapserver-users@lists.osgeo.org<br>> <br>> https://github.com/mapserver/mapserver/issues/2922<br>> <br>> On 9 August 2013 17:40, Michael McInnis <mmcinnis59@msn.com> wrote:<br>> ><br>> > I'm pretty sure that END is correctly ending the Symbol Clause.<br>> ><br>> > The odd thing about this is I can draw all four layers if I call them<br>> > separately but when I try to<br>> > call them through php only numbers 1 and 3 work. All layers were generated<br>> > the same way in<br>> > postgresql/postgis (see sql below).<br>> ><br>> > I'm going to regenerate layers 2 and 4 just in case but I think it's a<br>> > problem with php/ms_script.<br>> ><br>> > // All these work<br>> ><br>> > http://localhost/cgi-bin/mapserv?map=/media/D_Drive/www/gis/business1.map&layers=business_rd1%20states&mode=map<br>> ><br>> > http://localhost/cgi-bin/mapserv?map=/media/D_Drive/www/gis/business2.map&layers=business_rd2%20states&mode=map<br>> ><br>> > http://localhost/cgi-bin/mapserv?map=/media/D_Drive/www/gis/business3.map&layers=business_rd3%20states&mode=map<br>> ><br>> > http://localhost/cgi-bin/mapserv?map=/media/D_Drive/www/gis/business4.map&layers=business_rd4%20states&mode=map<br>> ><br>> ><br>> ><br>> > // Half of these work<br>> ><br>> > http://mapserver0/business.php?num=1 works<br>> ><br>> > http://mapserver0/business.php?num=2 not<br>> ><br>> > http://mapserver0/business.php?num=3 works<br>> ><br>> > http://mapserver0/business.php?num=4 not<br>> ><br>> ><br>> ><br>> > // All these work<br>> ><br>> > http://localhost/cgi-bin/mapserv?map=/media/D_Drive/www/gis/business1.map&layers=business_rd1%20states&mode=map<br>> ><br>> > http://localhost/cgi-bin/mapserv?map=/media/D_Drive/www/gis/business2.map&layers=business_rd2%20states&mode=map<br>> ><br>> > http://localhost/cgi-bin/mapserv?map=/media/D_Drive/www/gis/business3.map&layers=business_rd3%20states&mode=map<br>> ><br>> > http://localhost/cgi-bin/mapserv?map=/media/D_Drive/www/gis/business4.map&layers=business_rd4%20states&mode=map<br>> ><br>> ><br>> ><br>> > // Half of these work<br>> ><br>> > http://mapserver0/business.php?num=1 works<br>> ><br>> > http://mapserver0/business.php?num=2 not<br>> ><br>> > http://mapserver0/business.php?num=3 works<br>> ><br>> > http://mapserver0/business.php?num=4 not<br>> ><br>> ><br>> > // Create rounded lat lon table<br>> ><br>> > Select count(*), round(cast(ST_X(geom) as numeric),2) as lon,<br>> ><br>> > round(cast(ST_Y(geom) as numeric),2) as lat<br>> ><br>> > Into business_rd2<br>> ><br>> > From business_loc<br>> ><br>> > Group By round(cast(ST_X(geom) as numeric),2), round(cast(ST_Y(geom) as<br>> > numeric),2)<br>> ><br>> > Order By count Desc<br>> ><br>> ><br>> ><br>> > // Add Geometry<br>> ><br>> > Alter Table business_rd2 Add Column geom geometry(POINT,4326);<br>> ><br>> > Update business_rd2 Set geom = ST_SetSRID(ST_MakePoint(lon,lat),4326);<br>> ><br>> > Create Index indx_business_rd2_geom On business_rd2 Using GIST(geom);<br>> ><br>> ><br>> ><br>> > // Now add a primary key named id to enable mapserver drawing<br>> ><br>> > Alter Table business_rd2 Add Column id BIGSERIAL Primary Key;<br>> ><br>> ><br>> ><br>> >> Date: Fri, 9 Aug 2013 12:23:52 +0200<br>> >> Subject: Re: [mapserver-users] drawing multiple layers from postgis<br>> >> From: thomas.bonfort@gmail.com<br>> >> To: mmcinnis59@msn.com<br>> >><br>> >> On 8 August 2013 20:16, Michael McInnis <mmcinnis59@msn.com> wrote:<br>> >> > Hopefully, this is an easy one.<br>> >> ><br>> >> > I'm trying to build a scale sensitive .map file using points from<br>> >> > postgis.<br>> >> ><br>> >> > I can successfully draw the shapefile states with a single points layer<br>> >> > from<br>> >> > postgis.<br>> >> > However, if I add an additional points layer and attempt to draw it the<br>> >> > layer comes up blank.<br>> >> > If I remove the leading postgis points layer from the .map file the new<br>> >> > points layer will now display.<br>> >> > IE I can only draw the first occurrence of a postgis layer in the map<br>> >> > file.<br>> >> ><br>> >> > How do you define multiple postgis layers so that you can pick and<br>> >> > choose<br>> >> > layers for display?<br>> >> ><br>> >> > LAYER<br>> >> > NAME states<br>> >> > DATA STATES<br>> >> > STATUS ON<br>> >> > TYPE Polygon<br>> >> ><br>> >> > CLASS<br>> >> > OUTLINECOLOR 255 255 255<br>> >> > COLOR 155 155 155<br>> >> > END # Class<br>> >> > END # Layer<br>> >> ><br>> >> > LAYER<br>> >> > CONNECTIONTYPE POSTGIS<br>> >> > NAME business_rd2<br>> >> > CONNECTION "host=localhost dbname=Business user=postgres<br>> >> > password=xxxx port=5432"<br>> >> > PROCESSING "CLOSE_CONNECTION=DEFER"<br>> >> > DATA "geom From business_rd2 as rd2 using unique id using srid=4326"<br>> >> > #MINSCALE 100000<br>> >> > STATUS ON<br>> >> > TYPE POINT<br>> >> > CLASS<br>> >> > SYMBOL 'circle'<br>> >> > SIZE 2<br>> >> > COLOR 255 0 0<br>> >> > END<br>> >> this END is bogus<br>> >><br>> >> > END # Class<br>> >> > END # Layer<br>> >> ><br>> >> > LAYER<br>> >> > CONNECTIONTYPE POSTGIS<br>> >> > NAME business_rd1<br>> >> > CONNECTION "host=localhost dbname=Business user=postgres<br>> >> > password=xxxx port=5432"<br>> >> > PROCESSING "CLOSE_CONNECTION=DEFER"<br>> >> > DATA "geom From business_rd1 as rd1 using unique id using srid=4326"<br>> >> > #MINSCALE 100000<br>> >> > STATUS ON<br>> >> > TYPE POINT<br>> >> > CLASS<br>> >> > SYMBOL 'circle'<br>> >> > SIZE 2<br>> >> > COLOR 255 0 0<br>> >> > END<br>> >> this one to<br>> >><br>> >> > END # Class<br>> >> > END # Layer<br>> >> ><br>> >> ><br>> >> > _______________________________________________<br>> >> > mapserver-users mailing list<br>> >> > mapserver-users@lists.osgeo.org<br>> >> > http://lists.osgeo.org/mailman/listinfo/mapserver-users<br>> >> ><br>> ><br>> > _______________________________________________<br>> > mapserver-users mailing list<br>> > mapserver-users@lists.osgeo.org<br>> > http://lists.osgeo.org/mailman/listinfo/mapserver-users<br>> ><br></div> </div></body>
</html>