File tree Expand file tree Collapse file tree 1 file changed +21
-0
lines changed Expand file tree Collapse file tree 1 file changed +21
-0
lines changed Original file line number Diff line number Diff line change 6
6
from pystac .summaries import RangeSummary
7
7
from pystac .utils import get_opt
8
8
from pystac .extensions .eo import EOExtension , Band
9
+ from pystac .extensions .projection import ProjectionExtension
9
10
from tests .utils import TestCases , assert_to_from_dict
10
11
11
12
@@ -325,3 +326,23 @@ def test_should_raise_exception_when_passing_invalid_extension_object(
325
326
EOExtension .ext ,
326
327
object (),
327
328
)
329
+
330
+
331
+ class EOMigrationTest (unittest .TestCase ):
332
+ def setUp (self ) -> None :
333
+ self .maxDiff = None
334
+ self .item_0_8_path = TestCases .get_path (
335
+ "data-files/examples/0.8.1/item-spec/examples/sentinel2-sample.json"
336
+ )
337
+
338
+ def test_migration (self ) -> None :
339
+ with open (self .item_0_8_path ) as src :
340
+ item_dict = json .load (src )
341
+
342
+ self .assertIn ("eo:epsg" , item_dict ["properties" ])
343
+
344
+ item = Item .from_file (self .item_0_8_path )
345
+
346
+ self .assertNotIn ("eo:epsg" , item .properties )
347
+ self .assertIn ("proj:epsg" , item .properties )
348
+ self .assertIn (ProjectionExtension .get_schema_uri (), item .stac_extensions )
You can’t perform that action at this time.
0 commit comments