Display progress bar while waiting for data
Gambin Dejan
Dejan.Gambin at PULA.HR
Mon May 30 00:28:16 PDT 2005
Thanks Ed, I begin to understand all this stuff much better. Now, would
it be hard for you to just give an example of creating an overview that
exactly matches a predefined output scale so no resampling occurs. I
will give you some informations:
My tiff file has the following info:
tiffinfo -s 5B15-19-DOF.tif
5B15-19-DOF.tif: Warning, unknown field with tag 700 (0x2bc) ignored.
5B15-19-DOF.tif: Warning, unknown field with tag 34665 (0x8769) ignored.
TIFF Directory at offset 0x8
Subfile Type: (0 = 0x0)
Image Width: 4500 Image Length: 6000
Resolution: 72, 72 pixels/inch
Bits/Sample: 8
Compression Scheme: None
Photometric Interpretation: RGB color
Date & Time: "2004:12:14 17:10:55"
Software: "Adobe Photoshop 7.0"
Samples/Pixel: 3
Rows/Strip: 6000
Planar Configuration: single image plane
Photoshop Data: <present>, 19524 bytes
1 Strips:
0: [ 24478, 81000000]
Suppose I want to build an overview that exactly matches 1:10000 scale.
I am using RESOLUTION 96 in my map file (this is required for proper
function of PDF print, as p.mapper doc says). I am using 18 tiff files
similar to this one and I have built a TILEINDEX shapefile. I have a map
SIZE 480 396, and the EXTENT 5404200.000000 4965100.000000
5414801.640459 4974500.000000. Are there enough informations? Sorry I
learn best on real example so this would help me very much.
regards, dejan
-----Original Message-----
From: UMN MapServer Users List [mailto:MAPSERVER-USERS at LISTS.UMN.EDU] On
Behalf Of Ed McNierney
Sent: Wednesday, May 25, 2005 6:45 PM
To: MAPSERVER-USERS at LISTS.UMN.EDU
Subject: Re: [UMN_MAPSERVER-USERS] Display progress bar while waiting
for data
Dejan -
Look at the GDAL documentation for the gdaladdo utility to find out
about building overviews. That is a feature that's entirely internal to
GDAL, not MapServer.
The MapServer map file MINSCALE and MAXSCALE settings are used to limit
the minimum and maximum view scales permitted for that map file. Your
own user interface can constrain the scale values to specific settings.
For example, on TopoZone you can look at this map:
http://www.topozone.com/map.asp?lat=44.9225&lon=-115.92167
And you can use the View Scale menu on the left to change the "zoom
level" or scale at which the map is viewed. The menu interface limits
the View Scale not only to a minimum and maximum value, but also
constrains it to be one of the 11 choices displayed.
- 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: Gambin Dejan [mailto:Dejan.Gambin at pula.hr]
Sent: Wednesday, May 25, 2005 9:20 AM
To: Ed McNierney
Cc: MAPSERVER-USERS at LISTS.UMN.EDU
Subject: RE: [UMN_MAPSERVER-USERS] Display progress bar while waiting
for data
OK thanks, you helped me very much. The thing is that I could not find
much informations about overviews untill I noticed it is called
"pyramids". Can you just tell me where do I set the output image
resolution? There is RESOLUTION mapo file parameter but it only affects
scale computations (as documentation says)? Or it is just the matter of
map size parameter?
Thanks very much
Dejan Gambin
-----Original Message-----
From: Ed McNierney [mailto:ed at topozone.com]
Sent: Wednesday, May 25, 2005 3:13 PM
To: Gambin Dejan
Cc: MAPSERVER-USERS at LISTS.UMN.EDU
Subject: RE: [UMN_MAPSERVER-USERS] Display progress bar while waiting
for data
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