<div>Hi Steve,</div>
<div>&nbsp;</div>
<div>I've tried again like you said, this time I get something, but still no map images are rendered.</div>
<div>&nbsp;</div>
<div>the version is exactly the same, updated version.</div>
<div>&nbsp;</div>
<div>First test example:</div>
<div>&nbsp;</div>
<div>data -- admin.shp (administration area, which includes 5 polygons)</div>
<div>&nbsp;</div>
<div>****</div>
<div>when performing&nbsp;shp2tile command, no parameters are set,&nbsp; and by default the shapefile is sliced into 2*2+1 shapefiles. With the following layer object definition, map image is drawn:</div>
<div>&nbsp;</div>
<div>LAYER<br>&nbsp;&nbsp;&nbsp; NAME &quot;administration&quot;<br>&nbsp;&nbsp;&nbsp; GROUP &quot;country&quot;<br>&nbsp;&nbsp;&nbsp; STATUS DEFAULT<br>&nbsp;&nbsp;&nbsp; TILEINDEX &quot;index&quot;<br>&nbsp;&nbsp;&nbsp; TILEITEM &quot;LOCATION&quot;<br>&nbsp;&nbsp;&nbsp; TYPE POLYGON<br>&nbsp;&nbsp;&nbsp; DEBUG ON<br>&nbsp;&nbsp;&nbsp; TRANSPARENCY ALPHA 
<br>&nbsp;&nbsp;&nbsp; CLASS<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; NAME &quot;woodland&quot;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; STYLE<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; COLOR 204 204 255<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ANTIALIAS TRUE<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; END<br>&nbsp;&nbsp;&nbsp; END<br>&nbsp; END<br>**********</div>
<div>Second test example:</div>
<div>&nbsp;</div>
<div>data -- settlement.shp, which contains 2155664 polygons</div>
<div>&nbsp;</div>
<div>****</div>
<div>when performing&nbsp;shp2tile command for this shapefile, I set 10*10, each slice contians therefore about 21557 polygons. It's also ok with tile4ms and shptree commands.</div>
<div>&nbsp;</div>
<div>hm... seems exciting...</div>
<div>&nbsp;</div>
<div>but, with this layer object definition no settlements&nbsp;are drawn :</div>
<div>&nbsp;</div>
<div>LAYER<br>&nbsp;&nbsp;&nbsp; NAME &quot;Settlement&quot;<br>&nbsp;&nbsp;&nbsp; GROUP &quot;settlements&quot;<br>&nbsp;&nbsp;&nbsp; STATUS DEFAULT<br>&nbsp;&nbsp;&nbsp; TILEINDEX &quot;settlementindex&quot;<br>&nbsp;&nbsp;&nbsp; TILEITEM &quot;LOCATION&quot;<br>&nbsp;&nbsp;&nbsp; MAXSCALE 100000&nbsp;&nbsp;&nbsp;&nbsp;<br>&nbsp;&nbsp;&nbsp; TYPE POLYGON
<br>&nbsp;&nbsp;&nbsp; DEBUG ON<br>&nbsp;&nbsp;&nbsp; TRANSPARENCY ALPHA<br>&nbsp;&nbsp;&nbsp; CLASS<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; NAME &quot;SM&quot;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; STYLE<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; COLOR 153 153 102<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ANTIALIAS TRUE<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; END<br>&nbsp;&nbsp;&nbsp; END<br>&nbsp; END </div>
<div>*****</div>
<div>I have now really no idea where the problems should be.</div>
<div>&nbsp;</div>
<div>Steve, any clues?</div>
<div>&nbsp;</div>
<div>thanks for your info.</div>
<div>&nbsp;</div>
<div>zhonghai</div>
<div>&nbsp;</div>
<div><span class="gmail_quote">On 5/18/06, <b class="gmail_sendername">Stephen Woodbridge</b> &lt;<a onclick="return top.js.OpenExtLink(window,event,this)" href="mailto:woodbri@swoodbridge.com" target="_blank">woodbri@swoodbridge.com
</a>&gt; wrote:</span> 
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">Zhonghai Wang wrote:<br>&gt; Hi guys,<br>&gt;<br>&gt; I've tried to make a efficient map layer with the commands shp2tile, 
<br>&gt; tile4ms, and shptree, but something seems not right, because MapServer<br>&gt; can not draw the maps. I've made a test in a seperate folder, and I've<br>&gt; done the following processes:<br>&gt;<br>&gt; ***<br>&gt; data -- 
Forests.shp (for a country)<br>&gt; ***<br>&gt; 1. &gt;shp2tile -r 50 -c 50 Forests.shp Forests_Test.shp<br>&gt;&nbsp;&nbsp;&gt;&gt;&gt;results for this step: shp, shx, and dbf files, there is no prj file<br>&gt; for the output file 
<br>&gt;&nbsp;&nbsp;&gt;&gt;&gt;error info on the console: failed to create shp Forests_Test.shp -1833<br><br>This is likely because you are trying to create 2501 files (50 x 50 + 1)<br>and they all half to be open at the same time for this mode so you 
<br>likely ran into a process file handle limit. Also how many point do you<br>have in this layer? What is the value of Num_points/2500, this number<br>should not be smaller than 8000 - 10000.<br><br>&gt; 2. &gt;tile4ms ---- get the 
tileindex.shx, tileindex.shp and tileindex.dbf<br>&gt; files for the Forests_Test.shp, there is still no prj file for tileindex.shp<br>&gt;&nbsp;&nbsp;&gt;&gt;&gt;no error messages appear at this step<br><br>There are no prj files created. Mapserver does not use them. 
<br><br>&gt; 3. &gt;shptree -- to genetare .qix file for all shapefiles in this subfolder<br>&gt;&nbsp;&nbsp;&gt;&gt;&gt; results for this step: Forests.qix, Forests_Test.qix, and tileindex.qix<br>&gt;&nbsp;&nbsp;&gt;&gt;&gt;no error info on the console 
<br>&gt;<br>&gt; but, only if I set DATA &quot;Forests&quot; in the layer object the map will be<br>&gt; rendered, others like DATA &quot;Forests_Test&quot; or TTILEINDEX &quot;tileindex&quot;<br>&gt; TILEITEM &quot;location&quot; do not work, the server simply sends back a blank 
<br>&gt; image.<br>&gt;<br>&gt; did I make any mistakes or it really do not work well. (I am using MS4W<br>&gt; 4.8.1)<br>&gt;<br>&gt; I guess some errors occur when I perform the command shp2tile.<br><br>What version of shp2tile are you using? 
<br><br>woodbri@carto:/data/mdata$ ~/dev/shptools/shp2tile -v<br>$Id: shp2tile.c,v 1.13 2005/12/05 22:38:08 woodbri Exp $<br><br>If it does not respond with the Id string above you need to upgrade as<br>there is a serious crashing bug for point data in the earlier version if 
<br>you are using the -q option. It should work for the row col option, just<br>try to decrease the number of tiles.<br><br>Also if you do not have something like R x C files in your directory<br>then the process failed. For the row col option you can also specify 
<br>--no-write to just get a stats report of how the data is put into the tiles.<br><br>-Steve<br><br>&gt; thanks for any further info.<br>&gt;<br>&gt; zhonghai<br>&gt;<br>&gt; On 5/18/06, *Zhonghai Wang* &lt;<a onclick="return top.js.OpenExtLink(window,event,this)" href="mailto:zhonghaiw@gmail.com" target="_blank">
 zhonghaiw@gmail.com</a><br>&gt; &lt;mailto:<a onclick="return top.js.OpenExtLink(window,event,this)" href="mailto:zhonghaiw@gmail.com" target="_blank">zhonghaiw@gmail.com</a>&gt;&gt; wrote:<br>&gt;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; Hi Bob, Steve,
