Skip to content

Commit

Permalink
implementing Annas suggestion (#110)
Browse files Browse the repository at this point in the history
  • Loading branch information
ninsbl committed Feb 28, 2020
1 parent 162b11b commit 8522a17
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions grass7/raster/r.colors.out_sld/r.colors.out_sld.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@

"""
To Dos:
- add category support
- add transparency support
- support for intervalls ColorMap?
"""
Expand Down Expand Up @@ -105,7 +104,7 @@ def main():
use_categories = False

# Initialize SLD with header
sld = """<?xml version="1.0" encoding="UTF-8"?>
sld = u"""<?xml version="1.0" encoding="UTF-8"?>
<StyledLayerDescriptor version="1.0.0"
xsi:schemaLocation="http://www.opengis.net/sld StyledLayerDescriptor.xsd"
xmlns="http://www.opengis.net/sld"
Expand Down Expand Up @@ -169,7 +168,7 @@ def main():
print(sld)
else:
# Write SLD to file if requested
with open(output, 'w+') as o:
with open(output, 'wb+') as o:
o.write(sld.encode('utf8'))

if __name__ == "__main__":
Expand Down

0 comments on commit 8522a17

Please sign in to comment.