Skip to content

Commit

Permalink
Merge pull request #4 from Esri/jcardonadcdev-schema-changes
Browse files Browse the repository at this point in the history
Incorporate minor project json schema changes
  • Loading branch information
jcardonadcdev authored Nov 9, 2021
2 parents e16fd42 + a47d832 commit 2e16169
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 15 deletions.
20 changes: 9 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -115,24 +115,25 @@ The properties for the objects in the `observationLayers` array.
| Name | Description | Type | Required | Default |
| ------ | ----------- | ----- | -------- | ------- |
| itemId | The id of a Feature Layer item in the same portal where the project is stored. | string | Yes | |
| layerId | The id of the layer in a multiple layer feature service | number | No | 0 |
| url | The url to an ArcGIS Feature Service layer. | string | No | |
| enrichmentDefinition | An object describing how enrichment fields are populated. The geometry type of the Observation Layer must be *Point* | *Enrichment Definition* See below for schema | No | |

### Enrichment Definition

| Name | Description | Type | Required | Default |
| ------ | ----------- | ----- | -------- | ------- |
| title | A short descriptive title for the enrichment definition | string | Yes | |
| description | A short description of the enrichment definition | string | No | |
| description | A short description of the enrichment definition | string | Yes | |
| layers | The Enrichment Layers that are part of this definition | *Enrichment Layer Definition[]* See below for schema | Yes | |

### Enrichment Layer Definition

| Name | Description | Type | Required | Default |
| ------ | ----------- | ----- | -------- | ------- |
| fields | Information on source and destination fields | *Enrichment Field Definition[]* See below for schema | Yes | |
| sourceItemId | The itemId of a layer in the portal hosting the application. | string | Yes | |
| sourceUrl | The url to the service. The geometry type of the service layer must be *Polygon* and the layer must be in the WebMap of the project | string | No | |
| sourceItemId | The itemId of a layer in the portal hosting the application. The geometry type of the service layer must be *Polygon* and the layer must be in the WebMap of the project. This or `sourceUrl` must be set. | string | No | |
| sourceUrl | The url to the service. The geometry type of the service layer must be *Polygon* and the layer must be in the WebMap of the project. This or `sourceItemId` must be set. | string | No | |
| layerId | The id of the layer in a multiple layer feature service | number | No | 0 |

### Enrichment Field Definition

Expand Down Expand Up @@ -255,7 +256,7 @@ NOTE: WMTS service layers are cached and **ONLY ONE** can be displayed as the fo
}
```

#### Multiple observation layers (one by item id only, one by item id and url)
#### Multiple observation layers (one with layerId set)

This also shows the `webmapId` property

Expand All @@ -277,7 +278,7 @@ This also shows the `webmapId` property
},
{
"itemId": "hijklmnop9876543",
"url": "https://server/service-name/FeatureServer/2"
layerId: 2
}
],
"webmapId": "12345678"
Expand Down Expand Up @@ -306,14 +307,11 @@ This also shows the `webmapId` property
"observationLayers": [
{
"itemId": "ead6deb3d93848c4a7fd58025cc2cdaa",
"title": "Abandoned Building Locations with Parcel id",
"url": "https://my.domain.name/arcgis/rest/services/Hosted/abandoned_buildings/FeatureServer",
"enrichmentDefinition": {
"title": "Building Parcel Info",
"description": "Building Parcel Info",
"layers": [
{
"itemId": "fghijklmnop123456xyz",
"sourceUrl": "https://path/to/parcel/boundaries/FeatureServer/0",
"sourceUrl": "https://path/to/parcel/boundaries/FeatureServer",
"fields": [
{
"source": "id",
Expand Down
13 changes: 11 additions & 2 deletions projects/observationproject-enriched-sample.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,8 @@
"observationLayers": [
{
"itemId": "portal item id of feature service",
"url": "url to Observation Feature Service - https://server-name/webadaptor/service-name/FeatureServer/layer-id",
"enrichmentDefinition": {
"title": "Title for enrichment definition",
"description": "Description of enrichment definition",
"layers": [
{
"sourceUrl": "url to Feature Service that has geoenrichment fields - https://server-name/webadaptor/service-name/FeatureServer/layer-id",
Expand All @@ -24,6 +23,16 @@
"destination": "field name in observation layer"
}
]
},
{
"sourceItemId": "itemId of feature service",
"layerId": 2,
"fieldDefinitions": [
{
"source": "field name in geoenrichment layer",
"destination": "field name in observation layer"
}
]
}
]
}
Expand Down
3 changes: 1 addition & 2 deletions projects/observationproject-sample.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,7 @@
},
"observationLayers": [
{
"itemId": "portal item id of feature service",
"url": "url to Observation Feature Service - https://server-name/webadaptor/service-name/FeatureServer/layer-id"
"itemId": "portal item id of feature service"
}
],
"webmapId": "12345678"
Expand Down

0 comments on commit 2e16169

Please sign in to comment.