import AgriParcel Smart Model Data into a FIWARE context broker #272
Labels
AgriParcel data
to import AgriParcel Smart Model Data into a FIWARE context broker
json-rest-apis-curl
Suggested skills: JSON REST APIs, curl
import AgriParcel Smart Model Data into a FIWARE context broker
Your mission, should you choose to accept it, is to import AgriParcel Smart Model Data into a FIWARE context broker.
Walk through Youtube videos related to your task
These Youtube videos have been carefully prepared to help you with this data import task:
More details about your task
Example payloads
section. Save an example JSON payload to a file like~/Downloads/AgriParcel1.json
. Then POST the Smart Model Data to the Context Broker with thecurl
command:curl -iX POST 'http://orion-ld-fiware.apps-crc.testing/v2/entities?options=keyValues' -H 'Content-Type: application/json' -d @$HOME/Downloads/AgriParcel1.json
if using aNGSI-v2 key-values Example
.curl -iX POST 'http://orion-ld-fiware.apps-crc.testing/v2/entities' -H 'Content-Type: application/json' -d @$HOME/Downloads/AgriParcel1.json
if using a NGSI-v2 normalized Example.id
andtype
fields in~/Downloads/AgriParcel1.json
, but keep track of the value of theid
field, because you will need it for the next part. Then PUT the Smart Model Data to the Context Broker with thecurl
command, but replace ENTITY_ID with theid
of the entity URL encoded:curl -iX PUT 'http://orion-ld-fiware.apps-crc.testing/v2/entities/ENTITIY_ID/attrs?options=keyValues' -H 'Content-Type: application/json' -d @$HOME/Downloads/AgriParcel1.json
if using aNGSI-v2 key-values Example
.curl -iX PUT 'http://orion-ld-fiware.apps-crc.testing/v2/entities/ENTITY_ID/attrs' -H 'Content-Type: application/json' -d @$HOME/Downloads/AgriParcel1.json
if using a NGSI-v2 normalized Example.The day of the operation is Thursday February 2nd, 2023
You will have 4 hours to complete your mission.
Work with Smart Data Models and the FIWARE Context broker in Europe
At the end of the day
Should you, or any of your force be taken or compromised that day, you must report back as many changes as you have made, and any knowledge of your actions, by pull request or comments on the issue on the board.
The details of your mission:
Entity: AgriParcel
Open License
document generated automatically
Global description: This entity contains a harmonised description of a generic parcel of land. This entity is primarily associated with the agricultural vertical and related IoT applications.
version: 0.0.4
List of properties
address
: The mailing addressalternateName
: An alternative name for this itemarea
: The area of the parcel nominally in square meters.areaServed
: The geographic area where a service or offered item is providedbelongsTo
: Entity the item belongs tocategory
: The category of the parcel of land e.g.: arable, grassland, vineyard, orchard, mixed crop, lowland, upland, set-aside, forestry, wetland.cropStatus
: Enum:'seeded, justBorn, growing, maturing, readyForHarvesting'. A choice from an enumerated list describing the crop planting statusdataProvider
: A sequence of characters identifying the provider of the harmonised data entity.dateCreated
: Entity creation timestamp. This will usually be allocated by the storage platform.dateModified
: Timestamp of the last modification of the entity. This will usually be allocated by the storage platform.description
: A description of this itemhasAgriCrop
: Reference to the crop associated with this parcelhasAgriParcelChildren
: Related sub AgriParcel records to which this entity relateshasAgriParcelParent
: Reference to the parent AgriParcelhasAgriSoil
: Reference to the soil associated with this parcel of landhasDevices
: Reference to the IoT devices associated with this parcel i.e. sensors, controls.id
: Unique identifier of the entityirrigationSystemType
: Enum: 'Surface irrigation', 'Localized irrigation', 'Drip irrigation', 'Sprinkler irrigation', 'Center pivot irrigation', 'Lateral move irrigation', 'Sub-irrigation', 'Manual irrigation'. Based on common types of irrigation systems as defined by Centers for Disease Control and Prevention (CDC): https://www.cdc.gov/healthywater/other/agricultural/types.htmllastPlantedAt
: Indicates the date when the crop was last plantedlocation
: Geojson reference to the item. It can be Point, LineString, Polygon, MultiPoint, MultiLineString or MultiPolygonname
: The name of this item.ownedBy
: Owner (Person or Organization) of the itemowner
: A List containing a JSON encoded sequence of characters referencing the unique Ids of the owner(s)relatedSource
: List of IDs the current entity may have in external applicationsseeAlso
: list of uri pointing to additional resources about the itemsoilTextureType
: Enum: 'Sands', 'Loamy sands', 'Sandy loams', 'Loam', 'Silt loam', 'Silt', 'Sandy clay loam', 'Clay loam', 'Silty clay loam', 'Sandy clay', 'Silty clay', 'Clay'. Based on the soil texture classification of the United States Department of Agriculture (USDA): https://www.nrcs.usda.gov/wps/portal/nrcs/detailfull/soils/ref/?cid=nrcs142p2_054262source
: A sequence of characters giving the original source of the entity data as a URL. Recommended to be the fully qualified domain name of the source provider, or the URL to the source object.type
: NGSI Entity Type. It has to be AgriParcelRequired properties
area
hasAgriCrop
id
location
type
This entity is primarily associated with the agricultural vertical and related IoT applications.
Data Model description of properties
Sorted alphabetically (click for details)
full yaml details
Example payloads
AgriParcel NGSI-v2 key-values Example
Here is an example of a AgriParcel in JSON-LD format as key-values. This is compatible with NGSI-v2 when using
options=keyValues
and returns the context data of an individual entity.AgriParcel NGSI-v2 normalized Example
Here is an example of a AgriParcel in JSON-LD format as normalized. This is compatible with NGSI-v2 when not using options and returns the context data of an individual entity.
AgriParcel NGSI-LD key-values Example
Here is an example of a AgriParcel in JSON-LD format as key-values. This is compatible with NGSI-LD when using
options=keyValues
and returns the context data of an individual entity.AgriParcel NGSI-LD normalized Example
Here is an example of a AgriParcel in JSON-LD format as normalized. This is compatible with NGSI-LD when not using options and returns the context data of an individual entity.
See FAQ 10 to get an answer on how to deal with magnitude units
AgriParcel adopters
This message will not self destruct, because this project is open source.
The text was updated successfully, but these errors were encountered: