[Geoserver-devel] Postgis simplify Test!

Hi all,
this is the polygon simplification test I was talking about
yesterday during the meeting. As you can see, there is a marked
improvement in having postgis do the decimation compared to doing it
in the renderer.

Many thanks to Andrea Cappugi for pointing this out.

Cheers
Andrea

-------- Messaggio Originale --------
Oggetto: simplify Test!
Data: Tue, 5 Jun 2007 14:41:09 +0200
Da: Andrea Cappugi <kappu@anonymised.com>
A: Andrea Aime <aaime@anonymised.com>

Hi Andrea, I have made a very simple test to evaluate geoserver
performance when it uses postgis simplify function! The idea is to
reduce the amount of data that pass from postgis to geoserver.
Geoserver already has a generalization algorithm, but when it uses
postgis, it's possible to move this operation inside the db. This
test tries to understand if the reduced amount of data passing from
postgis to geoserver, compensate, in terms of speed, the generalized
operation required to postgis.

HW:
  cpu Intel(R) Pentium(R) 4 CPU 3.00GHz
  ram: 1027544 kB
SW:
  OS: Linux version 2.6.15-26-server (buildd@anonymised.com) (gcc version
4.0.3 (Ubuntu 4.0.3-1ubuntu5))
  Java version "1.6.0"
  Tomcat-5.5.20
  PostgerSQL 8.1.4
  Postgis 1.1.3
  Geos 2.2.3
  Geoserver 1.5.1

Test:
I have imported one shape (Global administrative unit layer from
FAO) file in postgis (32143 rows MULTIPOLIGON) and I have published
it in geoserver (Gaul 1).
I have created a view of Gual 1 :
"SELECT gaul1.gid, gaul1.area, gaul1.perimeter, gaul1.g0000_1_,
gaul1.g0000_1_id, gaul1.adm1_code, gaul1.adm0_code, gaul1.adm0_name,
gaul1.adm1_name, gaul1.last_updat, gaul1.continent, gaul1.region,
gaul1.salb1, gaul1.salb0, gaul1.str_year0, gaul1.str_year1,
gaul1.exp_year0, gaul1.exp_year1, simplify(gaul1.the_geom,
0.6::double precision) AS the_geom FROM gaul1;"
and I have published in geoserver ( Gaul 1 Generalized ).
  From the map preview page of geoserver I have request the tow
different layers, and I have checked the time needed by geoserver to
produce the maps with fire bug.
I have repeated this test more times.
In all the tests the generalized layer has resulted faster then the
original one.
The results, in terms of speed, differ from a minimum of 15% to a
maximum of 50%

Time to produce all extent in tow tiles:
Gual 1 (sec) 14,8* 8,78** 8,6 8,52 8,68
Gaul 1 Generalized (sec) 6,95* 5,26** 4,9 5,47 4,94

Time to produce all extent in one tile:
Gual 1 (sec) 7,56 7,42
Gaul 1 Generalized (sec) 4,14 4,05

* Geoserver just started
** Postgres just started

This example is available at http://gonfi.org/geoserver/
mapPreview.do, the server is GEOSERVER,
the layers Gaul 1 and Gaul 1 Generalized. It works only with firefox.
Feel free to play with it.

Conclusion:
I know this is not a valid test, but can help (I hope).

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Geoserver-devel mailing list
Geoserver-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-devel

!DSPAM:4022,46655b9c62631628642973!