Hi,
I'm new to this list. A quick search did not find answers to two mapserver
speed-optimization questions. Can someone please
help?
1. The following two lines of PHP from my application transform an php image
object into a raster map layer:
imagepng($rmap, __MAPS_PATH__ . "resource.png");
$map->getLayerByName("resource")->set("data", __MAPS_PATH__ . "resource.png");
The imagepng call is a major bottleneck when the extent of the layer is large.
Can the data in
image "$rmap" be accessed for layer "resource" directly, without the file
write/read? If so, how? FYI, the following lines appear in my mapfile:
LAYER
NAME resource
DATA "resource.png"
TYPE raster
PROCESSING "RESAMPLE=NEAREST"
END
2. When
large vector layers are included in the map, or when the layer consists of
labels, the mapObj's draw method is slow, even if only a small portion of the
layer data is needed.
Sample SQL that created the layer data column is:
CREATE TABLE domains (
domid integer PRIMARY KEY,
...
);
SELECT AddGeometryColumn('','domains','boundaries','4326','MULTIPOLYGON',2);
\i boundaries.sql; /* contains a bunch of INSERT INTOs */
CREATE INDEX dombound_idx ON domains USING gist (boundaries);
ALTER TABLE domains CLUSTER ON dombound_idx;
and the mapfile has:
LAYER
CONNECTIONTYPE postgis
PROCESSING "CLOSE_CONNECTION=DEFER"
NAME boundaries
DATA "boundaries from domains using unique
domid"
TYPE POLYGON
CLASS
...
END
END
Any suggestions for speeding this up?
Thanks a bunch,
Vince
_______________________________________________
mapserver-users mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/mapserver-users