Re: [mapserver-users] Raster Strategies Examples

2010-08-03 Thread Jan Hartmann



On 08/03/10 16:06, Daniel Morissette wrote:


Jan, Jeff,

If you have ideas of an easier mechanism to help determine scales that
you would like to see added in MapServer then please share them... I'd
be happy to help improve this.

As a rule of thumb, for raster maps  I compute the scale that displays 
one pixel from the raster file  as exactly one screen pixel.  The 
optimal Maxscale-Minscale breakpoints between two raster maps are 
generally exactly in the middle of those basic scales  (depends a bit on 
format and compression ratio). For vector maps I start with the scale 
needed to display
the whole map on a 1000*1000 screen (becoming the largest Minscale) and 
try to figure out efficient breakpoints for smaller scales by counting 
the number of elements in the files. Most of the time, my 
Maxscale/Minscale pairs for different layers are derived by 
multiplying/dividing by two, on the basis of those basic values.


Those are just rules of thumb of course. I'm not sure whether they could 
or should be generalized into MapServer directives.


Jan
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] Raster Strategies Examples

2010-08-03 Thread Stephen Woodbridge

Daniel Morissette wrote:

Jan Hartmann wrote:

Would it make sense to add this functionality to MapServer? Finding
scale breakpoints is a hassle indeed!



Jeff McKenna wrote:

I've always used a simple CGI template containing the [scaledenom] parameter.
I plan to simplify this for MS4W users.



Jan, Jeff,

If you have ideas of an easier mechanism to help determine scales that
you would like to see added in MapServer then please share them... I'd
be happy to help improve this.



I always setup a trivial OpenLayers viewer with the scale control turned 
on and it displays the scale over the map. This has the benefit, that I 
can make changes to the mapfile and see them in OL by just a slight pan 
to refresh the map. I use singleTile: true, ratio:1 on the layer.


This has the advantage of bringing the scale value and the map together 
so you can better visualize the changes and see the effect of changes.


-Steve W
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] Raster Strategies Examples

2010-08-03 Thread Daniel Morissette
Jan Hartmann wrote:
> 
> Would it make sense to add this functionality to MapServer? Finding
> scale breakpoints is a hassle indeed!
> 

Jeff McKenna wrote:
> I've always used a simple CGI template containing the [scaledenom] parameter.
> I plan to simplify this for MS4W users.


Jan, Jeff,

If you have ideas of an easier mechanism to help determine scales that
you would like to see added in MapServer then please share them... I'd
be happy to help improve this.

-- 
Daniel Morissette
http://www.mapgears.com/
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] Raster Strategies Examples

2010-08-03 Thread Jeff McKenna




- How can i calculate the scale where i should create another layer of 
the

tiles, or i shoud see it with some tests?


I find the MapServer scale values very confusing myself.  If I want
to compute the scale for particular request (for instance to establish
breakpoints for MINSCALE/MAXSCALE), I do a request at the target resolution
with shp2img and debug output on and examine the debug output for the scale
reported.



I've always used a simple CGI template containing the [scaledenom] 
parameter.

I plan to simplify this for MS4W users.

-jeff


--
Jeff McKenna
MapServer Consulting and Training Services
http://www.gatewaygeomatics.com/


___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] Raster Strategies Examples

2010-08-03 Thread Jan Hartmann



On 08/03/10 14:12, Frank Warmerdam wrote:



I find the MapServer scale values very confusing myself.  If I want
to compute the scale for particular request (for instance to establish
breakpoints for MINSCALE/MAXSCALE), I do a request at the target 
resolution
with shp2img and debug output on and examine the debug output for the 
scale

reported.

Would it make sense to add this functionality to MapServer? Finding 
scale breakpoints is a hassle indeed!


Jan
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] Raster Strategies Examples

2010-08-03 Thread Frank Warmerdam


Folks,

I'm sorry for speaking up on this without having read the other replies.
Forgive me for repeating information.

Edi.Karadumi wrote:

as you may know, i have very slow performance when i zoom out and im stucked
here. As i have read i should make a copy of the tiles with reduced
resolution. Merge the tiles together and use min/max scale to show different
layers in different scales. the min/max scales i zoom in/out are
100/120. Now my questions are

