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
328efdf7
Commit
328efdf7
authored
Jul 24, 2012
by
Christian Ledermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
make shapely an option, rely on pygeoif for the geometries instead
parent
c1120cd4
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
18 additions
and
7 deletions
+18
-7
fastkml/geometry.py
fastkml/geometry.py
+8
-3
fastkml/tests.py
fastkml/tests.py
+9
-3
setup.py
setup.py
+1
-1
No files found.
fastkml/geometry.py
View file @
328efdf7
...
...
@@ -24,7 +24,12 @@ I wonder if the "geojson" package fits
the purpose or it's rather better to implement to protocol from scratch.
"""
from
shapely.geometry
import
Point
,
LineString
,
Polygon
from
shapely.geometry
import
MultiPoint
,
MultiLineString
,
MultiPolygon
from
shapely.geometry.polygon
import
LinearRing
try
:
from
shapely.geometry
import
Point
,
LineString
,
Polygon
from
shapely.geometry
import
MultiPoint
,
MultiLineString
,
MultiPolygon
from
shapely.geometry.polygon
import
LinearRing
except
ImportError
:
from
pygeoif.geometry
import
Point
,
LineString
,
Polygon
from
pygeoif.geometry
import
MultiPoint
,
MultiLineString
,
MultiPolygon
from
pygeoif.geometry
import
LinearRing
fastkml/tests.py
View file @
328efdf7
...
...
@@ -23,9 +23,9 @@ from fastkml import atom
from
fastkml
import
config
import
datetime
import
xml.etree.ElementTree
as
etree
from
shapely
.geometry
import
Point
,
LineString
,
Polygon
from
shapely
.geometry
import
MultiPoint
,
MultiLineString
,
MultiPolygon
from
shapely.geometry.polygon
import
LinearRing
from
fastkml
.geometry
import
Point
,
LineString
,
Polygon
from
fastkml
.geometry
import
MultiPoint
,
MultiLineString
,
MultiPolygon
from
fastkml.geometry
import
LinearRing
class
BaseClassesTestCase
(
unittest
.
TestCase
):
""" BaseClasses must raise a NotImplementedError on etree_element
...
...
@@ -427,6 +427,9 @@ class KmlFromStringTestCase( unittest.TestCase ):
k2
.
from_string
(
k
.
to_string
())
self
.
assertEqual
(
k
.
to_string
(),
k2
.
to_string
())
def
test_atom
(
self
):
pass
class
StyleTestCase
(
unittest
.
TestCase
):
def
test_styleurl
(
self
):
...
...
@@ -438,6 +441,9 @@ class StyleTestCase( unittest.TestCase ):
f
.
styleUrl
=
s
self
.
assertTrue
(
isinstance
(
f
.
_styleUrl
,
styles
.
StyleUrl
))
self
.
assertEqual
(
f
.
styleUrl
,
'#otherstyle'
)
f2
=
kml
.
Document
()
f2
.
from_string
(
f
.
to_string
())
self
.
assertEqual
(
f
.
to_string
(),
f2
.
to_string
())
...
...
setup.py
View file @
328efdf7
...
...
@@ -27,7 +27,7 @@ setup(name='fastkml',
zip_safe
=
False
,
install_requires
=
[
# -*- Extra requirements: -*-
'
shapely
'
,
'
pygeoif
'
,
'python-dateutil'
,
],
entry_points
=
"""
...
...
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