[OSM-dev] "The Future of Areas" - polygon service benchmark

Jukka Rahkonen jukka.rahkonen at latuviitta.fi
Tue May 10 09:22:11 BST 2011


Hi,

Here are some numbers for demonstrating the efficiency that could be
obtained if we had ready made OSM polygons available through a service.

The test data are imported into PostGIS database from the Geofabrik
finland.osm.bz2 file with osm2pgsql. The server is a modest Ubuntu 10.04
virtual server with 768 MB of memory. Disk is probably not anything
special because the server costs 22 € per month. Server is running both
the database (PostgreSQL 9.0 with PostGIS 1.5.2) and WFS server (TinyOWS
1.0 release candidate). TinyOWS is running in a slow way on Apache2 server
as cgi-bin. Data are also re-projected on-the-fly from EPSG:3067 used in
the database into EPSG:4326. I have tried to do everything for avoiding
over optimistic results.

The test request was

wget
"http://188.64.1.61/cgi-bin/tinyows?service=wfs&version=1.0.0&request=getfeature&typename=tows:osm_polygon&srsname=EPSG:4326&filter=%3CFilter%20%20xmlns:ogc=%22http://www.opengis.net/ogc%22%3E%3CPropertyIsEqualTo%3E%3CPropertyName%3Etows:natural%3C/PropertyName%3E%3CLiteral%3Ewater%3C/Literal%3E%3C/PropertyIsEqualTo%3E%3C/Filter%3E"
-O osm_polygon_test.gml


The dataset statistics about the output of the WFS request above are

Number of polygons   53617
Number of holes      14843
Max. holes/polygon     702
Number of vertises 1895074
Size of GML output 61.3 MB

In my test the total time from sending the request to closing the
connection was 86 seconds. Feel free to verify the test yourself. It would
also be interesting to see the numbers about the speed we can reach now
when we do not have prebuilt polygons to download. I do not know what
might be the fastest alternative. Perhaps to download finland.osm.pbf,
sorting out by natural=water tag and importing with osm2pgsql, or?

-Jukka Rahkonen-





More information about the dev mailing list