/[thuban]/branches/WIP-pyshapelib-bramz/test/test_postgis_db.py
ViewVC logotype

Annotation of /branches/WIP-pyshapelib-bramz/test/test_postgis_db.py

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1662 - (hide annotations)
Wed Aug 27 13:51:01 2003 UTC (21 years, 6 months ago) by bh
Original Path: trunk/thuban/test/test_postgis_db.py
File MIME type: text/x-python
File size: 19096 byte(s)
Make the table interface distinguish between row ids (an integer
that uniquely identifies a row) and row ordinals (a simple row
count from 0 to NumRows() - 1)

* Thuban/Model/postgisdb.py (PostGISTable.RowIdToOrdinal)
(PostGISTable.RowOrdinalToId): New methods to conver between row
ids and row ordinals
(PostGISTable.ReadRowAsDict, PostGISTable.ReadValue): New keyword
parameter row_is_ordinal to indicate whether the row parameter is
the row id or the ordinal

* Thuban/Model/transientdb.py (TransientTableBase.RowIdToOrdinal)
(TransientTableBase.RowOrdinalToId)
(AutoTransientTable.RowIdToOrdinal)
(AutoTransientTable.RowOrdinalToId): Same new methods as in
PostGISTable.
(TransientTableBase.ReadRowAsDict, TransientTableBase.ReadValue)
(AutoTransientTable.ReadRowAsDict, AutoTransientTable.ReadValue):
Same new parameter as in PostGISTable.

* Thuban/Model/table.py (DBFTable.RowIdToOrdinal)
(DBFTable.RowOrdinalToId, MemoryTable.RowIdToOrdinal)
(MemoryTable.RowOrdinalToId): Same new methods as in PostGISTable.
(DBFTable.ReadValue, DBFTable.ReadRowAsDict)
(MemoryTable.ReadValue, MemoryTable.ReadRowAsDict): Same new
parameter as in PostGISTable.

* Thuban/UI/tableview.py (DataTable.RowIdToOrdinal)
(DataTable.RowOrdinalToId): New methods to convert between row ids
and row ordinals.
(TableGrid.SelectRowById): New method to select a row based on its
ID as opposed to its ordinal
(DataTable.GetValue, TableGrid.OnRangeSelect)
(TableGrid.OnSelectCell, LayerTableGrid.select_shapes)
(QueryTableFrame.OnQuery, QueryTableFrame.get_selected)
(LayerTableFrame.__init__): Convert between row ids and row
ordinals as appropriate

* test/postgissupport.py (PostGISDatabase.__init__): Add
doc-string.
(PostGISDatabase.initdb): The optional third item in a tuple in
tables is now a (key, value) list with additional arguments to
pass to upload_shapefile
(upload_shapefile): New parameter gid_offset to allow gids that
are not the same as the shapeids in the shapefile
(PostgreSQLServer.get_default_static_data_db): Use the new
gid_offset to make the gids in landmarks 1000 higher than the
shapeids in the shapefile

* test/test_viewport.py
(TestViewportWithPostGIS.test_find_shape_at_point): Adapt to the
new shapeids in the landmarks table

* test/test_transientdb.py
(TestTransientTable.run_iceland_political_tests)
(TestTransientTable.test_transient_joined_table): Add tests for
the new table methods and new keywords arguments.

* test/test_postgis_db.py
(TestPostGISTable.test_read_row_as_dict_row_count_mode)
(TestPostGISTable.test_read_value_row_count_mode)
(TestPostGISTable.test_row_id_to_ordinal)
(TestPostGISTable.test_row_oridnal_to_id): New test for the new
table methods and the new arguments
(TestPostGISShapestorePoint.test_shapes_in_region)
(TestPostGISShapestorePoint.test_shape_raw_data)
(TestPostGISShapestorePoint.test_shape_points)
(TestPostGISShapestorePoint.test_shape_shapeid)
(TestPostGISShapestorePoint.test_all_shapes)
(TestPostGISTable.test_simple_query)
(TestPostGISTable.test_simple_query)
(TestPostGISTable.test_simple_query)
(TestPostGISTable.test_read_value)
(TestPostGISTable.test_read_row_as_dict): Adapt to the new
shapeids in the landmarks table

