2020-04-15 01:20:30 +02:00
|
|
|
# -*- coding: utf-8 -*-
|
2012-10-19 12:19:01 +02:00
|
|
|
|
2020-04-15 01:20:30 +02:00
|
|
|
import pytest
|
2011-10-17 00:40:19 +02:00
|
|
|
|
2015-04-01 12:36:00 +02:00
|
|
|
geojson_examples = {
|
2020-04-15 01:20:30 +02:00
|
|
|
"point": '{"type":"Point","coordinates":[100.0,0.0]}',
|
|
|
|
"point_2": '{"type":"Point","coordinates":[20,10]}',
|
|
|
|
"line": '{"type":"LineString","coordinates":[[100.0,0.0],[101.0,1.0]]}',
|
|
|
|
"polygon": '{"type":"Polygon","coordinates":[[[100.0,0.0],[101.0,0.0],'
|
|
|
|
'[101.0,1.0],[100.0,1.0],[100.0,0.0]]]}',
|
|
|
|
"polygon_holes": '{"type":"Polygon","coordinates":[[[100.0,0.0],'
|
|
|
|
'[101.0,0.0],[101.0,1.0],[100.0,1.0],[100.0,0.0]],[[100.2,0.2],'
|
|
|
|
'[100.8,0.2],[100.8,0.8],[100.2,0.8],[100.2,0.2]]]}',
|
|
|
|
"multipoint": '{"type":"MultiPoint","coordinates":'
|
|
|
|
'[[100.0,0.0],[101.0,1.0]]}',
|
|
|
|
"multiline": '{"type":"MultiLineString","coordinates":[[[100.0,0.0],'
|
|
|
|
'[101.0,1.0]],[[102.0,2.0],[103.0,3.0]]]}',
|
|
|
|
"multipolygon": '{"type":"MultiPolygon","coordinates":[[[[102.0,2.0],'
|
|
|
|
'[103.0,2.0],[103.0,3.0],[102.0,3.0],[102.0,2.0]]],[[[100.0,0.0],'
|
|
|
|
'[101.0,0.0],[101.0,1.0],[100.0,1.0],[100.0,0.0]],[[100.2,0.2],'
|
|
|
|
'[100.8,0.2],[100.8,0.8],[100.2,0.8],[100.2,0.2]]]]}',
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2015-04-01 12:36:00 +02:00
|
|
|
class SpatialTestBase(object):
|
2011-10-17 00:40:19 +02:00
|
|
|
db_srid = 4326
|
2015-04-01 12:36:00 +02:00
|
|
|
geojson_examples = geojson_examples
|