Skip to content

Commit e20858c

Browse files
authored
Merge pull request #97569 from paulth1/imagery-and-sensory-partner-integration
Edit pass: Imagery and sensory partner integration
2 parents 5a9deb6 + ad20d98 commit e20858c

File tree

2 files changed

+165
-163
lines changed

2 files changed

+165
-163
lines changed

articles/industry/agriculture/imagery-partner-integration.md

Lines changed: 63 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
title: Imagery partner integration
3-
description: Describes about imagery partner integration
3+
description: This article describes imagery partner integration.
44
author: uhabiba04
55
ms.topic: article
66
ms.date: 11/04/2019
@@ -9,53 +9,51 @@ ms.author: v-umha
99

1010
# Imagery partner integration
1111

12-
This article describes how to use the Azure FarmBeats Translator component to send imagery data to FarmBeats. Agricultural imagery data can be from various sources, including multispectral cameras, satellites, and drones. Agricultural imagery partners can integrate with FarmBeats to provide customers with custom-generated maps for their farms.
12+
This article describes how to use the Azure FarmBeats Translator component to send imagery data to FarmBeats. Agricultural imagery data can be generated from various sources, such as multispectral cameras, satellites, and drones. Agricultural imagery partners can integrate with FarmBeats to provide customers with custom-generated maps for their farms.
1313

14-
Data, once available, can be visualized through the FarmBeats Accelerator and potentially be used for data fusion and (Machine Learning/Artificial Intelligence) ML/AI model building by agricultural businesses, or customer system integrators.
14+
Data, once available, can be visualized through the FarmBeats Accelerator and potentially be used for data fusion and machine learning/artificial intelligence (ML/AI) model building by agricultural businesses or customer system integrators.
1515

1616
FarmBeats provides the ability to:
1717

18-
- Define custom image types, source, file format using Extended Type APIs
19-
- Ingest imagery data from various sources via the Scene & SceneFile APIs.
18+
- Define custom image types, source, and file format by using /ExtendedType APIs.
19+
- Ingest imagery data from various sources via the /Scene and /SceneFile APIs.
2020

21-
The below information focuses on getting any form of imagery into the FarmBeats system.
21+
The following information focuses on getting any form of imagery into the FarmBeats system.
2222

23-
When you select the Drone Imagery section, a pop-up opens to show a high-resolution image of the drone orthomosaic. You can access the partner software, which helps to plan drone flights and get raw data. You'll continue to use the partners software for path planning and orthomosaic image stitching.
23+
When you select the **Drone Imagery** section, a pop-up opens to show a high-resolution image of the drone orthomosaic. You can access the partner software, which helps to plan drone flights and get raw data. You'll continue to use the partner's software for path planning and orthomosaic image stitching.
2424

25-
Drone partners need to enable customers, to link their customer account with their FarmBeats instance on Azure.
25+
Drone partners need to enable customers to link their customer account with their FarmBeats instance on Azure.
2626

27-
You must use the following credentials in the drone partner software for linking FarmBeats:
27+
You must use the following credentials in the drone partner software to link FarmBeats:
2828

29-
- API Endpoint
29+
- API endpoint
3030
- Tenant ID
3131
- Client ID
32-
- Client Secret
32+
- Client secret
3333

3434
## API development
3535

