Display progress bar while waiting for data

Ed McNierney ed at TOPOZONE.COM
Wed May 25 09:13:07 EDT 2005


Dejan -

The first thing you need to do is understand your own application.  Do
you limit how far users can zoom out on the map?  If so, there's no
point in creating overviews beyond that point.  If not, perhaps you
should do so, or decide to ignore any performance problems when users
zoom out too far (if it's not useful, they're not likely to do it very
often, and it's probably not important).

TIFF overviews are a GDAL construct, and it is GDAL that knows how to
handle and use them.  TIFF files can contain multiple "pages", a concept
originally intended for multi-page documents like faxes.  GDAL uses
these pages to create multiple copies of the same image at different
resolutions, all inside one file.  So the MAP file or TILEINDEX just
refers to the one file, and GDAL determines - based on the requested
output image resolution - the overview that is closest to the requested
resolution without being less than it.  That is the image used for
resampling.

You can get the best possible peformance by constraining the map view
scale to a list of specific values (with zoom scale radiobuttons or a
menu) and then creating overviews to exactly match those output scales.
Then you can be sure that no resampling will ever happen.

        - Ed

Ed McNierney
President and Chief Mapmaker
TopoZone.com / Maps a la carte, Inc.
73 Princeton Street, Suite 305
North Chelmsford, MA  01863
Phone: +1 (978) 251-4242
Fax: +1 (978) 251-1396
ed at topozone.com 

-----Original Message-----
From: Dejan Gambin [mailto:dejan.gambin at pula.hr] 
Sent: Wednesday, May 25, 2005 12:00 AM
To: Ed McNierney
Cc: MAPSERVER-USERS at LISTS.UMN.EDU
Subject: RE: [UMN_MAPSERVER-USERS] Display progress bar while waiting
for data

Thanks Ed. I am just curious to learn where can I find some elementary
informations about overviews and levels, for example to know the file
size stuff you mentioned? And how exactly MapServer uses overviews
automatically without doing anything in map file? If the storage space
is not the problem, how can I know how much levels do I need to create
to get the best performance? What is the upper limit? 16? 32? 64? Can
you give me some usefull links where I can learn all that?

Thanks very much

Dejan Gambin

-----Original Message-----
From: Ed McNierney [mailto:ed at topozone.com]
Sent: Tuesday, May 24, 2005 4:28 PM
To: Gambin Dejan; MAPSERVER-USERS at LISTS.UMN.EDU
Subject: RE: [UMN_MAPSERVER-USERS] Display progress bar while waiting
for data


Dejan -

You should be willing to apply overviews quite generously.  If you have
a single 80 MB image, a 2X overview (half the resolution) will require
20 MB more space, and a 4X overview will require 5 MB on top of that, so
you will increase your storage from 80 MB to 105 MB.  Adding 8x, 16x,
32x, 64x, AND 128x overviews (probably more than you need) will, in
total, only add 2 MB more space and will provide fast display for those
very "zoomed out" views.

        - Ed

Ed McNierney
President and Chief Mapmaker
TopoZone.com / Maps a la carte, Inc.
73 Princeton Street, Suite 305
North Chelmsford, MA  01863
ed at topozone.com
(978) 251-4242 
 

-----Original Message-----
From: Gambin Dejan [mailto:Dejan.Gambin at pula.hr] 
Sent: Tuesday, May 24, 2005 9:25 AM
To: Ed McNierney
Subject: RE: [UMN_MAPSERVER-USERS] Display progress bar while waiting
for data

Thanks to all specially to Ed. I have created overviews of my GeoTIFF
files with gdaladdo. Now I am using combination of tileindex and
overviews and the layer is displayed at the full view much faster. I
think that is it and I can't do anything more than this except
increasing the bandwidth of my server and my users of course...

Thanks very much

Dejan Gambin

-----Original Message-----
From: Ed McNierney [mailto:ed at topozone.com]
Sent: Tuesday, May 24, 2005 2:22 PM
To: Gambin Dejan; MAPSERVER-USERS at LISTS.UMN.EDU
Subject: RE: [UMN_MAPSERVER-USERS] Display progress bar while waiting
for data


Dejan -

Have you created "overviews" with GDAL, or created other resampled,
lower-resolution copies of your images to be used when the view is
zoomed out?  That's the first thing you should do, in order to fix the
performance problem rather than try to display an animated advertisement
for it!

Look at the gdaladdo documentation to start.  It will let you resample
the images to lower resolution versions ONCE rather than doing it on the
fly for every map request.

     - Ed

Ed McNierney
President and Chief Mapmaker
TopoZone.com / Maps a la carte, Inc.
73 Princeton Street, Suite 305
North Chelmsford, MA  01863
Phone: +1 (978) 251-4242
Fax: +1 (978) 251-1396
ed at topozone.com 

-----Original Message-----
From: UMN MapServer Users List [mailto:MAPSERVER-USERS at LISTS.UMN.EDU] On
Behalf Of Gambin Dejan
Sent: Tuesday, May 24, 2005 6:08 AM
To: MAPSERVER-USERS at LISTS.UMN.EDU
Subject: Re: [UMN_MAPSERVER-USERS] Display progress bar while waiting
for data

Thanks everybody participating in the discussion of displaying progress
bar. I am aware of the problem but just want to describe something that
is happening on my site. 

I have a set of 18 GeoTIFF ortophoto color images, each one has a size
of 80MB. I have created tileindex shapefile to increase performance in
reading the data and I have informed the users they should first have to
zoom onto desired extent on the map and activate the ortophoto layer
after that to speed up the loading. But users are just users and many of
them are trying to activate the ortophoto layer before that (while the
map is in full view) so the loading is slow.

I have put a "Loading" message but the point is the following: when I
load the image on the local network, I get the "Loading" message and I
have to wait about 30 seconds, then the image is displayed at once. On
the slow connection I also get "loading" message displayed about 30
seconds and then the map is displayed incrementally (that is ok). So my
problem is those 30 seconds (that can arise to several minutes regarding
the number of simultaneous users of course). Can I do something?

Thanks, Dejan

-----Original Message-----
From: Ed McNierney [mailto:ed at topozone.com]
Sent: Tuesday, May 17, 2005 6:35 PM
To: Gambin Dejan; MAPSERVER-USERS at LISTS.UMN.EDU
Subject: RE: [UMN_MAPSERVER-USERS] Display progress bar while waiting
for data


Dejan -

I'll second Frank's scepticism here.  Most of the "Image Loading"
animations you see on mapping sites are just that - animations.  They're
standalone animated GIFs and the like which cause pixels to twinkle on
the user's screen but which have no relationship to the actual progress
of the application.  The server could burst into flames and the "Image
Loading" graphic would keep dancing.

The site Regina mentions falls into this category.  IMHO, these kinds of
graphics are primarily used to try to cover up slow map servers, and not
to give users meaningful progress feedback.

I think by far the best feedback mechanism for image load time is the
map image itself.  If you simply display the image in a format that
browsers can easily render incrementally, then the user can see the
image begin to appear and will get a good feel for how long it will take
just by watching it.  JPEG is NOT a good choice for this, but GIF and
PNG images should render properly on most browsers.

For example, look at this image:

http://www.topozone.com/images/MtMonadnockTopo.gif

Over a slow connection.  You should see the large map image load
incrementally, so you know things are working.  If the image were
smaller and in a frame (to define the final output size) it would be
relatively easy to assess how much progress is being made.

        - Ed

Ed McNierney
President and Chief Mapmaker
TopoZone.com / Maps a la carte, Inc.
73 Princeton Street, Suite 305
North Chelmsford, MA  01863
ed at topozone.com
(978) 251-4242 
 

-----Original Message-----
From: UMN MapServer Users List [mailto:MAPSERVER-USERS at LISTS.UMN.EDU] On
Behalf Of Dejan Gambin
Sent: Monday, May 16, 2005 5:06 PM
To: MAPSERVER-USERS at LISTS.UMN.EDU
Subject: [UMN_MAPSERVER-USERS] Display progress bar while waiting for
data

Hi,

Is it possible to create some kind of progress bar while waiting for
raster data to be displayed. I have some raster data in GeoTIFF format
that some users with a slow connection must wait for. I am wondering if
I can show them a progress bar indicating "estimated" time they have to
wait so they know and they can wait or cancel the process.

Does anyone have a suggestion on what is the best way to inform users?

thanks very much

dejan



More information about the mapserver-users mailing list