* test/test_memory_table.py
(TestMemoryTable.test_read_row_as_dict_row_count_mode)
(TestMemoryTable.test_read_value_row_count_mode)
(TestMemoryTable.test_row_id_to_ordinal)
(TestMemoryTable.test_row_oridnal_to_id): New test for the new
table methods and the new arguments

* test/test_dbf_table.py
(TestDBFTable.test_read_row_as_dict_row_count_mode)
(TestDBFTable.test_read_value_row_count_mode)
(TestDBFTable.test_row_id_to_ordinal)
(TestDBFTable.test_row_oridnal_to_id): New test for the new table
methods and the new arguments

1 bh 1605 # Copyright (C) 2003 by Intevation GmbH
2     # Authors:
3     # Bernhard Herzog <[email protected]>
4     #
5     # This program is free software under the GPL (>=v2)
6     # Read the file COPYING coming with the software for details.
7    
8     """Test for Thuban.Model.postgisdb"""
9    
10     import os
11     import unittest
12    
13    
14     try:
15     import psycopg
16     except ImportError:
17     # No psycopg available. Nothing to be done here because the
18     # postgis.py support module determines this too and the tests will
19     # be skipped completely.
20     pass
21    
22     import postgissupport
23    
24     import support
25     support.initthuban()
26    
27 bh 1636 from Thuban.Model.postgisdb import ConnectionError, PostGISConnection, \
28     PostGISTable, PostGISShapeStore
29 bh 1605 from Thuban.Model.table import FIELDTYPE_INT, FIELDTYPE_STRING, \
30     FIELDTYPE_DOUBLE
31     from Thuban.Model.data import SHAPETYPE_POINT, SHAPETYPE_POLYGON, \
32     SHAPETYPE_ARC, RAW_WKT
33    
34    
35 bh 1620 class NonConnection(PostGISConnection):
36    
37     """Special connection class that doesn't actually connect"""
38    
39     def connect(self):
40     pass
41    
42    
43    
44     class TestBriefDescription(unittest.TestCase):
45    
46     def test(self):
47     """Test PostGISConnection.BriefDescription()"""
48     self.assertEquals(NonConnection("somedb").BriefDescription(),
49     "postgis://@:/somedb")
50     self.assertEquals(NonConnection("db", host="here",
51     port="123").BriefDescription(),
52     "postgis://@here:123/db")
53     self.assertEquals(NonConnection("db", user="me",
54     port="123").BriefDescription(),
55     "postgis://me@:123/db")
56    
57    
58 bh 1605 class TestPostGISConnection(unittest.TestCase):
59    
60     def setUp(self):
61     """Start the server and create a database.
62    
63     The database name will be stored in self.dbname, the server
64     object in self.server and the db object in self.db.
65     """
66     postgissupport.skip_if_no_postgis()
67     self.server = postgissupport.get_test_server()
68     self.dbname = ".".join(self.id().split(".")[-2:])[-31:]
69     self.db = self.server.new_postgis_db(self.dbname)
70    
71     def test_gis_tables_empty(self):
72     """Test PostGISConnection.GISTables() on empty DB"""
73 bh 1634 db = PostGISConnection(dbname = self.dbname,
74     **self.server.connection_params("user"))
75 bh 1605
76     # An empty database doesn't have any GIS tables
77     self.assertEquals(db.GeometryTables(), [])
78    
79     def test_gis_tables_non_empty(self):
80     """Test PostGISConnection.GISTables() on non-empty DB"""
81 bh 1634 db = PostGISConnection(dbname = self.dbname,
82     **self.server.connection_params("user"))
83 bh 1605
84 bh 1634 conn = psycopg.connect("dbname=%s " % self.dbname
85     + self.server.connection_string("admin"))
86 bh 1605 cursor = conn.cursor()
87     cursor.execute("CREATE TABLE test (A INT);")
88     cursor.execute("SELECT AddGeometryColumn(%(dbname)s, 'test',"
89     " 'geometry', -1, 'POINT', 2);",
90     {"dbname": self.dbname})
91     conn.commit()
92    
93     # An empty database doesn't have any GIS tables
94     self.assertEquals(db.GeometryTables(), ["test"])
95    
96    
97 bh 1636 class TestPostgisDBExceptions(unittest.TestCase):
98    
99     def setUp(self):
100     """Start the postgis server and switch on authentication"""
101     postgissupport.skip_if_no_postgis()
102     self.server = postgissupport.get_test_server()
103     self.postgisdb = self.server.get_default_static_data_db()
104     self.server.require_authentication(True)
105    
106     def tearDown(self):
107     """Extend the inherited method to switch off postgresql authentication
108     """
109     self.server.require_authentication(False)
110    
111     def test_no_password(self):
112     """Test PostGISConnection with omitted but required password"""
113     connection_params = self.server.connection_params("user")
114     # remove the password deliberately
115     del connection_params["password"]
116    
117     self.assertRaises(ConnectionError,
118     PostGISConnection, dbname = self.postgisdb.dbname,
119     **connection_params)
120    
121    
122 bh 1605 class PostGISStaticTests(unittest.TestCase, support.FloatComparisonMixin):
123    
124     """Base class for PostGIS tests with static data."""
125    
126     def setUp(self):
127     """Start the server and create a database with static data
128    
129     This method sets the following instance attributes:
130    
131     dbname -- the name of the database
132    
133     server -- The server object
134    
135     db -- the PostGISConnection object
136     """
137     postgissupport.skip_if_no_postgis()
138     self.server = postgissupport.get_test_server()
139     self.postgisdb = self.server.get_default_static_data_db()
140     self.db = PostGISConnection(dbname = self.postgisdb.dbname,
141 bh 1634 **self.server.connection_params("user"))
142 bh 1605
143     def tearDown(self):
144     """Close the database connection"""
145     self.db.Close()
146    
147    
148     class TestPostGISTable(PostGISStaticTests):
149    
150     def setUp(self):
151     """Extend inherited method to set self.table to a PostGISTable"""
152     PostGISStaticTests.setUp(self)
153     self.table = PostGISTable(self.db, "landmarks")
154    
155 bh 1638 def test_dbconn(self):
156     """Test PostGISTable.DBConnection()"""
157     self.failUnless(self.table.DBConnection() is self.db)
158    
159     def test_dbname(self):
160     """Test PostGISTable.TableName()"""
161     self.assertEquals(self.table.TableName(), "landmarks")
162    
163 bh 1658 def test_title(self):
164     """test PostGISTable.Title()"""
165     # The title is currently equal to the tablename
166     self.assertEquals(self.table.Title(), "landmarks")
167    
168 bh 1605 def test_dependencies(self):
169     """Test PostGISTable.Dependencies()"""
170     # A PostGISTable depends on no other data container
171     self.assertEquals(self.table.Dependencies(), ())
172    
173     def test_num_rows(self):
174     """Test PostGISTable.NumRows()"""
175     self.assertEquals(self.table.NumRows(), 34)
176    
177     def test_num_columns(self):
178     """Test PostGISTable.NumColumns()"""
179     # The table in the postgis db has one additional column, "gid",
180     # so there's one more column in the PostGISTable than in the DBF
181     self.assertEquals(self.table.NumColumns(), 7)
182    
183     def test_columns(self):
184     """Test PostGISTable.Columns()"""
185     self.assertEquals(len(self.table.Columns()), 7)
186     self.assertEquals(self.table.Columns()[0].name, "gid")
187     self.assertEquals(self.table.Columns()[0].type, FIELDTYPE_INT)
188     self.assertEquals(self.table.Columns()[0].index, 0)
189     self.assertEquals(self.table.Columns()[1].name, "area")
190     self.assertEquals(self.table.Columns()[1].type, FIELDTYPE_DOUBLE)
191     self.assertEquals(self.table.Columns()[1].index, 1)
192     self.assertEquals(self.table.Columns()[5].name, "clptlabel")
193     self.assertEquals(self.table.Columns()[5].type, FIELDTYPE_STRING)
194     self.assertEquals(self.table.Columns()[5].index, 5)
195    
196     def test_column(self):
197     """Test PostGISTable.Column()"""
198     self.assertEquals(self.table.Column("area").name, "area")
199     self.assertEquals(self.table.Column("area").type, FIELDTYPE_DOUBLE)
200     self.assertEquals(self.table.Column("area").index, 1)
201    
202     def test_has_column(self):
203     """Test PostGISTable.HasColumn()"""
204     self.assert_(self.table.HasColumn("area"))
205     self.failIf(self.table.HasColumn("foo"))
206    
207     def test_read_row_as_dict(self):
208     """Test PostGISTable.ReadRowAsDict()"""
209 bh 1662 self.assertEquals(self.table.ReadRowAsDict(1003),
210     {"gid": 1003,
211 bh 1605 "area": 0.0,
212     "perimeter": 0.0,
213     "clpoint_": 4,
214     "clpoint_id": 24,
215     "clptlabel": "RUINS",
216     "clptflag": 0})
217    
218 bh 1662 def test_read_row_as_dict_row_count_mode(self):
219     """Test PostGISTable.ReadRowAsDict() row count address mode"""
220     self.assertEquals(self.table.ReadRowAsDict(3, row_is_ordinal = 1),
221     {"gid": 1003,
222     "area": 0.0,
223     "perimeter": 0.0,
224     "clpoint_": 4,
225     "clpoint_id": 24,
226     "clptlabel": "RUINS",
227     "clptflag": 0})
228    
229 bh 1605 def test_read_value(self):
230     """Test PostGISTable.ReadValue()"""
231 bh 1662 self.assertEquals(self.table.ReadValue(1003, 4), 24)
232     self.assertEquals(self.table.ReadValue(1003, "clpoint_id"), 24)
233 bh 1605
234 bh 1662 def test_read_value_row_count_mode(self):
235     """Test PostGISTable.ReadValue() row count address mode"""
236     self.assertEquals(self.table.ReadValue(3, 4, row_is_ordinal = 1), 24)
237     self.assertEquals(self.table.ReadValue(3, "clpoint_id",
238     row_is_ordinal = 1),
239     24)
240    
241     def test_row_id_to_ordinal(self):
242     """Test PostGISTable.RowIdToOrdinal()"""
243     self.assertEquals(self.table.RowIdToOrdinal(1005), 5)
244    
245     def test_row_oridnal_to_id(self):
246     """Test PostGISTable.RowOrdinalToId()"""
247     self.assertEquals(self.table.RowOrdinalToId(5), 1005)
248    
249 bh 1605 def test_value_range(self):
250     """Test PostGISTable.ValueRange()"""
251     self.assertEquals(self.table.ValueRange("clpoint_id"), (21, 74))
252    
253     def test_unique_values(self):
254     """Test PostGISTable.UniqueValues()"""
255     values = self.table.UniqueValues("clptlabel")
256     values.sort()
257     self.assertEquals(values, ["BUILDING", "FARM", "HUT","LIGHTHOUSE",
258     "OTHER/UNKNOWN", "RUINS"])
259    
260     def test_simple_query(self):
261     """Test PostGISTable.SimpleQuery()"""
262     table = self.table
263     self.assertEquals(table.SimpleQuery(table.Column("clptlabel"),
264     "==", "FARM"),
265 bh 1662 [1006])
266 bh 1605 self.assertEquals(table.SimpleQuery(table.Column("clpoint_id"),
267     ">", 70),
268 bh 1662 [1024, 1025, 1026])
269 bh 1605 self.assertEquals(table.SimpleQuery(table.Column("clpoint_id"),
270     "<", table.Column("clpoint_")),
271 bh 1662 [1028, 1029, 1030, 1031, 1032, 1033])
272 bh 1605
273    
274     class TestPostGISShapestorePoint(PostGISStaticTests):
275    
276     """Tests for PostGISShapeStore objects with POINT data"""
277    
278     def setUp(self):
279     """Extend inherited method to set self.table to a PostGISShapeStore"""
280     PostGISStaticTests.setUp(self)
281     self.store = PostGISShapeStore(self.db, "landmarks")
282    
283     #
284     # First, some tests that should be independend of the shapetype, so
285     # it shouldn't be necessary to repeat them for other shapetypes
286     #
287    
288     def test_dependencies(self):
289     """Test PostGISShapeStore.Dependencies()"""
290     # A PostGISShapeStore depends on no other data container
291     self.assertEquals(self.store.Dependencies(), ())
292    
293     def test_table(self):
294     """Test PostGISShapeStore.Table() with POINT shapes"""
295     # A PostGISShapeStore is its own table
296     self.assert_(self.store.Table() is self.store)
297    
298     def test_orig_shapestore(self):
299     """Test PostGISShapeStore.OrigShapeStore() with POINT shapes"""
300     # A PostGISShapeStore is not derived from another shape store
301     self.assert_(self.store.OrigShapeStore() is None)
302    
303     def test_raw_format(self):
304     """Test PostGISShapeStore.RawShapeFormat() with POINT shapes"""
305     self.assertEquals(self.store.RawShapeFormat(), RAW_WKT)
306    
307 bh 1658 def test_all_shapes(self):
308     """Test PostGISShapeStore.AllShapes()"""
309     self.assertEquals([s.ShapeID() for s in self.store.AllShapes()],
310 bh 1662 range(1000, 1000 + self.store.NumShapes()))
311 bh 1658
312 bh 1605 #
313     # Shapetype specific tests
314     #
315    
316     def test_shape_type(self):
317     """Test PostGISShapeStore.ShapeType() with POINT shapes"""
318     self.assertEquals(self.store.ShapeType(), SHAPETYPE_POINT)
319    
320     def test_num_shapes(self):
321     """Test PostGISShapeStore.NumShapes() with POINT shapes"""
322     self.assertEquals(self.store.NumShapes(), 34)
323    
324     def test_bounding_box(self):
325     """Test PostGISShapeStore.BoundingBox() with POINT shapes"""
326     self.assertFloatSeqEqual(self.store.BoundingBox(),
327     [-23.806047439575195, 63.405960083007812,
328     -15.12291431427002, 66.36572265625])
329    
330     def test_shape_shapeid(self):
331     """Test PostGISShapeStore.Shape(i).ShapeID() with POINT shapes"""
332 bh 1662 self.assertEquals(self.store.Shape(1005).ShapeID(), 1005)
333 bh 1605
334     def test_shape_points(self):
335     """Test PostGISShapeStore.Shape(i).Points() with POINT shapes"""
336 bh 1662 self.assertPointListEquals(self.store.Shape(1000).Points(),
337 bh 1605 [[(-22.711074829101562, 66.36572265625)]])
338    
339     def test_shape_raw_data(self):
340     """Test PostGISShapeStore.Shape(i).RawData() with POINT shapes"""
341 bh 1662 self.assertEquals(self.store.Shape(1000).RawData(),
342 bh 1605 'POINT(-22.7110748291016 66.36572265625)')
343    
344     def test_shapes_in_region(self):
345     """Test PostGISShapeStore:ShapesInRegion() with POINT shapes"""
346     shapes = self.store.ShapesInRegion((-20.0, 64.0, -24.0, 67))
347     self.assertEquals([s.ShapeID() for s in shapes],
348 bh 1662 [1000, 1001, 1002, 1003, 1004, 1005, 1027])
349 bh 1605
350    
351     class TestPostGISShapestoreArc(PostGISStaticTests):
352    
353     """Tests for PostGISShapeStore objects with MULTILINESTRING data"""
354    
355     def setUp(self):
356     """Extend inherited method to set self.table to a PostGISShapeStore"""
357     PostGISStaticTests.setUp(self)
358     self.store = PostGISShapeStore(self.db, "roads")
359    
360     def test_shape_type(self):
361     """Test PostGISShapeStore.ShapeType() with ARC shapes"""
362     self.assertEquals(self.store.ShapeType(), SHAPETYPE_ARC)
363    
364     def test_num_shapes(self):
365     """Test PostGISShapeStore.NumShapes() with ARC shapes"""
366     self.assertEquals(self.store.NumShapes(), 839)
367    
368     def test_bounding_box(self):
369     """Test PostGISShapeStore.BoundingBox() with ARC shapes"""
370     self.assertFloatSeqEqual(self.store.BoundingBox(),
371     [-24.450359344482422, 63.426830291748047,
372     -13.55668830871582, 66.520111083984375])
373    
374     def test_shape_shapeid(self):
375     """Test PostGISShapeStore.Shape(i).ShapeID() with ARC shapes"""
376     self.assertEquals(self.store.Shape(5).ShapeID(), 5)
377    
378     def test_shape_points(self):
379     """Test PostGISShapeStore.Shape(i).Points() with ARC shapes"""
380     self.assertPointListEquals(self.store.Shape(32).Points(),
381     [[(-15.0821743011474, 66.2773818969726),
382     (-15.0263500213623, 66.2733917236328)]])
383    
384     def test_shape_raw_data(self):
385     """Test PostGISShapeStore.Shape(i).RawData() with ARC shapes"""
386     self.assertEquals(self.store.Shape(32).RawData(),
387     "MULTILINESTRING((-15.0821743011475 66.2773818969727,"
388     "-15.0263500213623 66.2733917236328))")
389    
390     def test_shapes_in_region(self):
391     """Test PostGISShapeStore.ShapesInRegion() with ARC shapes"""
392     shapes = self.store.ShapesInRegion((-24.0, 64.5, -23.5, 65.0))
393     self.assertEquals([s.ShapeID() for s in shapes], [573, 581, 613])
394    
395    
396    
397 bh 1656 class PolygonTests:
398 bh 1605
399 bh 1656 """Test shared by the PLYGON and MULTIPOLYGON tests
400 bh 1605
401 bh 1656 The tests are the same because they are based on the same data.
402     """
403    
404 bh 1605 def test_shape_type(self):
405     """Test PostGISShapeStore.ShapeType() with POLYGON shapes"""
406     self.assertEquals(self.store.ShapeType(), SHAPETYPE_POLYGON)
407    
408     def test_num_shapes(self):
409     """Test PostGISShapeStore.NumShapes() with POLYGON shapes"""
410     self.assertEquals(self.store.NumShapes(), 156)
411    
412     def test_bounding_box(self):
413     """Test PostGISShapeStore.BoundingBox() with POLYGON shapes"""
414     self.assertFloatSeqEqual(self.store.BoundingBox(),
415     [-24.546524047851562, 63.286754608154297,
416     -13.495815277099609, 66.563774108886719])
417    
418     def test_shape_shapeid(self):
419     """Test PostGISShapeStore.Shape(i).ShapeID() with POLYGON shapes"""
420     self.assertEquals(self.store.Shape(5).ShapeID(), 5)
421    
422     def test_shape_points(self):
423     """Test PostGISShapeStore.Shape(i).Points() with POLYGON shapes"""
424     self.assertPointListEquals(self.store.Shape(4).Points(),
425     [[(-22.40639114379882, 64.714111328125),
426     (-22.41621208190918, 64.716003417968),
427     (-22.40605163574218, 64.719200134277),
428     (-22.40639114379882, 64.714111328125)]])
429    
430 bh 1656 def test_shapes_in_region(self):
431     """Test PostGISShapeStore.ShapesInRegion() with POLYGON shapes"""
432     shapes = self.store.ShapesInRegion((-23.0, 65.5, -22.8, 65.25))
433     self.assertEquals([s.ShapeID() for s in shapes],
434     [47, 56, 59, 61, 62, 71, 144])
435    
436    
437     class TestPostGISShapestorePolygon(PolygonTests, PostGISStaticTests):
438    
439     """Tests for PostGISShapeStore objects with POLYGON data"""
440    
441     def setUp(self):
442     """Extend inherited method to set self.table to a PostGISShapeStore"""
443     PostGISStaticTests.setUp(self)
444     self.store = PostGISShapeStore(self.db, "political")
445    
446     def test_shape_type(self):
447     """Test PostGISShapeStore.ShapeType() with POLYGON shapes"""
448     self.assertEquals(self.store.ShapeType(), SHAPETYPE_POLYGON)
449    
450    
451 bh 1605 def test_shape_raw_data(self):
452     """Test PostGISShapeStore.Shape(i).RawData() with POLYGON shapes"""
453     self.assertEquals(self.store.Shape(4).RawData(),
454     "POLYGON((-22.4063911437988 64.714111328125,"
455     "-22.4162120819092 64.7160034179688,"
456     "-22.4060516357422 64.7192001342773,"
457     "-22.4063911437988 64.714111328125))")
458    
459    
460 bh 1656 class TestPostGISShapestoreMultiPolygon(PolygonTests, PostGISStaticTests):
461 bh 1605
462 bh 1656 """Tests for PostGISShapeStore objects with MUTLIPOLYGON data"""
463    
464     def setUp(self):
465     """Extend inherited method to set self.table to a PostGISShapeStore"""
466     PostGISStaticTests.setUp(self)
467     self.store = PostGISShapeStore(self.db, "political_multi")
468    
469     def test_shape_raw_data(self):
470     """Test PostGISShapeStore.Shape(i).RawData() with POLYGON shapes"""
471     self.assertEquals(self.store.Shape(4).RawData(),
472     "MULTIPOLYGON(((-22.4063911437988 64.714111328125,"
473     "-22.4162120819092 64.7160034179688,"
474     "-22.4060516357422 64.7192001342773,"
475     "-22.4063911437988 64.714111328125)))")
476    
477 bh 1605 if __name__ == "__main__":
478     support.run_tests()

Properties

Name Value
svn:eol-style native
svn:keywords Author Date Id Revision

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26