Skip to content

Instantly share code, notes, and snippets.

@luipir
Created January 10, 2014 10:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save luipir/8350124 to your computer and use it in GitHub Desktop.
Save luipir/8350124 to your computer and use it in GitHub Desktop.
related to pull request: https://github.com/mapserver/mapserver/pull/4836 first file: sld generated by rt_mapserver_exporter qgis plugin second file: map file generated by rt_mapserver_exporter sld is esported by qgis to generate mapfile usign applySLD mapscript api
<?xml version="1.0" encoding="UTF-8"?>
<StyledLayerDescriptor xmlns="http://www.opengis.net/sld" xmlns:ogc="http://www.opengis.net/ogc" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.1.0" xmlns:xlink="http://www.w3.org/1999/xlink" xsi:schemaLocation="http://www.opengis.net/sld http://schemas.opengis.net/sld/1.1.0/StyledLayerDescriptor.xsd" xmlns:se="http://www.opengis.net/se">
<NamedLayer>
<se:Name>formapuntuale</se:Name>
<UserStyle>
<se:Name>formapuntuale</se:Name>
<se:FeatureTypeStyle>
<se:Rule>
<se:Name>2020</se:Name>
<se:Description>
<se:Title>2020</se:Title>
</se:Description>
<ogc:Filter>
<ogc:PropertyIsEqualTo>
<ogc:PropertyName>tipo_forma</ogc:PropertyName>
<ogc:Literal>2020</ogc:Literal>
</ogc:PropertyIsEqualTo>
</ogc:Filter>
<se:PointSymbolizer>
<se:Graphic>
<se:ExternalGraphic>
<se:OnlineResource xlink:type="simple" xlink:href="/mnt/data/PROGRAMMING/FAUNALIA/qgis-plugins/PLUGIN_TEST_DATA/rt_mapserver_exporter/export_svg-tiket309/test-splite/simbologie_e_vestizioni_continuum/regione_toscana_geologia_continuum/Antica-dir-scorr-fluv-2020.svg"/>
<se:Format>image/svg+xml</se:Format>
</se:ExternalGraphic>
<se:Size>2.5</se:Size>
<se:Rotation>
<ogc:Filter>
<ogc:Add>
<ogc:PropertyName>direzio</ogc:PropertyName>
<ogc:Literal>0</ogc:Literal>
</ogc:Add>
</ogc:Filter>
</se:Rotation>
</se:Graphic>
</se:PointSymbolizer>
</se:Rule>
<se:Rule>
<se:Name>3010</se:Name>
<se:Description>
<se:Title>3010</se:Title>
</se:Description>
<ogc:Filter>
<ogc:PropertyIsEqualTo>
<ogc:PropertyName>tipo_forma</ogc:PropertyName>
<ogc:Literal>3010</ogc:Literal>
</ogc:PropertyIsEqualTo>
</ogc:Filter>
<se:PointSymbolizer>
<se:Graphic>
<se:ExternalGraphic>
<se:OnlineResource xlink:type="simple" xlink:href="/mnt/data/PROGRAMMING/FAUNALIA/qgis-plugins/PLUGIN_TEST_DATA/rt_mapserver_exporter/export_svg-tiket309/test-splite/simbologie_e_vestizioni_continuum/regione_toscana_geologia_continuum/Princ-cavita-ipo-3010.svg"/>
<se:Format>image/svg+xml</se:Format>
</se:ExternalGraphic>
<se:Size>4</se:Size>
<se:Rotation>
<ogc:Filter>
<ogc:Add>
<ogc:PropertyName>direzio</ogc:PropertyName>
<ogc:Literal>0</ogc:Literal>
</ogc:Add>
</ogc:Filter>
</se:Rotation>
</se:Graphic>
</se:PointSymbolizer>
</se:Rule>
<se:Rule>
<se:Name>3030</se:Name>
<se:Description>
<se:Title>3030</se:Title>
</se:Description>
<ogc:Filter>
<ogc:PropertyIsEqualTo>
<ogc:PropertyName>tipo_forma</ogc:PropertyName>
<ogc:Literal>3030</ogc:Literal>
</ogc:PropertyIsEqualTo>
</ogc:Filter>
<se:PointSymbolizer>
<se:Graphic>
<se:ExternalGraphic>
<se:OnlineResource xlink:type="simple" xlink:href="/mnt/data/PROGRAMMING/FAUNALIA/qgis-plugins/PLUGIN_TEST_DATA/rt_mapserver_exporter/export_svg-tiket309/test-splite/simbologie_e_vestizioni_continuum/regione_toscana_geologia_continuum/DolinaCrollo-point-3030.svg"/>
<se:Format>image/svg+xml</se:Format>
</se:ExternalGraphic>
<se:Size>3</se:Size>
<se:Rotation>
<ogc:Filter>
<ogc:Add>
<ogc:PropertyName>direzio</ogc:PropertyName>
<ogc:Literal>0</ogc:Literal>
</ogc:Add>
</ogc:Filter>
</se:Rotation>
</se:Graphic>
</se:PointSymbolizer>
</se:Rule>
<se:Rule>
<se:Name>5040</se:Name>
<se:Description>
<se:Title>5040</se:Title>
</se:Description>
<ogc:Filter>
<ogc:PropertyIsEqualTo>
<ogc:PropertyName>tipo_forma</ogc:PropertyName>
<ogc:Literal>5040</ogc:Literal>
</ogc:PropertyIsEqualTo>
</ogc:Filter>
<se:PointSymbolizer>
<se:Graphic>
<se:ExternalGraphic>
<se:OnlineResource xlink:type="simple" xlink:href="/mnt/data/PROGRAMMING/FAUNALIA/qgis-plugins/PLUGIN_TEST_DATA/rt_mapserver_exporter/export_svg-tiket309/test-splite/simbologie_e_vestizioni_continuum/regione_toscana_geologia_continuum/Duomo-5040.svg"/>
<se:Format>image/svg+xml</se:Format>
</se:ExternalGraphic>
<se:Size>3</se:Size>
<se:Rotation>
<ogc:Filter>
<ogc:Add>
<ogc:PropertyName>direzio</ogc:PropertyName>
<ogc:Literal>0</ogc:Literal>
</ogc:Add>
</ogc:Filter>
</se:Rotation>
</se:Graphic>
</se:PointSymbolizer>
</se:Rule>
<se:Rule>
<se:Name>5050</se:Name>
<se:Description>
<se:Title>5050</se:Title>
</se:Description>
<ogc:Filter>
<ogc:PropertyIsEqualTo>
<ogc:PropertyName>tipo_forma</ogc:PropertyName>
<ogc:Literal>5050</ogc:Literal>
</ogc:PropertyIsEqualTo>
</ogc:Filter>
<se:PointSymbolizer>
<se:Graphic>
<se:ExternalGraphic>
<se:OnlineResource xlink:type="simple" xlink:href="/mnt/data/PROGRAMMING/FAUNALIA/qgis-plugins/PLUGIN_TEST_DATA/rt_mapserver_exporter/export_svg-tiket309/test-splite/simbologie_e_vestizioni_continuum/regione_toscana_geologia_continuum/Centro-vulcanico-5050.svg"/>
<se:Format>image/svg+xml</se:Format>
</se:ExternalGraphic>
<se:Size>3</se:Size>
<se:Rotation>
<ogc:Filter>
<ogc:Add>
<ogc:PropertyName>direzio</ogc:PropertyName>
<ogc:Literal>0</ogc:Literal>
</ogc:Add>
</ogc:Filter>
</se:Rotation>
</se:Graphic>
</se:PointSymbolizer>
</se:Rule>
<se:Rule>
<se:Name>5080</se:Name>
<se:Description>
<se:Title>5080</se:Title>
</se:Description>
<ogc:Filter>
<ogc:PropertyIsEqualTo>
<ogc:PropertyName>tipo_forma</ogc:PropertyName>
<ogc:Literal>5080</ogc:Literal>
</ogc:PropertyIsEqualTo>
</ogc:Filter>
<se:PointSymbolizer>
<se:Graphic>
<se:Mark>
<se:WellKnownName>circle</se:WellKnownName>
<se:Fill>
<se:SvgParameter name="fill">#913300</se:SvgParameter>
</se:Fill>
<se:Stroke>
<se:SvgParameter name="stroke">#913300</se:SvgParameter>
</se:Stroke>
</se:Mark>
<se:Size>1.8</se:Size>
<se:Rotation>
<ogc:Filter>
<ogc:Add>
<ogc:PropertyName>direzio</ogc:PropertyName>
<ogc:Literal>0</ogc:Literal>
</ogc:Add>
</ogc:Filter>
</se:Rotation>
</se:Graphic>
</se:PointSymbolizer>
</se:Rule>
<se:Rule>
<se:Name>8020</se:Name>
<se:Description>
<se:Title>8020</se:Title>
</se:Description>
<ogc:Filter>
<ogc:PropertyIsEqualTo>
<ogc:PropertyName>tipo_forma</ogc:PropertyName>
<ogc:Literal>8020</ogc:Literal>
</ogc:PropertyIsEqualTo>
</ogc:Filter>
<se:PointSymbolizer>
<se:Graphic>
<se:Mark>
<se:WellKnownName>diamond</se:WellKnownName>
<se:Fill>
<se:SvgParameter name="fill">#ff5500</se:SvgParameter>
</se:Fill>
<se:Stroke>
<se:SvgParameter name="stroke">#000000</se:SvgParameter>
</se:Stroke>
</se:Mark>
<se:Size>2</se:Size>
<se:Rotation>
<ogc:Filter>
<ogc:Add>
<ogc:PropertyName>direzio</ogc:PropertyName>
<ogc:Literal>0</ogc:Literal>
</ogc:Add>
</ogc:Filter>
</se:Rotation>
</se:Graphic>
</se:PointSymbolizer>
</se:Rule>
<se:Rule>
<se:Name>8090</se:Name>
<se:Description>
<se:Title>8090</se:Title>
</se:Description>
<ogc:Filter>
<ogc:PropertyIsEqualTo>
<ogc:PropertyName>tipo_forma</ogc:PropertyName>
<ogc:Literal>8090</ogc:Literal>
</ogc:PropertyIsEqualTo>
</ogc:Filter>
<se:PointSymbolizer>
<se:Graphic>
<se:ExternalGraphic>
<se:OnlineResource xlink:type="simple" xlink:href="/mnt/data/PROGRAMMING/FAUNALIA/qgis-plugins/PLUGIN_TEST_DATA/rt_mapserver_exporter/export_svg-tiket309/test-splite/simbologie_e_vestizioni_continuum/regione_toscana_geologia_continuum/Duomo-5040.svg"/>
<se:Format>image/svg+xml</se:Format>
</se:ExternalGraphic>
<se:Size>3</se:Size>
<se:Rotation>
<ogc:Filter>
<ogc:Add>
<ogc:PropertyName>direzio</ogc:PropertyName>
<ogc:Literal>0</ogc:Literal>
</ogc:Add>
</ogc:Filter>
</se:Rotation>
</se:Graphic>
</se:PointSymbolizer>
</se:Rule>
</se:FeatureTypeStyle>
</UserStyle>
</NamedLayer>
</StyledLayerDescriptor>
MAP
FONTSET "[fontsetpath]"
EXTENT 1586342.75 4679837 1758926.1688 4900050.5
IMAGETYPE "png"
NAME "zz_contgeo"
SIZE 600 600
STATUS ON
UNITS METERS
OUTPUTFORMAT
NAME "png"
MIMETYPE "image/png"
DRIVER "AGG/PNG"
EXTENSION "png"
IMAGEMODE RGB
TRANSPARENT TRUE
END # OUTPUTFORMAT
SYMBOL
NAME "sld_mark_symbol_circle_filled"
TYPE ELLIPSE
FILLED TRUE
POINTS
1 1
END
END
SYMBOL
NAME "sld_mark_symbol_square_filled"
TYPE VECTOR
FILLED TRUE
POINTS
0 1
0 0
1 0
1 1
0 1
END
END
PROJECTION
"proj=tmerc"
"lat_0=0"
"lon_0=9"
"k=0.9996"
"x_0=1500000"
"y_0=0"
"ellps=intl"
"towgs84=-104.1,-49.1,-9.9,0.971,-2.917,0.714,-11.68"
"units=m"
"no_defs"
END # PROJECTION
LEGEND
KEYSIZE 20 10
KEYSPACING 5 5
LABEL
SIZE MEDIUM
OFFSET 0 0
SHADOWSIZE 1 1
TYPE BITMAP
END # LABEL
STATUS OFF
END # LEGEND
QUERYMAP
SIZE -1 -1
STATUS OFF
STYLE HILITE
END # QUERYMAP
SCALEBAR
INTERVALS 4
LABEL
SIZE MEDIUM
OFFSET 0 0
SHADOWSIZE 1 1
TYPE BITMAP
END # LABEL
SIZE 200 3
STATUS OFF
UNITS MILES
END # SCALEBAR
WEB
FOOTER ""
HEADER ""
TEMPPATH ""
METADATA
"ows_onlineresource" "http://localhost/cgi-bin/mapserv?map=/mnt/data/PROGRAMMING/FAUNALIA/qgis-plugins/PLUGIN_TEST_DATA/rt_mapserver_exporter/export_svg-tiket309/test.map"
"ows_enable_request" "*"
"ows_srs" "EPSG:3003"
"ows_title" "zz_contgeo"
END # METADATA
TEMPLATE "[templatepath]"
END # WEB
LAYER
DATA "/mnt/data/PROGRAMMING/FAUNALIA/qgis-plugins/PLUGIN_TEST_DATA/rt_mapserver_exporter/export_svg-tiket309/test-shape/formapuntuale.shp"
EXTENT 1586342.75 4679837 1758926.1688 4900050.5
METADATA
"ows_title" "formapuntuale"
END # METADATA
NAME "formapuntuale"
PROJECTION
"proj=tmerc"
"lat_0=0"
"lon_0=9"
"k=0.9996"
"x_0=1500000"
"y_0=0"
"ellps=intl"
"towgs84=-104.1,-49.1,-9.9,0.971,-2.917,0.714,-11.68"
"units=m"
"no_defs"
END # PROJECTION
STATUS ON
TILEITEM "location"
TYPE POINT
UNITS METERS
CLASS
NAME "2020"
EXPRESSION ([tipo_forma] =2020)
STYLE
COLOR 0 0 0
SIZE 2.5
SYMBOL "/mnt/data/PROGRAMMING/FAUNALIA/qgis-plugins/PLUGIN_TEST_DATA/rt_mapserver_exporter/export_svg-tiket309/test-splite/simbologie_e_vestizioni_continuum/regione_toscana_geologia_continuum/Antica-dir-scorr-fluv-2020.svg"
END # STYLE
END # CLASS
CLASS
NAME "3010"
EXPRESSION ([tipo_forma] =3010)
STYLE
COLOR 0 0 0
SIZE 4
SYMBOL "/mnt/data/PROGRAMMING/FAUNALIA/qgis-plugins/PLUGIN_TEST_DATA/rt_mapserver_exporter/export_svg-tiket309/test-splite/simbologie_e_vestizioni_continuum/regione_toscana_geologia_continuum/Princ-cavita-ipo-3010.svg"
END # STYLE
END # CLASS
CLASS
NAME "3030"
EXPRESSION ([tipo_forma] =3030)
STYLE
COLOR 0 0 0
SIZE 3
SYMBOL "/mnt/data/PROGRAMMING/FAUNALIA/qgis-plugins/PLUGIN_TEST_DATA/rt_mapserver_exporter/export_svg-tiket309/test-splite/simbologie_e_vestizioni_continuum/regione_toscana_geologia_continuum/DolinaCrollo-point-3030.svg"
END # STYLE
END # CLASS
CLASS
NAME "5040"
EXPRESSION ([tipo_forma] =5040)
STYLE
COLOR 0 0 0
SIZE 3
SYMBOL "/mnt/data/PROGRAMMING/FAUNALIA/qgis-plugins/PLUGIN_TEST_DATA/rt_mapserver_exporter/export_svg-tiket309/test-splite/simbologie_e_vestizioni_continuum/regione_toscana_geologia_continuum/Duomo-5040.svg"
END # STYLE
END # CLASS
CLASS
NAME "5050"
EXPRESSION ([tipo_forma] =5050)
STYLE
COLOR 0 0 0
SIZE 3
SYMBOL "/mnt/data/PROGRAMMING/FAUNALIA/qgis-plugins/PLUGIN_TEST_DATA/rt_mapserver_exporter/export_svg-tiket309/test-splite/simbologie_e_vestizioni_continuum/regione_toscana_geologia_continuum/Centro-vulcanico-5050.svg"
END # STYLE
END # CLASS
CLASS
NAME "5080"
EXPRESSION ([tipo_forma] =5080)
STYLE
COLOR 145 51 0
OUTLINECOLOR 145 51 0
SIZE 1.8
SYMBOL "sld_mark_symbol_circle_filled"
END # STYLE
END # CLASS
CLASS
NAME "8020"
EXPRESSION ([tipo_forma] =8020)
STYLE
COLOR 255 85 0
OUTLINECOLOR 0 0 0
SIZE 2
SYMBOL "sld_mark_symbol_square_filled"
END # STYLE
END # CLASS
CLASS
NAME "8090"
EXPRESSION ([tipo_forma] =8090)
STYLE
COLOR 0 0 0
SIZE 3
SYMBOL "/mnt/data/PROGRAMMING/FAUNALIA/qgis-plugins/PLUGIN_TEST_DATA/rt_mapserver_exporter/export_svg-tiket309/test-splite/simbologie_e_vestizioni_continuum/regione_toscana_geologia_continuum/Duomo-5040.svg"
END # STYLE
END # CLASS
END # LAYER
END # MAP
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment