Yeah, you pointed out a very valid point. <br>As open layers handled my map file in an efficient manner, I didn&#39;t overloaded myself with implementation of Tiling. <br><br>But, there is one more serious thought. Lets try to understand this problem: 
<br><br>Example: <br><br>Layer 1 : [shapefile] Roads of a country. <br><br>The attributes of this road layer changes w.r.t. zoom-levels. For instance, at higher zoom level roads seems thinner, and at lower it seems broader. 
<br>So, for these zoom-levels, I used Maxscale/Minscale values and developed multiple layers for this Layer.<br><br>Layer 2: [shapefile] Roads of a state <br><br>The above case is true with this layer too. <br><br>I hope this could magnify my problem. 
<br><br>Regards,<br>Ritz<br><br><div class="gmail_quote">On Jan 24, 2008 8:55 PM, Fawcett, David &lt;<a href="mailto:David.Fawcett@state.mn.us">David.Fawcett@state.mn.us</a>&gt; wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
You mention creating individual layers for each shapefile. &nbsp;So, does<br>this mean that if you have a shapefile of road data for each state you<br>are creating a MapServer layer for each shapefile?<br><br>If this is the case, you can definitely reduce the number of layers (and
<br>likely increase performance) by using a tileindex.<br><br>A tileindex is a polygon dataset, usually a shapefile, with a polygon<br>that defines the boundaries of each individual dataset. &nbsp;In other words,<br>you would use a utility to create a new shapefile with polygons that
<br>define the boundaries of each of your state road shapefiles. &nbsp;In the<br>attribute table of your tileindex, there is a column that tells<br>MapServer where to find the actual shapefile represented by a particular<br>feature.
<br><br>You then create just one layer using the tileindex as the data source.<br>Take a look at: &nbsp;<a href="http://mapserver.gis.umn.edu/docs/howto/tileindex" target="_blank">http://mapserver.gis.umn.edu/docs/howto/tileindex
</a> if<br>you haven&#39;t already.<br><br>David.<br><div class="Ih2E3d"><br>-----Original Message-----<br>From: UMN MapServer Users List [mailto:<a href="mailto:MAPSERVER-USERS@LISTS.UMN.EDU">MAPSERVER-USERS@LISTS.UMN.EDU
</a>] On<br>Behalf Of riteshambastha<br></div><div class="Ih2E3d">Sent: Thursday, January 24, 2008 9:16 AM<br>To: <a href="mailto:MAPSERVER-USERS@LISTS.UMN.EDU">MAPSERVER-USERS@LISTS.UMN.EDU</a><br>Subject: Re: [UMN_MAPSERVER-USERS] Map file with 35,000+ Lines...
<br>management issue<br><br><br></div>Dear Stephen,<br><br>The number of layers exceeded much because I am including each<br>individual shapefile multiple times for different Maxcale/Minscale<br>values. &nbsp;So, a shapefile is now called by 3-4 layers, each layer having
<br>different Maxscale/Minscale values.<br><br>I hope I made my point clear.<br><br>Regards,<br>Ritz<br><br><br>Stephen Woodbridge wrote:<br>&gt;<br>&gt; Ok, I need to ask the obvious question, WHY? do you feel you need 658
<br>&gt; layers. Is this because you have lots of shapefiles? and most of the<br>&gt; layer definitions are the same except for the data source?<br>&gt;<br>&gt; For Tiger data I have 33000 shapefiles, but I only have about 20+-
<br>&gt; layers. Are you using tileindexes? Do you know what they are? Just<br>&gt; trying to diagnose your situation a little better so we can help.<br>&gt;<br>&gt; -Steve W<br><div><div></div><div class="Wj3C7c">&gt;<br>
&gt; ritesh ambastha wrote:<br>&gt;&gt; Thanks Bob,<br>&gt;&gt;<br>&gt;&gt; The map file consists of 658 Layers.<br>&gt;&gt; It runs with openlayers and postgis.<br>&gt;&gt;<br>&gt;&gt; Now, am trying to sort out the best way for solving this issue. Your
<br>&gt;&gt; reply helped me to view at the problems+solutions in broad spectrum..<br>&gt;&gt;<br>&gt;&gt; Warm Regards,<br>&gt;&gt; Ritesh<br>&gt;&gt;<br>&gt;&gt; On Jan 24, 2008 1:04 AM, Bob Basques &lt;<a href="mailto:Bob.Basques@ci.stpaul.mn.us">
Bob.Basques@ci.stpaul.mn.us</a>&gt;<br>&gt;&gt; wrote:<br>&gt;&gt;&gt;<br>&gt;&gt;&gt; Ritz,<br>&gt;&gt;&gt;<br>&gt;&gt;&gt; Whew, 35k lines, that big. &nbsp;How many layers is that anyway? &nbsp; The<br>&gt;&gt;&gt; Googlish<br>&gt;&gt;&gt; mapfile I just did only has 1100 lines in it, and that&#39;s mostly for
<br>&gt;&gt;&gt; readability. &nbsp;I could probably get it down to half that size if I<br>&gt;&gt;&gt; tried.<br>&gt;&gt;&gt;<br>&gt;&gt;&gt; Don&#39;t know what I can contribute as a &quot;Best Practice&quot;, because I<br>&gt;&gt;&gt; feel that in most cases, that form follows function, if you need a
<br>&gt;&gt;&gt; capability, you build it. &nbsp;Anyway, here are some of my thoughts.<br>&gt;&gt;&gt;<br>&gt;&gt;&gt; These same sorts of performance questions crossed my mind too. &nbsp;The<br>&gt;&gt;&gt; Googlish mapfile I&#39;ve been working on has 72 separate STYLE
<br>&gt;&gt;&gt; definitions for example.<br>&gt;&gt;&gt; Mostly ranged around threshholding of certain styles. &nbsp;I can see<br>that<br>&gt;&gt;&gt; adding<br>&gt;&gt;&gt; in the Water bodies, Railroad, Parks, and such, is really going to
<br>make<br>&gt;&gt;&gt; this<br>&gt;&gt;&gt; thing big. &nbsp;I may just do those as separate MapFiles though since<br>&gt;&gt;&gt; GeoMoose<br>&gt;&gt;&gt; handles things like these separations very nicely.<br>&gt;&gt;&gt;<br>
&gt;&gt;&gt; These are some of the primary reasons that contributed to the way<br>&gt;&gt;&gt; we&#39;ve built GeoMoose as a client and why it runs against MapServer<br>&gt;&gt;&gt; CGI, so that it can abstract the layer calls in this fashion. &nbsp;We&#39;re
<br><br>&gt;&gt;&gt; running 135+ layers internally at the moment, and they all have<br>&gt;&gt;&gt; their own MAPFILE and are all<br>&gt;&gt;&gt; called separately from the client. &nbsp;It has made life much easier<br>with<br>
&gt;&gt;&gt; regard<br>&gt;&gt;&gt; to MapFile creation and maintenance, since each data custodian<br>handles<br>&gt;&gt;&gt; their<br>&gt;&gt;&gt; respective MAPFILE. &nbsp;The performance issues are minimized well since<br>&gt;&gt;&gt; even
<br>&gt;&gt;&gt; the data intensive layers are not too bad from a performance<br>standpoint.<br>&gt;&gt;&gt;<br>&gt;&gt;&gt; But even my Googlish looking mapfile got prettty big (in my opinion)<br>for<br>&gt;&gt;&gt; simply displaying centerlines of streets. &nbsp; I&#39;ve learned quite a bit
<br>&gt;&gt;&gt; from<br>&gt;&gt;&gt; these exercises about these types of questions. &nbsp;While I have yet to<br><br>&gt;&gt;&gt; attack the performance side of things, I anticpate that I&#39;ll need to<br><br>&gt;&gt;&gt; segregate the
<br>&gt;&gt;&gt; data out at differing thresholds in order to gain some performance<br>&gt;&gt;&gt; boots.<br>&gt;&gt;&gt; We&#39;re all about doing dynamic requests here since many of our<br>datasets<br>&gt;&gt;&gt; change very frequently, in some cases, down to the minute. &nbsp;I may
<br>look<br>&gt;&gt;&gt; into<br>&gt;&gt;&gt; tiling at some point in the future, but it will still be only for<br>some<br>&gt;&gt;&gt; of<br>&gt;&gt;&gt; the layers, there will still be a need to have this dynamic request
<br>&gt;&gt;&gt; structure in place.<br>&gt;&gt;&gt;<br>&gt;&gt;&gt; bobb<br>&gt;&gt;&gt;<br>&gt;&gt;&gt;<br>&gt;&gt;&gt;<br>&gt;&gt;&gt;<br>&gt;&gt;&gt;<br>&gt;&gt;&gt;<br>&gt;&gt;&gt; Bob Basques<br>&gt;&gt;&gt; GIS Systems Developer
<br>&gt;&gt;&gt; City of Saint Paul, MN<br>&gt;&gt;&gt;<br>&gt;&gt;&gt;<br>&gt;&gt;&gt; GISmo<br>&gt;&gt;&gt; Powered by<br>&gt;&gt;&gt; GeoMOOSE<br>&gt;&gt;&gt;<br>&gt;&gt;&gt;<br>&gt;&gt;&gt;&gt;&gt;&gt; riteshambastha &lt;
<a href="mailto:ritesh.linux@GMAIL.COM">ritesh.linux@GMAIL.COM</a>&gt; wrote:<br>&gt;&gt;&gt; Dear Readers,<br>&gt;&gt;&gt;<br>&gt;&gt;&gt; I have developed a map file with more than 35,000 Lines. Its size<br>&gt;&gt;&gt; will grow by double/triple in next few months. Now, I am trying to
<br>&gt;&gt;&gt; tune my map file by<br>&gt;&gt;&gt; removing unwanted lines. Still, I am bit confused about its<br>maintenance.<br>&gt;&gt;&gt;<br>&gt;&gt;&gt;<br>&gt;&gt;&gt; Please throw some lights over writing map files by following best
<br>&gt;&gt;&gt; practices.<br>&gt;&gt;&gt;<br>&gt;&gt;&gt; Thanks in advance.<br>&gt;&gt;&gt;<br>&gt;&gt;&gt; Regards,<br>&gt;&gt;&gt; Ritz<br>&gt;&gt;&gt; --<br>&gt;&gt;&gt; View this message in context:<br>&gt;&gt;&gt; 
<a href="http://www.nabble.com/Map-file-with-35,000+-Lines...-management-issu" target="_blank">http://www.nabble.com/Map-file-with-35,000+-Lines...-management-issu</a><br>&gt;&gt;&gt; e-tp15048892p15048892.html<br>&gt;&gt;&gt;
<br>&gt;&gt;&gt; Sent from the Mapserver - User mailing list archive at <a href="http://Nabble.com" target="_blank">Nabble.com</a>.<br>&gt;&gt;&gt;<br>&gt;&gt;<br>&gt;&gt;<br>&gt;&gt;<br>&gt;<br>&gt;<br><br>--<br>View this message in context:
<br></div></div><div class="Ih2E3d"><a href="http://www.nabble.com/Map-file-with-35%2C000%2B-Lines...-management-issu" target="_blank">http://www.nabble.com/Map-file-with-35%2C000%2B-Lines...-management-issu</a><br></div>
e-tp15048892p15065742.html<br><div><div></div><div class="Wj3C7c">Sent from the Mapserver - User mailing list archive at <a href="http://Nabble.com" target="_blank">Nabble.com</a>.<br></div></div></blockquote></div><br><br clear="all">
<br>-- <br>Ritesh Ambastha,<br><br>Project Manager<br>Mobiance Technologies,<br>Bangalore<br><br>+91-80-41264755