Add geojson exporter
This commit is contained in:
parent
6ee1466b8e
commit
b711bceb7b
|
@ -7,6 +7,7 @@ Code contributors: Pilar Monsalvete Alvarez de Uribarri pilar.monsalvete@concord
|
||||||
"""
|
"""
|
||||||
import json
|
import json
|
||||||
import logging.handlers
|
import logging.handlers
|
||||||
|
import os
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
from unittest import TestCase
|
from unittest import TestCase
|
||||||
from hub.imports.geometry_factory import GeometryFactory
|
from hub.imports.geometry_factory import GeometryFactory
|
||||||
|
@ -109,6 +110,7 @@ class TestExports(TestCase):
|
||||||
self.assertEqual('Polygon', geometry['type'], 'Wrong geometry type')
|
self.assertEqual('Polygon', geometry['type'], 'Wrong geometry type')
|
||||||
self.assertEqual(1, len(geometry['coordinates']), 'Wrong polygon structure')
|
self.assertEqual(1, len(geometry['coordinates']), 'Wrong polygon structure')
|
||||||
self.assertEqual(11, len(geometry['coordinates'][0]), 'Wrong number of vertices')
|
self.assertEqual(11, len(geometry['coordinates'][0]), 'Wrong number of vertices')
|
||||||
|
os.unlink(geojson_file) # todo: this test need to cover a multipolygon example too
|
||||||
|
|
||||||
def test_energy_ade_export(self):
|
def test_energy_ade_export(self):
|
||||||
"""
|
"""
|
||||||
|
|
Loading…
Reference in New Issue
Block a user