- How can i calculate the scale where i should create another layer of the
tiles, or i shoud see it with some tests?


I find the MapServer scale values very confusing myself.  If I want
to compute the scale for particular request (for instance to establish
breakpoints for MINSCALE/MAXSCALE), I do a request at the target resolution
with shp2img and debug output on and examine the debug output for the scale
reported.

- how much should be the resolution of the new layer? 


You basically want to move to a new mosaiced overview layer at the point
where a map request is likely to request several tiles at once.  If
we, roughly, assume a map request is on the order of 500x500 then at
32 times reduction in resolution would give a request over an area of
16000 x 16000 which is certain to touch several of your 6000 x 6000
base files.  So, I'd aim to have this merged mosaic at approximately
1/32nd of the resolution of the original imagery.

1200GB of full res imagery reduced to 1/32nd resolution is only about 1GB
so it is a very managable size for an overview layer.


- is there any tools or program to merge the tiles? merging 6000 tiles with
the gdalwarp by writing the command by myself is frustrating


gdalwarp can take multiple input files in one run, but there are
some issues with how gdalwarp is implemented that make it not scale
well to many input files without great care.  Since the input files
are quite a modest size I would suggest using gdal_merge.py to
mosaic them at a reduced resolution.  If your original imagery were
5m pixels something like:

gdal_merge.py -o overview_mosaic.tif -ps 160 160 */*.tif

might do the trick.


- how many tiles should i merge together to create the new layer? (how many
tiles should have the new layer) i know that in each zoomscale its better to
appear only one tile but i dont know how to calculate it

- the tiles that i should merge are the originals or those with internal
tiling and overviews?


If you use gdal_merge.py, it is best to use input files that have overviews
already built.  This will ensure that the mosaic built uses the same
downsampling technique (ie. averaging) that you used to build the overviews.
It will also make the mosaicing much faster.

Best regards,
--
---+--
I set the clouds in motion - turn up   | Frank Warmerdam, warmer...@pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush| Geospatial Programmer for Rent

___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


[mapserver-users] Raster Strategies Examples

2010-08-02 Thread Edi.Karadumi

I have read many strategies for raster performance, but i still have problems
with my case. The posts that i have read explain the strategie, but are not
very detailed. Im new to mapserver so i have problems implementing them. My
case is: 

-about 6000 tiles that form the map
-170mb each tile
-aproximately 1.2T of iamges
-i have 10T HD and i think disk space is not a problem for me
-tile format is TIF
-tile size 9375x6250 pixels

The strategy i have implemented and the problems i have

-First i divided the tiles in 60 folders, to increase the performance in
disk seek/read.

-Than i transformed source files into internally tiles with the command 
   gdal_translate -of GTiff -co "TILED=YES" original.tif tiled.tif

-i used gdaladdo to add internal pyramids

   gdaladdo -r average 2 4 8 16 32 64 128

-Created a tileindex using 
   gdaltindex -write_absolute_path MapAll.shp //server/Maps/Subfolder1/*.tif

-Created a spatial index .qix file
   shptree MapAll.shp

-than added the layer to the mapfile without the .shp extension so the
application can use the .qix

as you may know, i have very slow performance when i zoom out and im stucked
here. As i have read i should make a copy of the tiles with reduced
resolution. Merge the tiles together and use min/max scale to show different
layers in different scales. the min/max scales i zoom in/out are
100/120. Now my questions are

- How can i calculate the scale where i should create another layer of the
tiles, or i shoud see it with some tests?

- how much should be the resolution of the new layer? 

- is there any tools or program to merge the tiles? merging 6000 tiles with
the gdalwarp by writing the command by myself is frustrating

- how many tiles should i merge together to create the new layer? (how many
tiles should have the new layer) i know that in each zoomscale its better to
appear only one tile but i dont know how to calculate it

- the tiles that i should merge are the originals or those with internal
tiling and overviews?


  




-- 
View this message in context: 
http://osgeo-org.1803224.n2.nabble.com/Raster-Strategies-Examples-tp5363321p5363321.html
Sent from the Mapserver - User mailing list archive at Nabble.com.
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users