[mapserver-users] high memory usage on map draw
thomas bonfort
thomas.bonfort at gmail.com
Tue Nov 29 00:33:42 PST 2011
On Tue, Nov 29, 2011 at 09:20, Daniele Debernardi <daniele at geosar.ch> wrote:
> Hi,
> with mapserver trunk version (but i think with others too) I have to
> generate very big map to be imported in a pdf file.
> I use php mapscript to generate maps with 300 dpi for an A1/A0 pdf page or
> bigger.
> This mean that the map has dimensions like 15000x25000 pxl and when I call
> the MapObj->draw method i get this error:
>
> PHP Warning: mapObj::draw(): [MapServer Error]: agg2CreateImage():
> mapagg.cpp: 708: Out of memory allocating 1550851152 bytes.
>
> Map server is configured with the AGG/PNG driver with imagemode RGBA.
>
> Is it normal that need so much memory to generate the image?
>
> I already tryied the php ini_set memory_limit but with a limit of 2048M i
> still have some problem with memory.
>
> I checked other possible outputs but generating maps in pdf through Cairo
> driver but doc says that polygons filled with symbols are not supported, and
> for that reason I cant use it.
> SVG output has some limitations too like line drawn without symbols or
> pixmap symbols not supported.
All those features are supported by the pdf renderer, cf
http://trac.osgeo.org/mapserver/browser/trunk/msautotest/renderers/expected
(all files ending in .pdf.png are actually pdfs not pngs)
Pixmap symbols are not scaled when using higher resolution (i,e
resolution/defresolution) output, but that is inherent to the pixmap
symbols themselves, not mapserver (i.e. if you want high res output,
you should ban the usage of pixmap symbols, and prefer symbols that
can be scaled correctly)
>
> Is there a better way to generate so big map images and imported in a pdf
> file?
>
> Hope you guys can help me.
>
> Daniele
> _______________________________________________
> mapserver-users mailing list
> mapserver-users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapserver-users
>
More information about the MapServer-users
mailing list