shapely 1.3.3__cp34-none-win_amd64.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (95) hide show
  1. Shapely-1.3.3.data/data/shapely/_geos.pxi +52 -0
  2. Shapely-1.3.3.dist-info/DESCRIPTION.rst +505 -0
  3. Shapely-1.3.3.dist-info/METADATA +527 -0
  4. Shapely-1.3.3.dist-info/RECORD +95 -0
  5. Shapely-1.3.3.dist-info/WHEEL +5 -0
  6. Shapely-1.3.3.dist-info/metadata.json +1 -0
  7. Shapely-1.3.3.dist-info/top_level.txt +1 -0
  8. shapely/DLLs/geos.dll +0 -0
  9. shapely/DLLs/geos_c.dll +0 -0
  10. shapely/__init__.py +1 -0
  11. shapely/_geos.pxi +52 -0
  12. shapely/affinity.py +255 -0
  13. shapely/algorithms/__init__.py +0 -0
  14. shapely/algorithms/cga.py +16 -0
  15. shapely/coords.py +206 -0
  16. shapely/ctypes_declarations.py +455 -0
  17. shapely/examples/__init__.py +1 -0
  18. shapely/examples/dissolve.py +53 -0
  19. shapely/examples/geoms.py +51 -0
  20. shapely/examples/intersect.py +81 -0
  21. shapely/examples/world.py +21 -0
  22. shapely/ftools.py +78 -0
  23. shapely/geometry/__init__.py +20 -0
  24. shapely/geometry/base.py +797 -0
  25. shapely/geometry/collection.py +43 -0
  26. shapely/geometry/geo.py +75 -0
  27. shapely/geometry/linestring.py +298 -0
  28. shapely/geometry/multilinestring.py +156 -0
  29. shapely/geometry/multipoint.py +213 -0
  30. shapely/geometry/multipolygon.py +186 -0
  31. shapely/geometry/point.py +269 -0
  32. shapely/geometry/polygon.py +504 -0
  33. shapely/geometry/proxy.py +51 -0
  34. shapely/geos.py +732 -0
  35. shapely/impl.py +126 -0
  36. shapely/iterops.py +55 -0
  37. shapely/linref.py +26 -0
  38. shapely/ops.py +234 -0
  39. shapely/predicates.py +23 -0
  40. shapely/prepared.py +61 -0
  41. shapely/speedups/__init__.py +43 -0
  42. shapely/speedups/_speedups.c +5674 -0
  43. shapely/speedups/_speedups.pyd +0 -0
  44. shapely/tests/__init__.py +81 -0
  45. shapely/tests/binascii_hex.txt +47 -0
  46. shapely/tests/test_affinity.py +255 -0
  47. shapely/tests/test_box.py +24 -0
  48. shapely/tests/test_cga.py +37 -0
  49. shapely/tests/test_collection.py +29 -0
  50. shapely/tests/test_delegated.py +34 -0
  51. shapely/tests/test_dlls.py +20 -0
  52. shapely/tests/test_doctests.py +36 -0
  53. shapely/tests/test_emptiness.py +53 -0
  54. shapely/tests/test_equality.py +29 -0
  55. shapely/tests/test_geointerface.py +74 -0
  56. shapely/tests/test_geomseq.py +13 -0
  57. shapely/tests/test_getitem.py +125 -0
  58. shapely/tests/test_invalid_geometries.py +30 -0
  59. shapely/tests/test_iterops.py +47 -0
  60. shapely/tests/test_linear_referencing.py +72 -0
  61. shapely/tests/test_linemerge.py +52 -0
  62. shapely/tests/test_linestring.py +111 -0
  63. shapely/tests/test_locale.py +56 -0
  64. shapely/tests/test_mapping.py +13 -0
  65. shapely/tests/test_multilinestring.py +61 -0
  66. shapely/tests/test_multipoint.py +73 -0
  67. shapely/tests/test_multipolygon.py +72 -0
  68. shapely/tests/test_ndarrays.py +54 -0
  69. shapely/tests/test_operations.py +70 -0
  70. shapely/tests/test_operators.py +18 -0
  71. shapely/tests/test_persist.py +34 -0
  72. shapely/tests/test_pickle.py +22 -0
  73. shapely/tests/test_point.py +139 -0
  74. shapely/tests/test_polygon.py +186 -0
  75. shapely/tests/test_polygonize.py +49 -0
  76. shapely/tests/test_predicates.py +34 -0
  77. shapely/tests/test_prepared.py +31 -0
  78. shapely/tests/test_products_z.py +17 -0
  79. shapely/tests/test_singularity.py +19 -0
  80. shapely/tests/test_speedups.py +39 -0
  81. shapely/tests/test_styles.py +20 -0
  82. shapely/tests/test_transform.py +84 -0
  83. shapely/tests/test_union.py +72 -0
  84. shapely/tests/test_validation.py +12 -0
  85. shapely/tests/test_vectorized.py +107 -0
  86. shapely/tests/test_xy.py +17 -0
  87. shapely/tests/threading_test.py +40 -0
  88. shapely/topology.py +60 -0
  89. shapely/validation.py +8 -0
  90. shapely/vectorized/__init__.py +3 -0
  91. shapely/vectorized/_vectorized.c +20816 -0
  92. shapely/vectorized/_vectorized.pyd +0 -0
  93. shapely/vectorized/_vectorized.pyx +120 -0
  94. shapely/wkb.py +37 -0
  95. shapely/wkt.py +26 -0
