[mapserver-users] Improving Mapserver speed for air photo services

Andy Colson andy at squeakycode.net
Sun May 31 06:13:12 PDT 2015


Thanks Mark.  Mind if I ask a few more questions?

1) Have you found jpeg encoded tif to be a fast vs mrsid/ecw?  Does it even matter once you put the Mapcache in front?

2) How much drive space does your cache take compared to your imagery?


Thanks again,

-Andy

PS: sorry if this double posts.


On 05/28/2015 07:37 AM, Mark Volz wrote:
> Hello,
>
> Andy Colson asked me about my interactive mapping setup and how I was able to get the air photos to run fast.  I figure there may be a couple other people that might want to know what I did to improve the speed of my service at: http://geomoose.lyonco.org/geomoose2/geomoose.html#.  Please note that this list is not exhaustive, nor am I an expert.  So some people may want to add or refute some of this information.
>
>
> *Use the same projection for everything.  Don't make MapServer have to deal with projecting imagery or data to a different coordinate system.
> *Use a map cache.  Mapcache is integrated with some distributions of MapServer, but there are several out there each with their own advantages and disadvantages.
> *Disable fractional zoom on your application.  In addition make sure your application is set up to use the same scales, tile size, and tile origin (grid) as your map cache.  If any of these don't match then your mapcache will need to perform extra work for each request.
> *Search for "WMS Performance Shootout."  They are starting to get old now, but they contain many tidbits on how to improve speed.
> *You may want to look at http://www.mapserver.org/optimization/raster.html.  This page mentions what format you should use, and how to create internal tiles.
> *Use PROCESSING "OVERSAMPLE_RATIO=1".  If I recall correctly MapServer uses an oversample ratio of 2.5 so it is sampling the raster at 180dpi to create a 72 dpi image.  This is good for scientific applications, but it may be unnecessary for air photos.  Just be warned that low oversample ratios can create grainer images.
>
> I think that by using a cache, making sure your application grid matches your cache, and configuring oversample_ratio=1 so MapServer doesn't need to do extra work will be more important than the actual server specs.  What you need for a server really depends on more factors.  Our server is "decent" now but we use to have an old GIS server that performed well with the above tips.
>
>
>
> Sincerely,
> Mark Volz, GISP
> Lyon County GIS Coordinator
>
>
>> -----Original Message-----
>> From: Andy Colson [mailto:andy at squeakycode.net]
>> Sent: Wednesday, May 27, 2015 8:50 AM
>> To: Mark Volz; Rahkonen Jukka (MML)
>> Cc: mapserver-users at lists.osgeo.org
>> Subject: Re: [mapserver-users] stretching imagery in MapServer
>>
>> Hi Mark.  Two questions for you:
>>
>> 1) I know it might be a bunch of extra work, but I don't suppose you could post
>> some before and after shots (or urls or whatever).  I really have no idea what
>> sort of change your talking about.
>>
>> 2) Holy freaking cow you have fast imagery.  I don't suppose you could share
>> some processing/hardware/setup secrets?
>>
>> Thanks
>>
>> -Andy
>>
>>
>> On 5/26/2015 2:07 PM, Mark Volz wrote:
>>> Jukka, (and others)
>>>
>>> Thank you for your reply.  I think I figured out how lut works.  If
>>> you don't mind please check and make sure I have this correct:
>>>
>>> I can use ArcGIS to report the correct input and output values for a
>>> n=2.5 standard deviation by going to
>>> layers->symbology->stretch->histograms->Info window.  Once I have
>>> layers->symbology->stretch->histograms->those
>>> values I can modify my map file to include for example:
>>>
>>> PROCESSING "LUT_1=73:0,226:255" #changes red band input of 0-73 to 0,
>>> inputs of 226-255 to 255, inputs between 73-226 linearly interpolated.
>>>
>>> PROCESSING "LUT_2=60:0,199:255" #changes green band input of 0-60 to
>>> 0, inputs of 199-255 to 255, inputs between 60-199 linearly interpolated.
>>>
>>> PROCESSING "LUT_3=35:0,155:255" #changes blue band input of 0-35 to 0,
>>> inputs of 155-255 to 255, inputs between 35-155 linearly interpolated.
>>>
>>> P.S.
>>>
>>> Before I knew what the heck I was doing with LUT I noticed that I
>>> could identify wet areas, and tree cover quite easily with the
>>> following
>>> combinations:
>>>
>>> PROCESSING "LUT=50:50,60:250,70:250" is a good way to identify tree
>> cover.
>>>
>>> PROCESSING "LUT=50:50,60:250,70:70"  is a good way to identify wet areas.
>>>
>>> Thank You
>>>
>>> Sincerely,
>>>
>>> *Mark Volz, GISP*
>>>
>>> *From:*Rahkonen Jukka (MML)
>>> [mailto:jukka.rahkonen at maanmittauslaitos.fi]
>>> *Sent:* Monday, May 25, 2015 9:18 AM
>>> *To:* Mark Volz; mapserver-users at lists.osgeo.org
>>> *Subject:* Re: stretching imagery in MapServer
>>>
>>> Hi,
>>>
>>> As far as I know automatic stretch by standard deviation is not
>>> supported. You can do automatic min-max stretch with PROCESSING
>>> "SCALE=AUTO". If your source data is uniform you may reach a good
>>> result with manual scale settings or with PROCESSING "LUT=  "
>>>
>>>
>>>
>>> -Jukka Rahkonen-
>>>
>>> Mark Volz wrote:
>>>
>>> Hello,
>>>
>>> I added our new Pictometry Air Photos on our mapping site at
>>> http://geomoose.lyonco.org/geomoose2/geomoose.html.  The air photos
>>> seem somewhat washed out.  In ArcGIS I was able to get a nicer looking
>>> image by stretching the air photo using standard deviations. Can we
>>> stretch imagery in MapServer?  If not please let me know if you have a
>>> comment regarding how I can improve the image quality.
>>>
>>> Thanks
>>>
>>> Sincerely,
>>>
>>> *Mark Volz, GISP*
>>>





More information about the MapServer-users mailing list