Ok, ticket created at: http://trac.osgeo.org/mapserver/ticket/3668

Daniel

Am 07/02/2011 18:25, schrieb Lime, Steve D (DNR):
Documentation mod suggestions can be filed as tickets at http://trac.osgeo.org/mapserver. 
Just assign it to the "MapServer Documentation" component and we'll handle it 
like any other defect...

Steve

-----Original Message-----
From: [email protected] 
[mailto:[email protected]] On Behalf Of Jean-François 
Gigand
Sent: Monday, February 07, 2011 11:23 AM
To: Daniel Degasperi
Cc: [email protected]
Subject: Re: [mapserver-users] PHP Mapscript: generateSLD

You're welcome.

I think this precision would be useful in the documentation. Am not in
the MapServer team however, and don't know the process for suggesting
modifications in the doc.

It seems logical that msMapObj.generateSLD() only includes enabled
layers, but it's not that clear that it's the same for explicit calls
to msLayerObj.generateSLD().
It might also be considered as a program issue... Don't know.

Jeff

2011/2/7 Daniel Degasperi<[email protected]>
Hi Jeff,
thank you very much, now it works.

Should this information be included in the documentation?

Daniel

Am 07/02/2011 17:14, schrieb Jean-François Gigand:

Hi,

Maybe the layer has to be enabled (STATUS property) to appear in the SLD?
If you want to keep it disabled in your mapFile, you can enable it
programmatically just before calling generateSLD() by setting "status"
to MS_ON.

Jeff


2011/2/7 Daniel Degasperi<[email protected]>:

Hi,
I've used the function generateSLD from the layerObj class to create a sld
snippet, but the output was a empty sld file:

<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>

I'm using following mapfile with mapserver 5.6.5:

MAP
NAME "test.map"
SIZE 256 256
RESOLUTION 72


OUTPUTFORMAT
     NAME "aggpng24"
     DRIVER "AGG/PNG"
     MIMETYPE "image/png"
     IMAGEMODE RGB
     EXTENSION "png"
     FORMATOPTION "INTERLACE=OFF"
     TRANSPARENT ON
     FORMATOPTION "INTERLACE=OFF"
END
WEB
     METADATA
         "ows_onlineresource"
"http://dev/public/services/ows.php?map=test.map";
         "ows_title"    "test"
         "ows_abstract"    ""
         "wms_feature_info_mime_type"    "text/html"
         "ows_service_onlineresource"    ""
         "wms_srs"    "EPSG:32632 EPSG:4326 EPSG:900913"

     END
     IMAGEPATH "/tmp/ms_tmp/"
     IMAGEURL "/tmp/"
END

LAYER
     GROUP "test"
     NAME "test"
     TYPE LINE
     STATUS OFF
     METADATA
         "ows_title"    "test"
         "ows_extent"    "482003.57067363 5006503.5706736 537996.42932637
5062496.4293264"
         "ows_srs"    "EPSG:32632"
         "gml_geometries"    "the_geom"

     END
     PROJECTION
         "+proj=utm +zone=32 +ellps=WGS84 +datum=WGS84 +units=m +no_defs "
     END
     EXTENT 482003.57067363 5006503.5706736 537996.42932637 5062496.4293264
     CONNECTIONTYPE POSTGIS
     CONNECTION "user=test password=test dbname=test host=localhost
port=5432"
     DATA "the_geom FROM test USING UNIQUE gid USING SRID 32632"
     PROCESSING "CLOSE_CONNECTION=DEFER"
     SIZEUNITS pixels
     CLASS
         NAME "l103106"
         EXPRESSION ('[code]' eq 'L103106')
         STYLE
             COLOR 76 230 0
             SYMBOL "CIRCLE"
             SIZE 3
             MINSIZE 3
             MAXSIZE 3
             WIDTH 3
             MINWIDTH 3
         END
     END
     CLASS
         NAME "l103107"
         EXPRESSION ('[code]' eq 'L103107')
         STYLE
             COLOR 56 168 1
             SYMBOL "CIRCLE"
             SIZE 2
             MINSIZE 2
             MAXSIZE 2
             WIDTH 2
             MINWIDTH 2
         END
     END
END

###### SYMBOLS #######

SYMBOL
NAME "CIRCLE"
TYPE ELLIPSE
FILLED TRUE
POINTS
1 1
END
END


END #MAP

Can somebody help me?

Best regards,
Daniel

_______________________________________________
mapserver-users mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/mapserver-users




--
Daniel Degasperi
R3 GIS Srl - GmbH
Via Johann Kravogl-Str. 2
I-39012 Meran/Merano (BZ)
web: www.r3-gis.com
Email: [email protected]
Tel. : +39 0473 494949
Fax : +39 0473 069902

ATTENZIONE! Le informazioni contenute nella presente e-mail e nei documenti 
eventualmente allegati sono confidenziali. La loro diffusione, distribuzione 
e/o riproduzione da parte di terzi, senza autorizzazione del mittente è vietata 
e può violare il D. Lgs. 196/2003. In caso di ricezione per errore, Vogliate 
immediatamente informare il mittente del messaggio e distruggere la e-mail.

ACHTUNG! Die in dieser Nachricht oder in den beigelegten Dokumenten 
beinhalteten Informationen sind streng vertraulich. Ihre Verbreitung und/oder 
ihre Wiedergabe durch Dritte ist ohne Erlaubnis des Absenders verboten und 
verstößt gegen das Legislativdekret 196/2003. Sollten Sie diese Mitteilung 
irrtümlicherweise erhalten haben, bitten wir Sie uns umgehend zu informieren 
und anschließend die Mitteilung zu vernichten.

WARNING! This e-mail may contain confidential and/or privileged information. If 
you are not the intended recipient (or have received this e-mail in error) 
please notify the sender immediately and destroy this e-mail. Any unauthorised 
copying, disclousure or distribution of the material in this e-mail is strictly 
forbidden and could be against the law (D. Lgs. 196/2003)





_______________________________________________
mapserver-users mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/mapserver-users




--
*Daniel Degasperi*
*R3 GIS* Srl - GmbH
Via Johann Kravogl-Str. 2
I-39012 Meran/Merano (BZ)
web: www.r3-gis.com <http://www.r3-gis.com/>
Email: [email protected] <mailto:[email protected]>
Tel. : +39 0473 494949
Fax : +39 0473 069902

*ATTENZIONE!* Le informazioni contenute nella presente e-mail e nei documenti eventualmente allegati sono confidenziali. La loro diffusione, distribuzione e/o riproduzione da parte di terzi, senza autorizzazione del mittente è vietata e può violare il D. Lgs. 196/2003. In caso di ricezione per errore, Vogliate immediatamente informare il mittente del messaggio e distruggere la e-mail.

*ACHTUNG!* Die in dieser Nachricht oder in den beigelegten Dokumenten beinhalteten Informationen sind streng vertraulich. Ihre Verbreitung und/oder ihre Wiedergabe durch Dritte ist ohne Erlaubnis des Absenders verboten und verstößt gegen das Legislativdekret 196/2003. Sollten Sie diese Mitteilung irrtümlicherweise erhalten haben, bitten wir Sie uns umgehend zu informieren und anschließend die Mitteilung zu vernichten.

*WARNING!* This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error) please notify the sender immediately and destroy this e-mail. Any unauthorised copying, disclousure or distribution of the material in this e-mail is strictly forbidden and could be against the law (D. Lgs. 196/2003)





_______________________________________________
mapserver-users mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/mapserver-users

Reply via email to