[Tilesathome] Multipolygon relations can cause inkscape to use up all memory/crash
Robert Fitzsimons
robfitz at 273k.net
Tue Nov 20 20:28:24 GMT 2007
I had a look at one of the tiles which was causing all the system memory
to be used up on one of my 2GB computers, on my home computers with
1.5GB inkscape crashed. The tile was 2501,2236. I was expecting the
tile to be very complex but it only contained coastline ways.
While looking at the downloaded/preprocessed osm file and the resulting
SVG files, the SVG file size didn't seem correct, it had 1500 lines but
was over 18 MB in size. The file size come from the fact that the
path's for the areas contained over 4000 points and that there are over
120 exact copies of the path.
Looking at osmarender.xsl I was able to figure out that the template
generateAreaPath was causing the problem. A way which is contained in a
multipolygon relation, has all the relations ways added to it's path,
but this same step is then also done for every way in the relation.
I made a few experiments with modifications to osmarender.xml but these
didn't really work, maybe someone more familiar with XSLT/XPATH might be
able to come up with a suitable patch. For this tile the relation was
created by the close-areas.pl preprocessor, which I was easily able to
disable, but the resulting SVG didn't look as good as when all the ways
are output as a single path.
Robert
More information about the Tilesathome
mailing list