shapely 1.2.1__tar.gz → 1.2.3__tar.gz

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 (74) hide show
  1. {Shapely-1.2.1 → Shapely-1.2.3}/CHANGES.txt +9 -0
  2. {Shapely-1.2.1 → Shapely-1.2.3}/PKG-INFO +1 -1
  3. {Shapely-1.2.1 → Shapely-1.2.3}/Shapely.egg-info/PKG-INFO +1 -1
  4. {Shapely-1.2.1 → Shapely-1.2.3}/Shapely.egg-info/SOURCES.txt +2 -0
  5. {Shapely-1.2.1/docs → Shapely-1.2.3/docs/_build/html/_sources}/manual.txt +61 -5
  6. Shapely-1.2.3/docs/manual.txt +1787 -0
  7. {Shapely-1.2.1 → Shapely-1.2.3}/setup.py +1 -1
  8. {Shapely-1.2.1 → Shapely-1.2.3}/shapely/ctypes_declarations.py +3 -3
  9. {Shapely-1.2.1 → Shapely-1.2.3}/shapely/geometry/__init__.py +2 -2
  10. {Shapely-1.2.1 → Shapely-1.2.3}/shapely/geometry/base.py +11 -4
  11. {Shapely-1.2.1 → Shapely-1.2.3}/shapely/geometry/geo.py +4 -0
  12. {Shapely-1.2.1 → Shapely-1.2.3}/shapely/geos.py +4 -2
  13. {Shapely-1.2.1 → Shapely-1.2.3}/shapely/impl.py +16 -5
  14. {Shapely-1.2.1 → Shapely-1.2.3}/shapely/tests/Operations.txt +2 -1
  15. {Shapely-1.2.1 → Shapely-1.2.3}/shapely/tests/__init__.py +2 -0
  16. Shapely-1.2.3/shapely/tests/test_mapping.py +11 -0
  17. {Shapely-1.2.1 → Shapely-1.2.3}/shapely/validation.py +1 -1
  18. {Shapely-1.2.1 → Shapely-1.2.3}/CREDITS.txt +0 -0
  19. {Shapely-1.2.1 → Shapely-1.2.3}/LICENSE.txt +0 -0
  20. {Shapely-1.2.1 → Shapely-1.2.3}/MANIFEST.in +0 -0
  21. {Shapely-1.2.1 → Shapely-1.2.3}/README.txt +0 -0
  22. {Shapely-1.2.1 → Shapely-1.2.3}/Shapely.egg-info/dependency_links.txt +0 -0
  23. {Shapely-1.2.1 → Shapely-1.2.3}/Shapely.egg-info/top_level.txt +0 -0
  24. {Shapely-1.2.1 → Shapely-1.2.3}/examples/dissolve.py +0 -0
  25. {Shapely-1.2.1 → Shapely-1.2.3}/examples/intersect.py +0 -0
  26. {Shapely-1.2.1 → Shapely-1.2.3}/setup.cfg +0 -0
  27. {Shapely-1.2.1 → Shapely-1.2.3}/shapely/__init__.py +0 -0
  28. {Shapely-1.2.1 → Shapely-1.2.3}/shapely/coords.py +0 -0
  29. {Shapely-1.2.1 → Shapely-1.2.3}/shapely/geometry/collection.py +0 -0
  30. {Shapely-1.2.1 → Shapely-1.2.3}/shapely/geometry/linestring.py +0 -0
  31. {Shapely-1.2.1 → Shapely-1.2.3}/shapely/geometry/multilinestring.py +0 -0
  32. {Shapely-1.2.1 → Shapely-1.2.3}/shapely/geometry/multipoint.py +0 -0
  33. {Shapely-1.2.1 → Shapely-1.2.3}/shapely/geometry/multipolygon.py +0 -0
  34. {Shapely-1.2.1 → Shapely-1.2.3}/shapely/geometry/point.py +0 -0
  35. {Shapely-1.2.1 → Shapely-1.2.3}/shapely/geometry/polygon.py +0 -0
  36. {Shapely-1.2.1 → Shapely-1.2.3}/shapely/geometry/proxy.py +0 -0
  37. {Shapely-1.2.1 → Shapely-1.2.3}/shapely/iterops.py +0 -0
  38. {Shapely-1.2.1 → Shapely-1.2.3}/shapely/linref.py +0 -0
  39. {Shapely-1.2.1 → Shapely-1.2.3}/shapely/ops.py +0 -0
  40. {Shapely-1.2.1 → Shapely-1.2.3}/shapely/predicates.py +0 -0
  41. {Shapely-1.2.1 → Shapely-1.2.3}/shapely/prepared.py +0 -0
  42. {Shapely-1.2.1 → Shapely-1.2.3}/shapely/tests/Array.txt +0 -0
  43. {Shapely-1.2.1 → Shapely-1.2.3}/shapely/tests/GeoInterface.txt +0 -0
  44. {Shapely-1.2.1 → Shapely-1.2.3}/shapely/tests/IterOps.txt +0 -0
  45. {Shapely-1.2.1 → Shapely-1.2.3}/shapely/tests/LineString.txt +0 -0
  46. {Shapely-1.2.1 → Shapely-1.2.3}/shapely/tests/MultiLineString.txt +0 -0
  47. {Shapely-1.2.1 → Shapely-1.2.3}/shapely/tests/MultiPoint.txt +0 -0
  48. {Shapely-1.2.1 → Shapely-1.2.3}/shapely/tests/MultiPolygon.txt +0 -0
  49. {Shapely-1.2.1 → Shapely-1.2.3}/shapely/tests/Persist.txt +0 -0
  50. {Shapely-1.2.1 → Shapely-1.2.3}/shapely/tests/Point.txt +0 -0
  51. {Shapely-1.2.1 → Shapely-1.2.3}/shapely/tests/Polygon.txt +0 -0
  52. {Shapely-1.2.1 → Shapely-1.2.3}/shapely/tests/Predicates.txt +0 -0
  53. {Shapely-1.2.1 → Shapely-1.2.3}/shapely/tests/attribute-chains.txt +0 -0
  54. {Shapely-1.2.1 → Shapely-1.2.3}/shapely/tests/binascii_hex.txt +0 -0
  55. {Shapely-1.2.1 → Shapely-1.2.3}/shapely/tests/cascaded_union.txt +0 -0
  56. {Shapely-1.2.1 → Shapely-1.2.3}/shapely/tests/dimensions.txt +0 -0
  57. {Shapely-1.2.1 → Shapely-1.2.3}/shapely/tests/invalid_intersection.txt +0 -0
  58. {Shapely-1.2.1 → Shapely-1.2.3}/shapely/tests/linear-referencing.txt +0 -0
  59. {Shapely-1.2.1 → Shapely-1.2.3}/shapely/tests/linemerge.txt +0 -0
  60. {Shapely-1.2.1 → Shapely-1.2.3}/shapely/tests/polygonize.txt +0 -0
  61. {Shapely-1.2.1 → Shapely-1.2.3}/shapely/tests/test_collection.py +0 -0
  62. {Shapely-1.2.1 → Shapely-1.2.3}/shapely/tests/test_doctests.py +0 -0
  63. {Shapely-1.2.1 → Shapely-1.2.3}/shapely/tests/test_emptiness.py +0 -0
  64. {Shapely-1.2.1 → Shapely-1.2.3}/shapely/tests/test_equality.py +0 -0
  65. {Shapely-1.2.1 → Shapely-1.2.3}/shapely/tests/test_geomseq.py +0 -0
  66. {Shapely-1.2.1 → Shapely-1.2.3}/shapely/tests/test_prepared.py +0 -0
  67. {Shapely-1.2.1 → Shapely-1.2.3}/shapely/tests/test_singularity.py +0 -0
  68. {Shapely-1.2.1 → Shapely-1.2.3}/shapely/tests/test_validation.py +0 -0
  69. {Shapely-1.2.1 → Shapely-1.2.3}/shapely/tests/test_xy.py +0 -0
  70. {Shapely-1.2.1 → Shapely-1.2.3}/shapely/tests/threading_test.py +0 -0
  71. {Shapely-1.2.1 → Shapely-1.2.3}/shapely/tests/wkt_locale.txt +0 -0
  72. {Shapely-1.2.1 → Shapely-1.2.3}/shapely/topology.py +0 -0
  73. {Shapely-1.2.1 → Shapely-1.2.3}/shapely/wkb.py +0 -0
  74. {Shapely-1.2.1 → Shapely-1.2.3}/shapely/wkt.py +0 -0
@@ -1,5 +1,14 @@
1
1
  All tickets are children of http://trac.gispython.org/lab/ticket.
2
2
 
3
+ 1.2.3 (2010-08-17)
4
+ ------------------
5
+ - Add mapping function.
6
+ - Fix problem with GEOSisValidReason symbol for GEOS < 3.1.
7
+
8
+ 1.2.2 (2010-07-23)
9
+ ------------------
10
+ - Add representative_point method.
11
+
3
12
  1.2.1 (2010-06-23)
4
13
  ------------------
5
14
  - Fixed bounds of singular polygons.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 1.0
2
2
  Name: Shapely
3
- Version: 1.2.1
3
+ Version: 1.2.3
4
4
  Summary: Geometric objects, predicates, and operations
5
5
  Home-page: http://trac.gispython.org/lab/wiki/Shapely
6
6
  Author: Sean Gillies
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 1.0
2
2
  Name: Shapely
3
- Version: 1.2.1
3
+ Version: 1.2.3
4
4
  Summary: Geometric objects, predicates, and operations
5
5
  Home-page: http://trac.gispython.org/lab/wiki/Shapely
6
6
  Author: Sean Gillies
@@ -10,6 +10,7 @@ Shapely.egg-info/SOURCES.txt
10
10
  Shapely.egg-info/dependency_links.txt
11
11
  Shapely.egg-info/top_level.txt
12
12
  docs/manual.txt
13
+ docs/_build/html/_sources/manual.txt
13
14
  examples/dissolve.py
14
15
  examples/intersect.py
15
16
  shapely/__init__.py
@@ -63,6 +64,7 @@ shapely/tests/test_doctests.py
63
64
  shapely/tests/test_emptiness.py
64
65
  shapely/tests/test_equality.py
65
66
  shapely/tests/test_geomseq.py
67
+ shapely/tests/test_mapping.py
66
68
  shapely/tests/test_prepared.py
67
69
  shapely/tests/test_singularity.py
68
70
  shapely/tests/test_validation.py
@@ -3,8 +3,8 @@ The Shapely 1.2 User Manual (Preview)
3
3
  =====================================
4
4
 
5
5
  :Author: Sean Gillies, <sean.gillies@gmail.com>
6
- :Revision: 1.2
7
- :Date: 24 May 2010
6
+ :Revision: 1.2.2
7
+ :Date: 10 August 2010
8
8
  :Copyright:
9
9
  This work is licensed under a `Creative Commons Attribution 3.0
10
10
  United States License`__.
@@ -208,6 +208,22 @@ General Attributes and Methods
208
208
  >>> Point(0,0).distance(Point(1,1))
209
209
  1.4142135623730951
210
210
 
211
+ .. method:: object.representative_point()
212
+
213
+ Returns a cheaply computed point that is guaranteed to be within the
214
+ geometric object.
215
+
216
+ .. note::
217
+ This is not in general the same as the centroid.
218
+
219
+ .. sourcecode:: pycon
220
+
221
+ >>> donut = Point(0, 0).buffer(2.0).difference(Point(0, 0).buffer(1.0))
222
+ >>> donut.centroid.wkt
223
+ 'POINT (-0.0000000000000001 -0.0000000000000000)'
224
+ >>> donut.representative_point().wkt
225
+ 'POINT (-1.5000000000000000 0.0000000000000000)'
226
+
211
227
  .. _points:
212
228
 
213
229
  Points
@@ -1366,8 +1382,8 @@ Figure 1. Convex hull (blue) of 2 points (left) and of 6 points (right).
1366
1382
 
1367
1383
  .. attribute:: object.envelope
1368
1384
 
1369
- Returns a representation of the point or smallest rectangular polygon that
1370
- contains the object.
1385
+ Returns a representation of the point or smallest rectangular polygon (with
1386
+ sides parallel to the coordinate axes) that contains the object.
1371
1387
 
1372
1388
  .. sourcecode:: pycon
1373
1389
 
@@ -1501,7 +1517,7 @@ first use the :func:`prepared.prep` function.
1501
1517
  .. sourcecode:: pycon
1502
1518
 
1503
1519
  >>> from shapely.geometry import Point
1504
- >>> from shapely.prepared import polyprep
1520
+ >>> from shapely.prepared import prep
1505
1521
  >>> points = [...] # large list of points
1506
1522
  >>> polygon = Point(0.0, 0.0).buffer(1.0)
1507
1523
  >>> prepared_polygon = prep(polygon)
@@ -1514,6 +1530,26 @@ Prepared geometries instances have the following methods: ``contains``,
1514
1530
  same arguments and usage as their counterparts in non-prepared geometric
1515
1531
  objects.
1516
1532
 
1533
+ Diagnostics
1534
+ -----------
1535
+
1536
+ .. function:: validation.explain_validity(ob):
1537
+
1538
+ Returns a string explaining the validity or invalidity of the object.
1539
+
1540
+ `New in version 1.2.1`.
1541
+
1542
+ The messages may or may not have a representation of a problem point that can
1543
+ be parsed out.
1544
+
1545
+ .. sourcecode:: python
1546
+
1547
+ >>> coords = [(0, 0), (0, 2), (1, 1), (2, 2), (2, 0), (1, 1), (0, 0)]
1548
+ >>> p = Polygon(coords)
1549
+ >>> from shapely.validation import explain_validity
1550
+ >>> explain_validity(p)
1551
+ 'Ring Self-intersection[1 1]'
1552
+
1517
1553
  Interoperation
1518
1554
  ==============
1519
1555
 
@@ -1673,6 +1709,26 @@ Or a simple placemark-type object:
1673
1709
  >>> list(shape.coords)
1674
1710
  [(0.0, 0.0)]
1675
1711
 
1712
+ The GeoJSON-like mapping of a geometric object can be obtained using
1713
+ :func:`shapely.geometry.mapping`.
1714
+
1715
+ .. function:: shapely.geometry.mapping(ob)
1716
+
1717
+ Return a new, independent geometry with coordinates `copied` from the
1718
+ context.
1719
+
1720
+ For example, using the same `GeoThing` class:
1721
+
1722
+ .. sourcecode:: pycon
1723
+
1724
+ >>> from shapely.geometry import mapping
1725
+ >>> thing = GeoThing({"type": "Point", "coordinates": (0.0, 0.0)})
1726
+ >>> m = mapping(thing)
1727
+ >>> m['type']
1728
+ 'Point'
1729
+ >>> m['coordinates']
1730
+ (0.0, 0.0)}
1731
+
1676
1732
  Conclusion
1677
1733
  ==========
1678
1734