Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Docker-in-Docker (DinD) capabilities of public runners deactivated.
More info
Open sidebar
claplace
XML colorbar
Commits
4e0aa3bc
Commit
4e0aa3bc
authored
Oct 18, 2021
by
claplace
Browse files
Change the ColorMapEntry structure
parent
a3b2ac61
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
color_hexa.py
color_hexa.py
+2
-2
No files found.
color_hexa.py
View file @
4e0aa3bc
...
...
@@ -71,8 +71,8 @@ def write_xmlfile(file_dest,list_colour,list_amplitude,name_file,dict_att):
Rule
=
SubElement
(
FeatureTypeStyle
,
'Rule'
)
RasterSymbolizer
=
SubElement
(
Rule
,
'RasterSymbolizer'
)
for
col
,
amp
in
zip
(
list_colour
,
list_amplitude
):
dict_colamp
=
{
'colo
u
r'
:
col
,
'
amp'
:
amp
}
ColorMapEntry
=
SubElement
(
RasterSymbolizer
,
'ColorMapEntry'
,
attib
=
dict_colamp
)
dict_colamp
=
{
'color'
:
col
,
'
quantity'
:
str
(
amp
)
}
ColorMapEntry
=
SubElement
(
RasterSymbolizer
,
'ColorMapEntry'
,
att
r
ib
=
dict_colamp
)
tree
=
ET
.
ElementTree
(
root
)
tree
.
write
(
file_dest
,
encoding
=
"ISO-8859-1"
)
#return root
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment