Fatal error: Allowed memory size of 8388608 bytes exhausted
Brought to you by:
retroj
Big shapefiles can cause jjfmapper to use more memory
than the limit as set in php.ini.
It is possible to set the memory limit within a php
script, like this:
ini_set("memory_limit","20M");
But I am more inclined to improve memory efficiency of
the shapefile module itself.
Logged In: YES
user_id=983545
I ran into this same error when reading a rather large gpx
file. To that end I have added a couple of features to
xml_detail_parser that allow it to conserve memory.
It does not, by default, store a copy of each tag any more.
It now accepts as an option, a list of xml elements to
support. Only those elements will be parsed into memory.
This means that, for instance, a gpx document nested in a
jjfmapper config document, will not be parsed as part of the
jjfmapper config data structure. Furthermore, the gpx
module only stores in memory those elements from the gpx
document that it needs.
Logged In: YES
user_id=983545
I have also changed several instance of "pass by value" to
"pass by reference". I won't list them all, but this is one
method that I will continue to use to try to cinch down the
memory consumption of the mapper.
I do want to mention that this 8MiB limitation is not
something I expect to ever fix completely. The nature of
cartography is such that one can always use more memory, cpu
speed, and network power.