Skip to content

Simplify subscription clip rules in the Subscriptions API SDK #1162

Open
@asonnenschein

Description

@asonnenschein

Problem:
In the HTTP Subscriptions API service contract, there is one place to specify the clip tool that covers custom clip and default clip (by omitting aoi and falling back to subscription source geometry).

In the Python SDK, users can specify a custom clip AOI via planet.subscription_request.clip_tool() OR they can fall back on the default clip (subscription source geometry) by defining planet.subscription_request.build_request() kwarg clip_to_source = True. So the default clip behavior is in a separate code path from the custom clip behavior. To add more confusion, if a user defines both clip_tool() and clip_to_source = True then the client will error.

Possible solutions

  • Remove kwarg clip_to_source from the build_request() method altogether and just provide the single clip_tool() method where we can support both custom AOI and default AOI.
  • Make "clip to source" the default? and make clip_tool() a thing to use if you want to do anything else, still want to support disabling clip of course.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions