Skip to content

Commit

Permalink
r.colors.out_sld: minor XML formatting (#698)
Browse files Browse the repository at this point in the history
- fixes missing linebreak
- minor title styling
  • Loading branch information
neteler committed Feb 19, 2022
1 parent a890731 commit 17e8dc6
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions src/raster/r.colors.out_sld/r.colors.out_sld.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
Stefan Blumentrath, NINA: Port to GRASS GIS 7 / Python,
label and opacity support
PURPOSE: Export GRASS raster color table to OGC SLD template v1.0.0
COPYRIGHT: (C) 2011 by Hamish Bowman, and the GRASS Development Team
COPYRIGHT: (C) 2011-2022 by Hamish Bowman, and the GRASS Development Team
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
Expand Down Expand Up @@ -46,7 +46,7 @@
# % required: no
# % label: Name for style
# % description: A name for the style which might be displayed on the server
# % answer: GRASS color table
# % answer: GRASS GIS color table
# %End

# %Option G_OPT_F_OUTPUT
Expand Down Expand Up @@ -94,7 +94,7 @@ def main():
mapinfo = grass.parse_command("r.info", flags="e", map=map)

if mapinfo["title"]:
name = "{} : {}".format(mapinfo["map"], mapinfo["title"])
name = "{}: {}".format(mapinfo["map"], mapinfo["title"])
else:
name = mapinfo["map"]

Expand Down Expand Up @@ -127,8 +127,9 @@ def main():
<Name>{}</Name>""".format(
style_name
)
sld += """ <UserStyle>
<Title>{}</Title>\n
sld += """
<UserStyle>
<Title>{}</Title>
<FeatureTypeStyle>
<Rule>
<RasterSymbolizer>\n""".format(
Expand Down

0 comments on commit 17e8dc6

Please sign in to comment.