Go to the documentation of this file.
8 import fields2cover
as f2c
10 DATA_PATH = os.path.dirname(os.path.realpath(__file__))+
"/" + 3*
"../"+
"data/";
13 def near(a, b, error = 1e-7):
14 assert abs(a - b) < error
18 fields = f2c.Fields();
21 assert (fields[0].getId() ==
"b913fe9d-ed9f-4cc4-aa77-a10652165455");
22 assert (fields[0].getCRS() ==
"EPSG:4258");
25 fields = f2c.Fields();
28 near(fields[0].getField().area(), 2.24e-05, 1e-7);
33 fields = f2c.Fields();
36 field.setEPSGCoordSystem(4326);
38 assert (field.getId() ==
"test parcel");
39 assert (field.getCRS() ==
"EPSG:4326");
46 fields = f2c.Fields();
48 assert (fields.size() == 2);
49 assert (fields[0].getId() ==
"field1");
50 assert (fields[1].getId() ==
"field2");
static void plot(double x, double y, const std::vector< double > &color={})
static void importGml(const std::string &file, F2CFields &fields)
def test_fields2cover_utils_parser_importJson_2_cell()
def test_fields2cover_utils_parser_importJson()
static int importJson(const std::string &file, F2CFields &fields)
def near(a, b, error=1e-7)
def test_fields2cover_utils_parser_importGml()
static void figure()
Create figure to plot on.
def test_fields2cover_utils_parser_getAreaImported()
fields2cover
Author(s):
autogenerated on Fri Apr 25 2025 02:18:31