Andrea Aime ha scritto:
Salve a tutti,
ho un quesito per gli esperti di mapserver. Vorrei produrre
con mapserver la solita mappa topp:states usata nelle
demo di GeoServer, di cui allego una copia in questa mail.
Ora, se non ho capito male per ottenere lo stesso risultato
in mapserver devo definire tre layer, uno per i poligoni
con i filtri sul numero di persone (è quello che pilota
il colore del poligono), uno per disegnare i bordi,
uno per le etichette.
Hum, mi ha fatto notare Flavio offline che in effetti
posso unire il layer che riempie i poligoni con quello
che disegna i bordi. L'aberrazione nel disegno c'e', ma
si vede solo usando un client tiling come OpenLayers,
se invece si chiede la mappa in un botto solo l'output
è corretto. (il suggerimento di usare tre layer separati l'ho trovato
sul tutorial di mapserver:
http://biometry.gis.umn.edu/tutorial/example1-4.html).
Resta il fatto che se cerco di mettere tutto in un solo
layer, come nel mapfile allegato, le etichette non vengono
disegnate...
Ciao
Andrea
# Map server benchmark map file
MAP
IMAGETYPE PNG
EXTENT -180 -90 180 90
SIZE 400 300
SHAPEPATH "./data"
IMAGECOLOR 255 255 255
FONTSET "./fonts/fonts.list"
# Debug
# CONFIG "MS_ERRORFILE" "/home/aaime/public_html/bench/tmp/mapserver.log"
# DEBUG 2
# WMS and WFS metadata
WEB
METADATA
"wms_title" "WMS Demo Server"
"wms_onlineresource"
"http://localhost/cgi-bin/mapserv?map=/bench/bench.map&"
"wms_srs" "EPSG:4326"
"wfs_title" "WFS Demo Server"
"wfs_onlineresource"
"http://localhost/cgi-bin/mapserv?map=/bench/bench.map&"
"wfs_srs" "EPSG:4326"
END
END
# Projection (shared by all layers)
PROJECTION
"init=epsg:4326"
END
# STATE_POLYGONS
LAYER
NAME states
METADATA
"wms_title" "Distribution of population in USA, polygons"
END
PROCESSING "CLOSE_CONNECTION=DEFER"
DATA states
STATUS OFF
TYPE POLYGON
LABELITEM "STATE_ABBR"
CLASS
NAME 'less than 2M'
EXPRESSION ([PERSONS] < 2000000)
STYLE
COLOR 77 255 77
OUTLINECOLOR 0 0 0
END
END
CLASS
NAME 'between 2M and 4M'
EXPRESSION (2000000 <= [PERSONS] AND [PERSONS] < 4000000 )
STYLE
COLOR 255 77 77
OUTLINECOLOR 0 0 0
END
END
CLASS
NAME 'more than 4M'
EXPRESSION ([PERSONS] >= 4000000 )
STYLE
COLOR 77 77 255
OUTLINECOLOR 0 0 0
END
END
CLASS
NAME 'labels'
LABEL
COLOR 0 0 0
ANTIALIAS FALSE
TYPE TRUETYPE
FONT "Times"
SIZE 12
POSITION CC
PARTIALS FALSE
END
END
END
# End of map file
END
_______________________________________________
Iscriviti all'associazione GFOSS.it: http://www.gfoss.it/drupal/iscrizione
[email protected]
http://www.faunalia.com/cgi-bin/mailman/listinfo/gfoss
Questa e' una lista di discussione pubblica aperta a tutti.
I messaggi di questa lista non rispecchiano necessariamente
le posizioni dell'Associazione GFOSS.it.