shapely/ftools.py ADDED
@@ -0,0 +1,78 @@
1
+ # Backport some of functools from Python 2.5 standard library for Shapely
2
+ # on Python 2.4
3
+ #
4
+ # Python module wrapper for _functools C module
5
+ # to allow utilities written in Python to be added
6
+ # to the functools module.
7
+ # Written by Nick Coghlan <ncoghlan at gmail.com>
8
+ # Copyright (C) 2006 Python Software Foundation.
9
+ # See C source code for _functools credits/copyright
10
+ #
11
+ # _functools module written and maintained
12
+ # by Hye-Shik Chang <perky@FreeBSD.org>
13
+ # with adaptations by Raymond Hettinger <python@rcn.com>
14
+ # Copyright (c) 2004, 2005, 2006 Python Software Foundation.
15
+ # All rights reserved.
16
+
17
+ def _partial(func, *args, **keywords):
18
+ def newfunc(*fargs, **fkeywords):
19
+ newkeywords = keywords.copy()
20
+ newkeywords.update(fkeywords)
21
+ return func(
22
+ *(args + fargs), **newkeywords)
23
+ newfunc.func = func
24
+ newfunc.args = args
25
+ newfunc.keywords = keywords
26
+ return newfunc
27
+
28
+ # update_wrapper() and wraps() are tools to help write
29
+ # wrapper functions that can handle naive introspection
30
+
31
+ WRAPPER_ASSIGNMENTS = ('__module__', '__name__', '__doc__')
32
+ WRAPPER_UPDATES = ('__dict__',)
33
+ def _update_wrapper(wrapper,
34
+ wrapped,
35
+ assigned = WRAPPER_ASSIGNMENTS,
36
+ updated = WRAPPER_UPDATES):
37
+ """Update a wrapper function to look like the wrapped function
38
+
39
+ wrapper is the function to be updated
40
+ wrapped is the original function
41
+ assigned is a tuple naming the attributes assigned directly
42
+ from the wrapped function to the wrapper function (defaults to
43
+ functools.WRAPPER_ASSIGNMENTS)
44
+ updated is a tuple naming the attributes of the wrapper that
45
+ are updated with the corresponding attribute from the wrapped
46
+ function (defaults to functools.WRAPPER_UPDATES)
47
+ """
48
+ for attr in assigned:
49
+ setattr(wrapper, attr, getattr(wrapped, attr))
50
+ for attr in updated:
51
+ getattr(wrapper, attr).update(getattr(wrapped, attr, {}))
52
+ # Return the wrapper so this can be used as a decorator via partial()
53
+ return wrapper
54
+
55
+ def _wraps(wrapped,
56
+ assigned = WRAPPER_ASSIGNMENTS,
57
+ updated = WRAPPER_UPDATES):
58
+ """Decorator factory to apply update_wrapper() to a wrapper function
59
+
60
+ Returns a decorator that invokes update_wrapper() with the decorated
61
+ function as the wrapper argument and the arguments to wraps() as the
62
+ remaining arguments. Default arguments are as for update_wrapper().
63
+ This is a convenience function to simplify applying partial() to
64
+ update_wrapper().
65
+ """
66
+ return _partial(_update_wrapper, wrapped=wrapped,
67
+ assigned=assigned, updated=updated)
68
+
69
+ # Use stdlib's functools if available
70
+ try:
71
+ from functools import partial, update_wrapper, wraps
72
+ have_functools = 1
73
+ except ImportError:
74
+ partial = _partial
75
+ update_wrapper = _update_wrapper
76
+ wraps = _wraps
77
+ have_functools = 0
78
+
@@ -0,0 +1,20 @@
1
+ """Geometry classes and factories
2
+ """
3
+
4
+ from .base import CAP_STYLE, JOIN_STYLE
5
+ from .geo import box, shape, asShape, mapping
6
+ from .point import Point, asPoint
7
+ from .linestring import LineString, asLineString
8
+ from .polygon import Polygon, asPolygon, LinearRing, asLinearRing
9
+ from .multipoint import MultiPoint, asMultiPoint
10
+ from .multilinestring import MultiLineString, asMultiLineString
11
+ from .multipolygon import MultiPolygon, asMultiPolygon
12
+ from .collection import GeometryCollection
13
+
14
+ __all__ = [
15
+ 'box', 'shape', 'asShape', 'Point', 'asPoint', 'LineString',
16
+ 'asLineString', 'Polygon', 'asPolygon', 'MultiPoint', 'asMultiPoint',
17
+ 'MultiLineString', 'asMultiLineString', 'MultiPolygon', 'asMultiPolygon',
18
+ 'GeometryCollection', 'mapping', 'LinearRing', 'asLinearRing',
19
+ 'CAP_STYLE', 'JOIN_STYLE',
20
+ ]