---------- Forwarded message ----------
From: Simone Giannecchini <simboss1@anonymised.com>
Date: Mar 10, 2006 9:18 PM
Subject: Re: [Geoserver-users] How to increase the Performance of
image rendering
To: Chris Holmes <cholmes@anonymised.com>
Cc: Akkineni Vijay <akkineniv@anonymised.com>,
"geoserver-users@lists.sourceforge.net"
<geoserver-users@lists.sourceforge.net>
Hi akkineni (or vijai?
),
here attached you'll find a simple utility packed as an eclipse
project which will open up a world image or a geotiff and will rewrite
it tiled as a geotiff.
Libraries are in the lib folder, you simply have to feed the util
with the name of the file to read (as an instance c:/a.tiff) and the
absolute path of the final geotiff (c:/a_tiled.tiff). You need to have
JAI and ImageIO tools installed (look in geotolls guide if you don't
know what they are).
Once you have the tiled geotiff you have to move the geotiff under a
dir (let's call it my_dir) under data/coverages in geoserver.
At this point go to config->data->coveragestore click new and select
tagged image file format blah blah, it stands for geotiff ( I have to
change that I know). Select a unique name and submit. In the url
textbox insert the path to the file and submit. Everything should go
fine, if so apply and save.
Now go to config->data->coverage and select new. Select in the combo
the previous coverage store. and press new. Select the raster style
and leave everything else as it is, wcs won't work but wms will.
Submit, apply and save and you will be ready to go.
One suggestion the raster style is just a simple dumb file which we
ignore for geotiff files. I suggest you play with the max scale in
order to decide when you high res image will jump in in order to avoid
wating resources for showing a 3x3 image out of a 4000x4000 geotiff.
An example which should be good for you would be as follows
<?xml version="1.0" encoding="UTF-8"?>
<StyledLayerDescriptor xmlns="http://www.opengis.net/sld"
xmlns:ogc="http://www.opengis.net/ogc"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.opengis.net/sld
http://schemas.opengis.net/sld/1.0.0/StyledLayerDescriptor.xsd" version="1.0.0">
<UserLayer>
<Name>raster_layer</Name>
<UserStyle>
<Name>raster</Name>
<Title>A boring default style</Title>
<Abstract>A sample style for rasters</Abstract>
<FeatureTypeStyle>
<FeatureTypeName>Feature</FeatureTypeName>
<Rule>
<MaxScaleDenominator>100000</MaxScaleDenominator>
<RasterSymbolizer>
<Opacity>1.0</Opacity>
<ColorMap>
<ColorMapEntry color="#000000"
quantity="-500"
label="nodata" opacity="0.0"/>
<ColorMapEntry color="#00ff00"
quantity="-500" label="values"/>
<ColorMapEntry color="#00fa00"
quantity="-417" label="values"/>
<ColorMapEntry color="#14f500"
quantity="-333" label="values"/>
<ColorMapEntry color="#28f502"
quantity="-250" label="values"/>
<ColorMapEntry color="#3cf505"
quantity="-167" label="values"/>
<ColorMapEntry color="#50f50a"
quantity="-83" label="values"/>
<ColorMapEntry color="#64f014"
quantity="-1" label="values"/>
<ColorMapEntry color="#7deb32"
quantity="0" label="values"/>
<ColorMapEntry color="#78c818"
quantity="30" label="values"/>
<ColorMapEntry color="#38840c"
quantity="105" label="values"/>
<ColorMapEntry color="#2c4b04"
quantity="300" label="values"/>
<ColorMapEntry color="#ffff00"
quantity="400" label="values"/>
<ColorMapEntry color="#dcdc00"
quantity="700" label="values"/>
<ColorMapEntry color="#b47800"
quantity="1200" label="values"/>
<ColorMapEntry color="#c85000"
quantity="1400" label="values"/>
<ColorMapEntry color="#be4100"
quantity="1600" label="values"/>
<ColorMapEntry color="#963000"
quantity="2000" label="values"/>
<ColorMapEntry color="#3c0200"
quantity="3000" label="values"/>
<ColorMapEntry color="#ffffff"
quantity="5000" label="values"/>
<ColorMapEntry color="#ffffff"
quantity="13000" label="values"/>
</ColorMap>
<OverlapBehavior>
<AVERAGE/>
</OverlapBehavior>
<ShadedRelief/>
</RasterSymbolizer>
</Rule>
</FeatureTypeStyle>
</UserStyle>
</UserLayer>
</StyledLayerDescriptor>
I suggest you set up a style for the geotiff including max scale
tehrefore your geotiff will not appear unless you zoom in properly.
Just replace the original raster style with this one or import it as a
new one (check the list for doing that) and your geotiff won't appear
unless you zoom in properly.
As far as building from code the process is equal to the original
geoserver I would just download the code and proceed with ant
test-ext. As a preliminary step set the build.properties to point to
your directories (tomcat and such).
I hope I provided enough info, I wont' be around tomorrow, but I will
be on sunday, I am sure we will make it for this monday!
Ciao,
Simone.
On 3/8/06, Chris Holmes <cholmes@anonymised.com> wrote:
https://svn.codehaus.org/geoserver/branches/wcs-branch/trunk/geoserver/
is where the code lives. Notes about setting up subversion are here:
http://docs.codehaus.org/display/GEOSDOC/Subversion
and here: http://docs.codehaus.org/display/GEOSDOC/Source+Code
Use the url I gave above instead of the one's in the examples, to get
the wcs branch instead of geoserver trunk.
Chris
Akkineni Vijay wrote:
> Hi Guys,
>
> Sorry for asking such silly question . can u sugest
> how can i get the latest version from subversion .
>
> Regards,
> Vijay Akkineni.
>
> On 3/4/06, Simone Giannecchini <simboss1@anonymised.com> wrote:
>
>>Hi Vijay, Hi all,
>>I have a couple of advices.
>>The version of the WCS you are using (0.2) was largely UNoptimized for
>>large data set, hence the only way you can improved speed is reduce
>>the size of the data set you want to show. However this is a real bad
>>solution, I know.
>>
>>What I suggest is as follows:
>>instead of using version 0.2 of WCS do a fresh export from the svn
>>repository of the latest development version and build it. This
>>version contains many improvemenets as far as it concerns with
>>rendering large data sets, since it DOES support tiling and deferred
>>loading (which means I load only what you need when you really need
>>it) as well as minscale, max scale, which allows you to decide whether
>>your layer pops in depending on the level of zoom. In addition, and
>>this is true for EVERY map server I know you need to tile your tiff
>>image in order to speed things up. A simple way to do this is using
>>one of the gdal utilities you can freely download from the internet. I
>>have some utilites I wrote in Java but until next wednesday I won't be
>>able to share them.
>>
>>I know I am being a bit fuzzy, but I have a live demostration next
>>wednesday, therefore I am a bit busy. After wednesday, if I don't get
>>fired (hopefully not) I will guide you through the process of setting
>>up the new WCS since I am intersting in having someone else testing
>>it. I can assure that performances, if the server is well tuned, are
>>very very good. I have been testing it myself with a 2GB geotiff for
>>the new marble next generation.
>>
>>Hope this sounds good for you.
>>
>>Simone.
>>
>>
>>°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°
>>Simone Giannecchini
>>Software Engineer
>>Freelance Consultant
>>
>>http://simboss.wordpress.com/
>>
>>°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°
>>On 3/3/06, Chris Holmes <cholmes@anonymised.com> wrote:
>>
>>>Did you download the 1.3 rc 2 release, or are you working off of the
>>>subversion repository? There have been a lot of performance
>>>improvements I believe since the last release, so you could benefit just
>>>by working off of subversion, or waiting a few weeks till the next release.
>>>
>>>best regards,
>>>
>>>Chris
>>>
>>>Akkineni Vijay wrote:
>>>
>>>>Hi Guys,
>>>>
>>>> I am using Geoserver 1.3 wcs version and mapbuilder to show
>>>>the images . I have a tiff image which is around 50mb and i have
>>>>created a coverage for that image and i am using wms to render the
>>>>image in the mapbuilder i am able to show the image in the mapbuilder
>>>>but it is very slow ..how can i increase the performance . Is there
>>>>any other way ...please help.
>>>>
>>>>regards,
>>>>Vijay Akkineni.
>>>>
>>>>
>>>>-------------------------------------------------------
>>>>This SF.Net email is sponsored by xPML, a groundbreaking scripting language
>>>>that extends applications into web and mobile media. Attend the live webcast
>>>>and join the prime developer group breaking into this new coding territory!
>>>>http://sel.as-us.falkag.net/sel?cmd=lnk&kid0944&bid$1720&dat1642
>>>>_______________________________________________
>>>>Geoserver-users mailing list
>>>>Geoserver-users@lists.sourceforge.net
>>>>https://lists.sourceforge.net/lists/listinfo/geoserver-users
>>>
>>>--
>>>Chris Holmes
>>>The Open Planning Project
>>>thoughts at: http://cholmes.wordpress.com
>>>
>>>
>>>
>>
>>
>>--
>>
--
Chris Holmes
The Open Planning Project
thoughts at: http://cholmes.wordpress.com
--
°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°
Simone Giannecchini
Software Engineer
Freelance Consultant
http://simboss.wordpress.com/
°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°
--
°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°
Simone Giannecchini
Software Engineer
Freelance Consultant
http://simboss.wordpress.com/
°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°