How to use the pystac.STAC_IO.read_json function in pystac

To help you get started, we’ve selected a few pystac examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github azavea / pystac / tests / test_writing.py View on Github external
def validate_item_link_type(href, link_type, should_include_self):
            item_dict = STAC_IO.read_json(href)
            item = STACObject.from_file(href)
            for link in item.get_links():
                if not link.rel == 'self':
                    self.assertEqual(link.link_type, link_type)

            rels = set([l['rel'] for l in item_dict['links']])
            self.assertEqual('self' in rels, should_include_self)
github azavea / pystac / tests / test_writing.py View on Github external
def validate_file(self, path, object_type):
        d = STAC_IO.read_json(path)
        return self.schema_validator.validate_dict(d, object_type)