def test_create_deprecated(self, vector_client): attributes = dict(name='name', title='title', description='description', owners=['owners'], readers=['readers'], writers=None) FeatureCollection.create(vector_client=vector_client, **attributes) vector_client.create_product.assert_called_once_with( description='description', product_id='name', owners=['owners'], readers=['readers'], title='title', writers=None)
def test_create_deprecated(self, vector_client): attributes = dict( name="name", title="title", description="description", owners=["owners"], readers=["readers"], writers=None, ) FeatureCollection.create(vector_client=vector_client, **attributes) vector_client.create_product.assert_called_once_with( description="description", product_id="name", owners=["owners"], readers=["readers"], title="title", writers=None, )
You can use wildcards to search for properties in the Vector service. The API reference for these methods and classes is at :py:mod:`descarteslabs.vectors`. """ from descarteslabs.vectors import Feature, FeatureCollection, properties as p import uuid ################################################ # Let's make a test :class:`FeatureCollection <descarteslabs.vectors.featurecollection.FeatureCollection>` # use :meth:`FeatureCollection.create <descarteslabs.vectors.featurecollection.FeatureCollection.create>`. id_suffix = str(uuid.uuid4()) fc = FeatureCollection.create( product_id="my_test_product" + id_suffix, title="My Test Product", description="This product was created using an example file.", ) print("Created Feature Collection with id {}".format(fc.id)) ################################################ # Establish the geometry polygon = { "type": "Polygon", "coordinates": [[ [-105.86975097656249, 36.94550173495345], [-104.930419921875, 36.94550173495345], [-104.930419921875, 37.70120736474139], [-105.86975097656249, 37.70120736474139],