<br>&gt;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; thank you very much for all these helpful clues, now I think I've <br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; got the points of the shp2tile command, it's really a good tool to<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; slice shapefile.<br>&gt;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; zhonghai
<br>&gt;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; On 5/18/06, *Stephen Woodbridge* &lt;<a onclick="return top.js.OpenExtLink(window,event,this)" href="mailto:woodbri@swoodbridge.com" target="_blank"> woodbri@swoodbridge.com</a><br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; &lt;mailto:
<a onclick="return top.js.OpenExtLink(window,event,this)" href="mailto:woodbri@swoodbridge.com" target="_blank">woodbri@swoodbridge.com</a>&gt;&gt; wrote:<br>&gt;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Zhonghai Wang wrote:<br>&gt;&gt;&nbsp;&nbsp;Hi folks,
<br>&gt;&gt;<br>&gt;&gt;&nbsp;&nbsp;I have a large shapefile, now I am trying to use shp2tile <br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; command to<br>&gt;&gt;&nbsp;&nbsp;slice it into pieces, with -r and -c is ok, but I do not fully<br>&gt;&gt;&nbsp;&nbsp;understand the -q parameter, what does it actually mean? and
<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; what number<br>&gt;&gt;&nbsp;&nbsp;should a use for this parameter normally? <br>&gt;&gt;<br>&gt;&gt;&nbsp;&nbsp;or something like this? -- &gt;shp2tile -q 10000 input_shapefile<br>&gt;&gt;&nbsp;&nbsp;output_shapefile<br>&gt;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Hi Zhonghai,
<br>&gt;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; The -r -c option breaks the extents of your shapefile into R x C <br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; rows<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; and columns and then tries to fit the objects into the best<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; tile. I any<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; tile crosses a tile boundary by 5-10% then it is put into a
<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &quot;supertile&quot; <br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; the could be the same extents as the original shape file. So<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; typically<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; you will end up with r X c + 1 tiles.<br>&gt;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; The -q N option splits the extents in half either vertically or 
<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; horizontally and then sorts the objects into the 2 halves or put<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; them in<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; a supertile. Then if the either of the two halves has more than N<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; objects it is again split in half and this continues until all files 
<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; have less than N objects. This can cause some strange effects<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; like tiles<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; with 1 or a small number of objects and most tiles will have<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; less than N<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; objects in them. Since this algorithm tends to spatially cluster 
<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; objects<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; in a file, there is a good chance that if you need the file that<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; all or<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; most objects in the file will be used.<br>&gt;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; I recommend trying numbers like 10,000 and 20,000 as you initial 
<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; tries.<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; I think you should probably not use numbers less then 8000, but<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; it is<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; really up to you to try and measure the results to find what<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; works best 
<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; for your data.<br>&gt;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -Steve W.<br>&gt;<br>&gt;<br>&gt;<br><br></blockquote></div><br>