On Wed, 29 Apr 2015 04:26:03 -0700 (PDT),
jose.che...@gmail.com
wrote:
> What would be the way to know, for a given raster coverage, which is
> the maximum number of pixels that you can retrieve from GetMapImage
> without crashing, it is try and error the only way?
>
> The functions returns NULL
>
Hi Jose,
rasterlite2 is never expected to crash, it's always expected to
gracefully fail.
sometimes it could refuse to service any potentially harmful
request; and in this case a NULL will be usually returned.
if you do actually experience some crash this is surely due
to some unresolved bug and certainly isn't intentional.
anyway a function call returning NULL is not at all a crash;
it's more probably the effect of some safety precaution adopted
in order to avoid a possible crash.
GetMapImaage() requires a big bunch of free RAM in order to create
very big images, and the actual amount of RAM your process can
be effectively able to allocate strongly varies depending on the
operating system, the hardware configuration and many other
factors (e.g. actual workload, memory fragmentation and alike).
so GetMapImage() will refuse to start servicing any request
exceeding what prudence and good common sense consider to be
a "reasonable size".
this limit varies from version to version, anyway you can
safely assume that any request in excess of 4096x4095 pixels
could be probably rejected.
anyway this is not a big limitation: you simply have to export
a mosaic of precisely framed images, each one of them presenting
a reasonably contained size.
bye Sandro