Language
Mobile SDK Guide
  1. Order
    1. Create a Basic Product
    2. Ask for a Price Quotation
    3. Order the Product

Order

Note: To gain access to OneAtlas Data you need to be authenticated (see the dedicatedprerequisites section to get an API key).

The Mobile SDK allows the user to order image products. For the moment only the following parameters are allowed:

ParametersPossible values
Geometric processingortho
Projectiongeometric
Additional processingBundle 12 bit reflectance, Bundle 8 bit display
Product Formatimage/jp2, image/geotiff

A classical call stack for ordering is to check the price regarding the area to produce and then launch an order with the same parameters. This sample creates a sample product with a given area, shows how to get a price quotation for its order, then performs the ordering of the selected product.

Create a Basic Product

This is based on a given Feature ID, and some production parameters:

// create a basic product based on your Feature ID and some production parameters
OAProduct * product = [OAProduct new];
product.ident = @"<my_feature_id>";
product.aoi = [OAPolygon polygonFromCenter:CLLocationCoordinate2DMake(43.0, 3.0) span:0.05];
product.productType = kProductTypeBundle;
product.radiometricProcessing = kRadiometricProcessingReflectance;
product.imageFormat = kImageFormatJP2;
product.crsCode = kCRSCodeWebMercator;
// create a basic product based on your Feature ID and some production parameters
let product = OAProduct.init()
product.ident = "<my_feature_id>"
product.aoi = OAPolygon.init(fromCenter: CLLocationCoordinate2DMake(43.0, 3.0), span: 0.05)
product.productType = kProductTypeBundle
product.radiometricProcessing = kRadiometricProcessingReflectance
product.imageFormat = kImageFormatJP2
product.crsCode = kCRSCodeWebMercator

Ask for a Price Quotation

// create a Product Order Request with your Product
OAOrderProductRequest * opr = [OAOrderProductRequest orderProductRequestWithProducts:[@product]];
[[[OneAtlas sharedInstance] dataService] getPriceWithRequest:opr block:^(OAPrice *aPrice, OAError *aError) {
    if(aError) {
        // handle error
    }
    else {
        // display price and area
        OAProductPrice * pp = (OAProductPrice *)aPrice;
        NSLog(@"Cost is: %ld", aOrderPrice.price);
        NSLog(@"Area is: %f", aOrderPrice.areaKm2);
    }
}];
// create a Product Order Request with your Product
let opr = OAOrderProductRequest.init(product: @[product])
OneAtlas.sharedInstance()?.dataService.getPriceWith(opr, block: { (aPrice, aError) in
    if let error = aError {

    }
    else {
        let pp = aPrice as! OAProductPrice
        print("Cost is: \(pp.price)")
        print("Cost is: \(pp.areaKm2)")
    }
})

Order the Product

Note: this will decrement your credits.

[[[OneAtlas sharedInstance] dataService] orderProductWithRequest:opr block:^(OAOrder *aOrder, OAError *aError) {
    if(aError) {
        // handle error
    }
    else {
        // ...
    }
}];
OneAtlas.sharedInstance()?.dataService.order(with: opr, block: { (aOrder, aError) in
    if let error = aError {
        // handle errors
    }
    else {
        // your order has benn passed !
    }
})

When you order a bundle product, the panchromatic component of the image can be streamed as soon as the product is delivered (please refer to the view section):

Panchromatic product

For further information, see the SDK reference.