Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
F
fastkml
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Aurélien Vermylen
fastkml
Commits
740d0c0f
Commit
740d0c0f
authored
Apr 28, 2016
by
heltonbiker
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Corrected some QuantifiedCode issues
parent
6c45b50a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
11 deletions
+8
-11
examples/UsageExamples.py
examples/UsageExamples.py
+8
-11
No files found.
examples/UsageExamples.py
View file @
740d0c0f
#!/usr/bin/env python
# coding: utf-8
from
fastkml
.kml
import
*
from
fastkml
import
kml
def
printChildFeatures
(
element
):
level
=
0
def
print_child_features
(
element
):
if
not
getattr
(
element
,
'features'
,
None
):
return
for
feature
in
element
.
features
():
try
:
print
" "
*
level
,
feature
.
name
printChildFeatures
(
feature
)
level
+=
1
except
:
pass
print
feature
.
name
print_child_features
(
feature
)
if
__name__
==
'__main__'
:
fname
=
"KML_Samples.kml"
k
=
KML
()
k
=
kml
.
KML
()
with
open
(
fname
)
as
kmlFile
:
k
.
from_string
(
kmlFile
.
read
())
printChildFeatures
(
k
)
\ No newline at end of file
print_child_features
(
k
)
\ No newline at end of file
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