Class order in mapfile

Gregor Mosheh gregor at HOSTGIS.COM
Thu Apr 26 03:50:31 PDT 2007


> If I understand correctly, classes in a layer are not rendered in the
> order they appear in the layer, but as they are encountered in the
> dataset, e.g. a shapefile.

Correct. Features are rendered in the order they appear in the data
source. The selection of class for a feature is a first-match based on the
classes' criteria.


> A workaround could for instance be seperating classes into layers.
> Any other workarounds?

Another could be to sort your dataset to fit your classes. Using
PostgreSQL, the CLUSTER command will physically sort a table by the given
criteria. There may or may not be something you could do with shapefiles
to accomplish this same goal. (in a pinch, I suppose you could shp2pgsql,
cluster, pgsql2shp)



-- 
HostGIS
Cartographic development and hosting services
707-822-9355
http://www.HostGIS.com/

"Remember that no one cares if you can back up, only if you can restore."
- AMANDA



More information about the MapServer-users mailing list