Пример #1
0
    def test_delete(self, vector_client):
        fc = FeatureCollection('foo', vector_client=vector_client)

        fc.delete()
        vector_client.delete_product.assert_called_once_with('foo')
Пример #2
0
    "coordinates": [
        [
            [-105.194091796875, 36.88181755936464],
            [-104.765625, 36.88181755936464],
            [-104.765625, 37.13404537126446],
            [-105.194091796875, 37.13404537126446],
            [-105.194091796875, 36.88181755936464],
        ]
    ],
}

fc = fc.filter(geometry=aoi)
print(list(fc.features()))  # this returns an iterator

################################################
# Search for :class:`Feature <descarteslabs.vectors.feature.Feature>` in this
# :class:`FeatureCollection <descarteslabs.vectors.featurecollection.FeatureCollection>`
# intersecting the aoi where ``foo=bar``.

print(list(fc.filter(properties=(p.foo == "bar")).features()))

################################################
# Search for :class:`Feature <descarteslabs.vectors.feature.Feature>` where property ``foo=foo``.
# There should be no results.
print(list(fc.filter(properties=(p.foo == "foo")).features()))

################################################
# And cleanup

fc.delete()