parent
65b03a3230
commit
b0cb5b04de
1 changed files with 26 additions and 9 deletions
|
@ -29,21 +29,38 @@ wkts = [
|
|||
]
|
||||
|
||||
wkbs = [
|
||||
[
|
||||
2,"GEOMETRYCOLLECTION(MULTILINESTRING((10 10,20 20,10 40),(40 40,30 30,40 20,30 10)),LINESTRING EMPTY)",
|
||||
'010700000002000000010500000002000000010200000003000000000000000000244000000000000024400000000000003440000000000000344000000000000024400000000000004440010200000004000000000000000000444000000000000044400000000000003e400000000000003e40000000000000444000000000000034400000000000003e400000000000002440010200000000000000'
|
||||
[ 0, "select 'Point EMPTY'::geometry;", '010400000000000000'],
|
||||
[ 0, "select 'MULTIPOINT EMPTY'::geometry;", '010400000000000000'],
|
||||
[ 0, "select 'LINESTRING EMPTY'::geometry;", '010200000000000000'],
|
||||
[ 0, "select 'MULTILINESTRING EMPTY'::geometry;", '010500000000000000'],
|
||||
[ 0, "select 'Polygon EMPTY'::geometry;", '010300000000000000'],
|
||||
[ 0, "select 'MULTIPOLYGON EMPTY'::geometry;", '010600000000000000'],
|
||||
[ 0, "select 'TRIANGLE EMPTY'::geometry;", '011100000000000000'],
|
||||
|
||||
[ 0, "select 'CircularString EMPTY'::geometry;", '010800000000000000'],
|
||||
[ 0, "select 'CurvePolygon EMPTY'::geometry;", '010A00000000000000'],
|
||||
[ 0, "select 'CompoundCurve EMPTY'::geometry;", '010900000000000000'],
|
||||
[ 0, "select 'MultiCurve EMPTY'::geometry;", '010B00000000000000'],
|
||||
|
||||
[ 0, "select 'MultiSurface EMPTY'::geometry;", '010C00000000000000'],
|
||||
[ 0, "select 'PolyhedralSurface EMPTY'::geometry;", '010F00000000000000'],
|
||||
[ 0, "select 'TIM EMPTY'::geometry;", '011000000000000000'],
|
||||
[ 0, "select 'GEOMETRYCOLLECTION EMPTY'::geometry;", '010700000000000000'],
|
||||
[ 2,"GEOMETRYCOLLECTION(MULTILINESTRING((10 10,20 20,10 40),(40 40,30 30,40 20,30 10)),LINESTRING EMPTY)", '010700000002000000010500000002000000010200000003000000000000000000244000000000000024400000000000003440000000000000344000000000000024400000000000004440010200000004000000000000000000444000000000000044400000000000003e400000000000003e40000000000000444000000000000034400000000000003e400000000000002440010200000000000000'
|
||||
],
|
||||
[ 0,"select 'LINESTRING EMPTY'::geometry;", '010200000000000000' ],
|
||||
[ 1,"select 'Point(0 0)'::geometry;", '010100000000000000000000000000000000000000' ],
|
||||
[ 0, "select 'Point EMPTY'::geometry;", '010400000000000000']
|
||||
[ 0, "GEOMETRYCOLLECTION(LINESTRING EMPTY,LINESTRING EMPTY)", '010700000000000000'],
|
||||
[ 0, "GEOMETRYCOLLECTION(POINT EMPTY,POINT EMPTY)", '010700000000000000'],
|
||||
[ 1, "GEOMETRYCOLLECTION(POINT EMPTY,POINT(0 0))", '010700000002000000010400000000000000010100000000000000000000000000000000000000'],
|
||||
[ 1, "GEOMETRYCOLLECTION(POINT EMPTY,MULTIPOINT(0 0))", '010700000002000000010400000000000000010400000001000000010100000000000000000000000000000000000000'],
|
||||
[ 0, "select 'LINESTRING EMPTY'::geometry;", '010200000000000000' ],
|
||||
[ 1, "select 'Point(0 0)'::geometry;", '010100000000000000000000000000000000000000' ],
|
||||
]
|
||||
|
||||
|
||||
def test_wkb_with_empty():
|
||||
def test_wkb_parsing():
|
||||
for wkb in wkbs:
|
||||
path = mapnik.Path()
|
||||
path.add_wkb(unhexlify(wkb[2]))
|
||||
#eq_(wkb[0],path.add_wkb(unhexlify(wkb[2])))
|
||||
eq_(wkb[0],len(path))
|
||||
|
||||
def compare_wkb_from_wkt(wkt,num=None):
|
||||
|
||||
|
|
Loading…
Reference in a new issue