<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.2900.3603" name=GENERATOR></HEAD>
<BODY>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN
class=804104713-16112009>Hi,</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN
class=804104713-16112009></SPAN></FONT> </DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN
class=804104713-16112009>Oh yes, my images are always covering full mapsheets
which are rectangles. They are naturally polygons, even simple sort
of, but in your case you should use more accurate methods for finding out which
images from the 2 m tileindex file could be removed. Idea remains the
same, if you know beforehand that some images will be left under another image
layer you can remove them from the tileindex so they are not wasting Mapserver
processing time. And the goal is to have only 2
layers:</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Arial size=2><SPAN
class=804104713-16112009>2m data shows between scale 200k to
100k</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Arial size=2><SPAN class=804104713-16112009>2
m data + 20 cm data combined and unnecessary 2 m images removed show between
100k and 500.</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Arial size=2><SPAN
class=804104713-16112009></SPAN></FONT> </DIV>
<DIV dir=ltr align=left><FONT face=Arial size=2><SPAN
class=804104713-16112009>Or then you can use just the second layer as
"best available image".</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Arial size=2><SPAN
class=804104713-16112009></SPAN></FONT> </DIV>
<DIV dir=ltr align=left><FONT face=Arial size=2><SPAN
class=804104713-16112009>Same tileindex file can contain images of both
resolution, and in places where images are overlapping the one which has bigger
fid (feature id) in the shapefile will be drawn last. </SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Arial size=2><SPAN
class=804104713-16112009></SPAN></FONT> </DIV>
<DIV dir=ltr align=left><FONT face=Arial size=2><SPAN
class=804104713-16112009>-Jukka-</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN
class=804104713-16112009></SPAN></FONT><FONT face=Arial color=#0000ff
size=2></FONT><BR> </DIV>
<BLOCKQUOTE
style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #0000ff 2px solid; MARGIN-RIGHT: 0px">
<DIV class=OutlookMessageHeader lang=fi dir=ltr align=left>
<HR tabIndex=-1>
<FONT face=Tahoma size=2><B>Lähettäjä:</B> Liang Jian
[mailto:Liang.Jian@eniro.com] <BR><B>Lähetetty:</B> 16. marraskuuta 2009
15:40<BR><B>Vastaanottaja:</B> Rahkonen Jukka;
mapserver-users@lists.osgeo.org<BR><B>Aihe:</B> RE: [mapserver-users]
performance problem with ortho images<BR></FONT><BR></DIV>
<DIV></DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN
class=765383513-16112009>Hi Jukka,</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN
class=765383513-16112009></SPAN></FONT> </DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN
class=765383513-16112009>I'm not sure that I understand you correctly. I tried
to clip 2m data coverage by 20cm data- get some holes in 2m data index file.
And mapfile setup as follow: </SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Arial size=2><SPAN
class=765383513-16112009> 2m data shows between scale 200k to
100k</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Arial size=2><SPAN
class=765383513-16112009> 2m data with holes show between 100k to
500</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Arial size=2><SPAN
class=765383513-16112009> 20cm data shows between 100k to
500.</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Arial size=2><SPAN
class=765383513-16112009></SPAN></FONT> </DIV>
<DIV dir=ltr align=left><FONT face=Arial size=2><SPAN
class=765383513-16112009>It doesn't help. I don't think mapserver can read
polygons for tileindex. It sounds like using rectangle.</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Arial size=2><SPAN
class=765383513-16112009></SPAN></FONT> </DIV>
<DIV dir=ltr align=left><FONT face=Arial size=2><SPAN
class=765383513-16112009>/Liang</SPAN></FONT></DIV><BR>
<DIV class=OutlookMessageHeader lang=en-us dir=ltr align=left>
<HR tabIndex=-1>
<FONT face=Tahoma size=2><B>From:</B> Rahkonen Jukka
[mailto:Jukka.Rahkonen@mmmtike.fi] <BR><B>Sent:</B> den 16 november 2009
13:36<BR><B>To:</B> Liang Jian;
mapserver-users@lists.osgeo.org<BR><B>Subject:</B> Re: [mapserver-users]
performance problem with ortho images<BR></FONT><BR></DIV>
<DIV></DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN
class=793171012-16112009>Hi,</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN
class=793171012-16112009></SPAN></FONT> </DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN
class=793171012-16112009>Is it necessary to show 2 m data at all in the areas
where 20-50 cm imagery is available? If not you can first make
tileindex shapefiles from 2 m images and 20-50 cm images. Open both
shapefiles with for example OpenJUMP and select and remove those polygons from
2 m shapefiles which are totally covered by you 20-50 cm tiles. Combine
the two layer, save and use the result as a tileindex file for
Mapserver.</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN
class=793171012-16112009></SPAN></FONT> </DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN
class=793171012-16112009>There may be problems in the areas with overlapping
images. To get the desired image to show on top it may be necessary to
rewrite the shapefile by so that it will be ordered so that the small pixel
size images will be written last in the shapefile. Then they should be
drawn on top of 2 m imagery.</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN
class=793171012-16112009></SPAN></FONT> </DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN
class=793171012-16112009>If you want the show 2 m images for the whole area
when zoomed far away, prepare still the combined shapefile with covered by
-images removed. Then make two scale dependent layers under the same
group. Read 2 m data when scale is between 200k and 100k and switch
then to the combined layer.</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN
class=793171012-16112009></SPAN></FONT> </DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN
class=793171012-16112009>There may be better ways, this is the best I have
invented this far for our own use.</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN
class=793171012-16112009></SPAN></FONT> </DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN
class=793171012-16112009>Take care of creating enough many low-resolution
layers with gdaladdo for far away zooms. Even then if Mapserver must
open more than 20-40 image files for filling the screen I would consider
making a separate overview image by mosaicing the whole area
together with something like 20-50-100 meter pixel size and using
that image in the same image group.</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN
class=793171012-16112009></SPAN></FONT> </DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN
class=793171012-16112009>-Jukka Rahkonen-</SPAN></FONT></DIV><BR>
<BLOCKQUOTE
style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #0000ff 2px solid; MARGIN-RIGHT: 0px">
<DIV class=OutlookMessageHeader lang=fi dir=ltr align=left>
<HR tabIndex=-1>
<FONT face=Tahoma size=2><B>Lähettäjä:</B>
mapserver-users-bounces@lists.osgeo.org
[mailto:mapserver-users-bounces@lists.osgeo.org] <B>Puolesta </B>Liang
Jian<BR><B>Lähetetty:</B> 16. marraskuuta 2009
13:02<BR><B>Vastaanottaja:</B>
mapserver-users@lists.osgeo.org<BR><B>Aihe:</B> [mapserver-users]
performance problem with ortho images<BR></FONT><BR></DIV>
<DIV></DIV>
<DIV><FONT face=Arial size=2>
<DIV><SPAN class=996093710-16112009><FONT face=Arial size=2>Hi
all,</FONT></SPAN></DIV>
<DIV><SPAN class=996093710-16112009><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=996093710-16112009><FONT face=Arial size=2>I have a problem
with mapserver handling ortho images. The situation is we have 2m data cover
the whole country and 20-50cm data cover most cities. We setup mapfiles as
2m data shows between scale 200k to 500 and 20-50cm data
show between scale 100k to 500. Problem is when requirst data in the
city ranges, mapserver first read data from 20-50cm dataset and then read
from 2m dataset which is unnecessary as the 20-50cm data is enough and the
best solution is when there is no 20-50cm data, 2m data should be used
instead. </FONT></SPAN></DIV>
<DIV><SPAN class=996093710-16112009><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=996093710-16112009><FONT face=Arial size=2>Do you have any
idea how to avoid the unnecessary reading? </FONT></SPAN></DIV>
<DIV><SPAN class=996093710-16112009><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=996093710-16112009><FONT face=Arial size=2>Any suggestions
will be welcome!</FONT></SPAN></DIV>
<DIV><SPAN class=996093710-16112009><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=996093710-16112009><FONT face=Arial
size=2>Thanks</FONT></SPAN></DIV>
<DIV><SPAN class=996093710-16112009><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=996093710-16112009><FONT face=Arial
size=2>/Liang</FONT></SPAN></DIV></FONT></DIV><BR>
<HR>
<FONT face=Arial color=gray size=1>Confidentiality Notice: This e-mail
transmission may contain confidential or legally privileged information that
is intended only<BR>for the individual or entity named in the e-mail
address. If you are not the intended recipient, you are hereby notified that
any<BR>disclosure, copying, distribution, or reliance upon the contents of
this e-mail is strictly prohibited and may be unlawful. If you have received
this e-mail in error, please notify the sender immediately by return e-mail
and delete all copies of this message.<BR></BLOCKQUOTE></FONT><BR>
<HR>
<FONT face=Arial color=gray size=1>Confidentiality Notice: This e-mail
transmission may contain confidential or legally privileged information that
is intended only<BR>for the individual or entity named in the e-mail address.
If you are not the intended recipient, you are hereby notified that
any<BR>disclosure, copying, distribution, or reliance upon the contents of
this e-mail is strictly prohibited and may be unlawful. If you have received
this e-mail in error, please notify the sender immediately by return e-mail
and delete all copies of this message.<BR></BLOCKQUOTE></FONT></BODY></HTML>