36-
The APIs contain Swagger technical documentation. Review [Swagger](https://aka.ms/FarmBeatsDatahubSwagger) for information about the APIs and corresponding requests/responses.
36+
The APIs contain Swagger technical documentation. For information about the APIs and corresponding requests or responses, see [Swagger](https://aka.ms/FarmBeatsDatahubSwagger).
3737

3838
## Authentication
3939

40-
FarmBeats leverages Microsoft Azure’s [Active Directory](https://docs.microsoft.com/azure/app-service/overview-authentication-authorization). Azure App Service provides built-in authentication and authorization support. 
40+
FarmBeats uses Microsoft Azure [Active Directory](https://docs.microsoft.com/azure/app-service/overview-authentication-authorization) (Azure AD). Azure App Service provides built-in authentication and authorization support. 
4141

42-
For more information about, see [Azure Active Directory](https://docs.microsoft.com/azure/app-service/overview-authentication-authorization).   
42+
For more information about Azure AD, see [Azure Active Directory](https://docs.microsoft.com/azure/app-service/overview-authentication-authorization).   
4343

44-
FarmBeats Data hub uses bearer authentication, which needs the following credentials:
44+
FarmBeats Datahub uses bearer authentication, which needs the following credentials:
4545

4646
- Client ID
47-
- Client Secret
47+
- Client secret
4848
- Tenant ID
4949

50-
Using the above credentials, the caller can request an access token, which needs to be sent in the subsequent API requests, in the header section as follows:
50+
Using the previous credentials, the caller can request an access token, which needs to be sent in the subsequent API requests, in the header section, as follows:
5151

5252
```
5353
headers = {"Authorization": "Bearer " + access_token, …} 
5454
```
5555

56-
Below is a Python code sample that retrieves the access token. You can then use the token for subsequent API calls to FarmBeat: 
57-
58-
import azure 
56+
The following Python code sample retrieves the access token. You can then use the token for subsequent API calls to FarmBeats.
5957

6058
```python
6159
from azure.common.credentials import ServicePrincipalCredentials 
@@ -76,22 +74,27 @@ access_token = token_response.get('accessToken') 
7674

7775
## HTTP request headers
7876

79-
Here are the most common request headers that need to be specified when making an API call to FarmBeats Data hub:
77+
Here are the most common request headers that need to be specified when you make an API call to FarmBeats Datahub.
8078

81-
**Header** | **Description and Example**
79+
**Header** | **Description and example**
8280
--- | ---
83-
Content-Type | The request format (Content-Type: application/<format>) For FarmBeats Data hub API's format is json. Content-Type: application/json
81+
Content-Type | The request format (Content-Type: application/<format>). For FarmBeats Datahub APIs, the format is JSON. Content-Type: application/json
8482
Authorization | Specifies the access token required to make an API call. Authorization: Bearer <Access-Token>
85-
Accept | The response format. For FarmBeats Data hub APIs the format is json Accept: application/json
83+
Accept | The response format. For FarmBeats Datahub APIs, the format is JSON. Accept: application/json
8684

8785

8886
## API requests
8987

90-
To make a REST API request, you combine the HTTP method (GET/POST/PUT), the URL to the API service, the resource URI (to query, submit data, update, or delete), and one or more HTTP request headers.
88+
To make a REST API request, you combine:
89+
90+
- The HTTP method (GET, POST, and PUT).
91+
- The URL to the API service.
92+
- The resource URI (to query, submit data, update, or delete).
93+
- One or more HTTP request headers.
9194

9295
Optionally, you can include query parameters on GET calls to filter, limit the size of, and sort the data in the responses.
9396

94-
The below sample request is to get the list of devices:
97+
The following sample request is to get the list of devices:
9598

9699
```bash
97100
curl -X GET "https://microsoft-farmbeats.azurewebsites.net/Device" -H
@@ -101,7 +104,7 @@ curl -X GET "https://microsoft-farmbeats.azurewebsites.net/Device" -H
101104
102105
Most GET, POST, and PUT calls require a JSON request body.
103106
104-
The below sample request is to create a device (This has an input JSON with the request body).
107+
The following sample request is to create a device. This sample has an input JSON with the request body.
105108
106109
107110
```bash
@@ -112,36 +115,36 @@ curl -X POST "https://microsoft-farmbeats.azurewebsites.net/Device" -H
112115
\"name\": \"Device123\", \"description\": \"Test Device 123\",}"
113116
```
114117
115-
## Data Format
118+
## Data format
116119
117-
JSON (JavaScript Object Notation) is a common, language-independent data format that provides a simple text representation of arbitrary data structures. For more information, see [JSON org](https://JSON.org).
120+
JSON is a common language-independent data format that provides a simple text representation of arbitrary data structures. For more information, see [JSON org](https://JSON.org).
118121
119-
## Ingesting imagery into FarmBeats
122+
## Ingest imagery into FarmBeats
120123
121-
After the partner has credentials to connect to the FarmBeats Data hub, the partner does the following in the Translator component:
124+
After the partner has credentials to connect to FarmBeats Datahub, the partner takes the following steps in the Translator component.
122125
123-
1. Create a new extended type for the following fields, in accordance with the type of imagery that will be uploaded:
126+
1. Create a new extended type for the following fields, in accordance with the type of imagery to be uploaded:
124127
125-
- Scene Source: For example, <drone_partner_name>
126-
- Scene Type: For example, <drone>
127-
- Scene File Type: For example, <chlorophyll index>
128-
- Scene File Content Type: For example, <image/tiff>
128+
- **Scene Source**: For example, drone_partner_name
129+
- **Scene Type**: For example, drone
130+
- **Scene File Type**: For example, chlorophyll index
131+
- **Scene File Content Type**: For example, image/tiff
129132
130-
2. Call the Farms API to get the list of Farms from within the Azure FarmBeats system.
131-
3. Provide the customer with an ability to choose a single farm from the list of Farms.
133+
2. Call the /Farms API to get the list of farms from within the Azure FarmBeats system.
134+
3. Provide the customer with an ability to choose a single farm from the list of farms.
132135
133136
The partner system must show the farm within the partner software to do the path planning and drone flight and image collection.
134137
135-
4. Call the Scene API and provide required details to create a new Scene with a unique SceneID.
136-
5. Receive a Blob SAS URL to upload the required images into the FarmBeats data hub, in the context of the chosen farm, into the FarmBeats system.
138+
4. Call the /Scene API and provide required details to create a new scene with a unique scene ID.
139+
5. Receive a blob SAS URL to upload the required images into FarmBeats Datahub, in the context of the chosen farm, in the FarmBeats system.
137140
138-
Here is a detailed flow on the API calls:
141+
Here's a detailed flow on the API calls.
139142
140143
### Step 1: ExtendedType
141144
142-
Check in the ExtendedType API, if the type and file source are available on FarmBeats. You can do this by calling a GET on the /ExtendedType API.
145+
Check in the /ExtendedType API to see whether the type and file source are available on FarmBeats. To do so, call a GET on the /ExtendedType API.
143146
144-
Following are the system defined values:
147+
Here are the system-defined values:
145148
146149
```json
147150
{
@@ -323,9 +326,9 @@ Following are the system defined values:
323326
}
324327
```
325328
326-
This will be a one-time setup, and the scope of this new scenetype is limited to the subscription in which FarmBeats project is deployed.
329+
This step is a one-time setup. The scope of this new scene type is limited to the subscription in which the FarmBeats project is deployed.
327330
328-
Example: To add SceneSource: “SlantRange”, you do PUT on the ID of the /ExtendedType with key: “SceneSource” Input payload:
331+
For example, to add SceneSource: “SlantRange,” you do a PUT on the ID of the /ExtendedType API with the key "SceneSource" input payload.
329332
330333
```json
331334
{
@@ -343,13 +346,13 @@ Example: To add SceneSource: “SlantRange”, you do PUT on the ID of the /Exte
343346
344347
```
345348
346-
Green field is the new addition to the system-defined scene source values.
349+
The green field is the new addition to the system-defined scene source values.
347350
348-
### Step 2: Get FarmDetails
351+
### Step 2: Get farm details
349352
350-
The scenes (tiff or .csv files) will be in the context of a farm. You need to get the farm details by doing a get on /Farm API. The API will return you the list of farms available in FarmBeats, and you can select the farm you want to ingest the data for.
353+
The scenes (.tiff or .csv files) are in the context of a farm. You need to get the farm details by doing a GET on the /Farm API. The API returns the list of farms that are available in FarmBeats. You can select the farm you want to ingest the data for.
351354
352-
Get /Farm response:
355+
GET /Farm response:
353356
354357
```json
355358
{
@@ -395,13 +398,13 @@ Get /Farm response:
395398
}
396399
```
397400
398-
### Step 3: Create a/scene ID (post call)
401+
### Step 3: Create a scene ID (POST call)
399402
400-
Create a new scene (tiff or .csv file) with the given information, providing the date, sequence and farm ID with which the scene will be associated. The metadata associated with the scene can be defined under properties, including the duration and type of measure.
403+
Create a new scene (.tiff or .csv file) with the given information, which provides the date, sequence, and farm ID with which the scene is associated. The metadata associated with the scene can be defined under properties, which includes the duration and type of measure.
401404
402-
This creates a new SceneID, which will be associated with the farm. Once the SceneID is created, the user can use the same to create a new file (tiff or .csv) & store the content of the file.
405+
Creating a new scene creates a new scene ID, which is associated with the farm. After the scene ID is created, the user can use the same to create a new file (.tiff or .csv) and store the contents of the file.
403406
404-
Example input payload for the Post call on/Scene API
407+
Example input payload for the POST call on the /Scene API:
405408
406409
```json
407410
{
@@ -437,13 +440,13 @@ API response:
437440
438441
```
439442
440-
**Create/SceneFile**
443+
**Create a scene file**
441444
442-
The Scene ID returned in step three is the input for the SceneFile. The SceneFile returns a SAS URL token, which is valid for 24 hours.
445+
The scene ID returned in step 3 is the input for the scene file. The scene file returns an SAS URL token, which is valid for 24 hours.
443446
444-
If the user requires a programmatic way of uploading a stream of images, the blob storage SDK can be used to define a method using the Scenefile ID, location & URL.
447+
If the user requires a programmatic way of uploading a stream of images, the blob storage SDK can be used to define a method by using the scene file ID, location, and URL.
445448
446-
Example input payload for the Post call on /Scenefile API :
449+
Example input payload for the POST call on the /SceneFile API:
447450
448451
```json
449452
{
@@ -459,7 +462,7 @@ Example input payload for the Post call on /Scenefile API :
459462
}
460463
}
461464
```
462-
API Response:
465+
API response:
463466
464467
```json
465468
{
@@ -479,9 +482,9 @@ API Response:
479482
480483
```
481484
482-
The Post call to /SceneFile API returns a SAS upload URL, which can be used to upload the csv or tiff file using the Azure Blob Storage client/library.
485+
The POST call to the /SceneFile API returns an SAS upload URL, which can be used to upload the .csv or .tiff file by using the Azure Blob storage client or library.
483486
484487
485488
## Next steps
486489
487-
For more information on Rest API-based integration details, see [REST API](references-for-farmbeats.md#rest-api).
490+
For more information on REST API-based integration details, see [REST API](references-for-farmbeats.md#rest-api).

0 commit comments

Comments
 (0)