[mapserver-users] reverse the order of shapes of a layer
Scout
topdog at narginen.com
Fri Jan 23 11:46:23 PST 2015
Hello,
I am using phpmapscript with mapserver 6.4.1.
I would like to be able to reverse the order of the shapes in a layer
before drawing the map.
I want to draw the map both ways, actually. I need it drawn
right-side-up and up-side-down. It is simple to reverse the order of
the layers of the map, just (in phpmapscript):
##################
// make arrays to hold the current and reversed orders
$layerOrder = array ();
$layerOrder = $map->getlayersdrawingorder();
$reversed = array_reverse($layerOrder);
// reverse the order for upside-down
$r = $map->setlayersdrawingorder($reversed);
// reset the order for upside-up
$r = $map->setlayersdrawingorder($layerOrder);
##################
Is there something equivalent for the shapes within a layer? Maybe a
layer PROCESSING directive SQL call like: "select * from layer order by
fid desc"? Or define the layer with OGR CONNECTIONTYPE and CONNECTION
back to itself and a SQL call like above?? Maybe I need to build a new
layer adding the shapes in reversed order?
Thanks!
More information about the MapServer-users
mailing list