Hi list,

I have a classified raster layer and i'm trying to get de sld string, using
PHP/mapscript, but $layer->generetaSLD method returns an empty SLD.

This code (works for vector layers):

$layer = $mapobject->getLayerByName("ImagenSatelitalbajares");
$layer->set('status', MS_ON);
echo $layer->generateSLD():

prints:

<StyledLayerDescriptor version="1.0.0"
xmlns="http://www.opengis.net/sld";
xmlns:gml="http://www.opengis.net/gml";
xmlns:ogc="http://www.opengis.net/ogc";
xmlns:xlink="http://www.w3.org/1999/xlink";
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
xsi:schemaLocation="http://www.opengis.net/sld
http://schemas.opengis.net/sld/1.0.0/StyledLayerDescriptor.xsd";></StyledLayerDescriptor>


Layer definition:

LAYER
  NAME "ImagenSatelitalbajares"
  TYPE RASTER
  STATUS OFF
  CLASS
    NAME "Clase 0"
    EXPRESSION ([pixel] >= 20 AND [pixel] < 30)
    STYLE
      COLOR 0 255 0
    END
  END
  CLASS
    NAME "Clase 1"
    EXPRESSION ([pixel] >= 30 AND [pixel] < 40)
    STYLE
      COLOR 0 0 255
    END
  END
  CLASSITEM "[pixel]"
  DATA "../layers/raster/BlueMarble_Argentina.img"
  GROUP "grImagenSatelitalbajares"
  PROCESSING "BANDS=1"
  PROJECTION
    "init=epsg:900913"
  END
  TEMPLATE "foo.bar"
END

Mapserver version is 6.0.1.

Don't know if this is a bug or I'm doing something wrong.
Thanks in advance,

-- 
Juan Rapoport
SUR Emprendimientos Tecnológicos

Perú 345  Piso 5to Oficina "B" (C1067AAG)

Ciudad de Buenos Aires, Argentina
Tel. +54 (11) 4342-2976/84
juanrapop...@suremptec.com.ar <a...@suremptec.com.ar>
www.suremptec.com
_______________________________________________
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users

Reply via email to