Get specific data extent using Equi7 coordinates

Sometimes it can be useful to know in advance the size of the data we will request and process. This is possible in openEO using the projected coordinates as spatial extent in load_collection along with the corresponding crs/wkt.
However, it might not be straightforward to do this with data projected in a not (yet) so common projection as Equi7.

This is a small example retrieving a datacube covering an area of 1000x1000 m (100x100 pixels).
The most important thing to note is the crs specification, where we supply the Equi7 WKT string.

import openeo

backend = "https://openeo.cloud"
conn = openeo.connect(backend).authenticate_oidc("egi")

collection      = 'boa_sentinel_2'
spatial_extent  = {"crs": "PROJCRS[\"Azimuthal_Equidistant\",BASEGEOGCRS[\"WGS 84\",DATUM[\"World Geodetic System 1984\",ELLIPSOID[\"WGS 84\",6378137,298.257223563,LENGTHUNIT[\"metre\",1]]],PRIMEM[\"Greenwich\",0,ANGLEUNIT[\"degree\",0.0174532925199433]],ID[\"EPSG\",4326]],CONVERSION[\"Modified Azimuthal Equidistant\",METHOD[\"Modified Azimuthal Equidistant\",ID[\"EPSG\",9832]],PARAMETER[\"Latitude of natural origin\",53,ANGLEUNIT[\"degree\",0.0174532925199433],ID[\"EPSG\",8801]],PARAMETER[\"Longitude of natural origin\",24,ANGLEUNIT[\"degree\",0.0174532925199433],ID[\"EPSG\",8802]],PARAMETER[\"False easting\",5837287.81977,LENGTHUNIT[\"metre\",1],ID[\"EPSG\",8806]],PARAMETER[\"False northing\",2121415.69617,LENGTHUNIT[\"metre\",1],ID[\"EPSG\",8807]]],CS[Cartesian,2],AXIS[\"easting\",east,ORDER[1],LENGTHUNIT[\"metre\",1,ID[\"EPSG\",9001]]],AXIS[\"northing\",north,ORDER[2],LENGTHUNIT[\"metre\",1,ID[\"EPSG\",9001]]]]",
                   "east": 4850110,
                   "north": 1466960,
                   "south": 1467960,
                   "west": 4851110}
temporal_extent = ["2018-06-07", "2018-06-10"]
bands           = ["B02","B03","B04"]

s2_l2a_force = conn.load_collection(collection,spatial_extent=spatial_extent,bands=bands,temporal_extent=temporal_extent)
s2_l2a_force_netcdf = s2_l2a_force.save_result(format='netCDF')

job_force = s2_l2a_force_netcdf.send_job(title="L2A_FORCE")
job_id_force = job_force.job_id
if job_id_force:
    print("Batch job created with id: ",job_id_force)
    job_force.start_job()
else:
    print("Error! Job ID is None")

and here is the result:

<xarray.Dataset>
Dimensions:      (t: 1, y: 100, x: 100)
Coordinates:
  * t            (t) datetime64[ns] 2018-06-08T12:00:00
  * y            (y) float64 1.468e+06 1.468e+06 ... 1.467e+06 1.467e+06
  * x            (x) float64 4.85e+06 4.85e+06 4.85e+06 ... 4.851e+06 4.851e+06
    spatial_ref  int32 ...
Data variables:
    B02          (t, y, x) float64 ...
    B03          (t, y, x) float64 ...
    B04          (t, y, x) float64 ...
Attributes:
    crs:      PROJCS["Azimuthal_Equidistant",GEOGCS["WGS 84",DATUM["WGS_1984"...
    nodata:   -9999