├── OrientedImagery_API.pdf
├── Widgets
├── DeprecatedWAB2D
│ └── OrientedImagery
│ │ ├── config.json
│ │ ├── nls
│ │ └── strings.js
│ │ ├── images
│ │ ├── icon.png
│ │ ├── cancel.png
│ │ └── close_default.png
│ │ ├── setting
│ │ ├── Setting.js
│ │ ├── css
│ │ │ └── style.css
│ │ └── Setting.html
│ │ ├── css
│ │ ├── fonts
│ │ │ ├── icomoon.eot
│ │ │ ├── icomoon.ttf
│ │ │ ├── icomoon.woff
│ │ │ ├── tool-icons.eot
│ │ │ ├── tool-icons.ttf
│ │ │ ├── tool-icons.woff
│ │ │ ├── launchpad-icons.eot
│ │ │ ├── launchpad-icons.ttf
│ │ │ ├── launchpad-icons.woff
│ │ │ ├── icomoon.svg
│ │ │ ├── tool-icons.svg
│ │ │ └── launchpad-icons.svg
│ │ └── style.css
│ │ ├── README.md
│ │ ├── manifest.json
│ │ └── Widget.html
├── WebAppBuilder3D
│ └── OrientedImagery3D
│ │ ├── config.json
│ │ ├── images
│ │ ├── Thumbs.db
│ │ ├── icon.png
│ │ ├── loader-ie9.gif
│ │ └── cancel.svg
│ │ ├── css
│ │ ├── fonts
│ │ │ ├── launchpad-icons.eot
│ │ │ ├── launchpad-icons.ttf
│ │ │ ├── launchpad-icons.woff
│ │ │ └── launchpad-icons.svg
│ │ └── style.css
│ │ ├── manifest.json
│ │ ├── setting
│ │ ├── nls
│ │ │ └── strings.js
│ │ ├── css
│ │ │ └── style.css
│ │ ├── Setting.html
│ │ └── Setting.js
│ │ ├── Widget.html
│ │ └── nls
│ │ └── strings.js
└── ExperienceBuilder
│ └── oriented-imagery
│ ├── config.json
│ ├── manifest.json
│ ├── src
│ ├── setting
│ │ ├── assets
│ │ │ └── style.css
│ │ └── translations
│ │ │ └── default.ts
│ ├── config.ts
│ └── runtime
│ │ ├── translations
│ │ └── default.ts
│ │ └── assets
│ │ └── style.css
│ └── icon.svg
├── OrientedImageryExampleApp.png
├── CustomTypes
├── GeospatialVideo.pdf
├── Sanborn_UserDoc.docx
├── Pictometry_UserDoc.pdf
├── RiGelRiProcess_UserDoc.docx
├── Drone2Map_OIType_UserDoc.docx
├── Fema.oictype
├── Sanborn.oictype
├── RieglRiPROCESS_CSV.oictype
├── Australis.oictype
├── UltramapOblique.oictype
├── UltramapNadir.oictype
├── GeospatialVideo.oictype
├── pictometry.oictype
├── Drone2Map.oictype
├── Sanborn.py
├── Australis.py
├── UltramapOblique.py
├── UltramapNadir.py
├── Fema.py
├── RieglRiPROCESS_CSV.py
├── Drone2Map.py
└── pictometry.py
├── OrientedImageryCatalog_Schema.pdf
├── CONTRIBUTING.md
├── LICENSE
└── README.md
/OrientedImagery_API.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Esri/oriented-imagery/HEAD/OrientedImagery_API.pdf
--------------------------------------------------------------------------------
/Widgets/DeprecatedWAB2D/OrientedImagery/config.json:
--------------------------------------------------------------------------------
1 | {
2 | "oic": [],
3 | "enableAddOIC": false
4 | }
--------------------------------------------------------------------------------
/Widgets/WebAppBuilder3D/OrientedImagery3D/config.json:
--------------------------------------------------------------------------------
1 | {
2 | "oic": [],
3 | "enableAddOIC": false
4 | }
--------------------------------------------------------------------------------
/OrientedImageryExampleApp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Esri/oriented-imagery/HEAD/OrientedImageryExampleApp.png
--------------------------------------------------------------------------------
/CustomTypes/GeospatialVideo.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Esri/oriented-imagery/HEAD/CustomTypes/GeospatialVideo.pdf
--------------------------------------------------------------------------------
/CustomTypes/Sanborn_UserDoc.docx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Esri/oriented-imagery/HEAD/CustomTypes/Sanborn_UserDoc.docx
--------------------------------------------------------------------------------
/OrientedImageryCatalog_Schema.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Esri/oriented-imagery/HEAD/OrientedImageryCatalog_Schema.pdf
--------------------------------------------------------------------------------
/CustomTypes/Pictometry_UserDoc.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Esri/oriented-imagery/HEAD/CustomTypes/Pictometry_UserDoc.pdf
--------------------------------------------------------------------------------
/CustomTypes/RiGelRiProcess_UserDoc.docx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Esri/oriented-imagery/HEAD/CustomTypes/RiGelRiProcess_UserDoc.docx
--------------------------------------------------------------------------------
/Widgets/DeprecatedWAB2D/OrientedImagery/nls/strings.js:
--------------------------------------------------------------------------------
1 | define({
2 | root:{
3 |
4 | },
5 | "zh-cn": false
6 | });
--------------------------------------------------------------------------------
/CustomTypes/Drone2Map_OIType_UserDoc.docx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Esri/oriented-imagery/HEAD/CustomTypes/Drone2Map_OIType_UserDoc.docx
--------------------------------------------------------------------------------
/Widgets/ExperienceBuilder/oriented-imagery/config.json:
--------------------------------------------------------------------------------
1 | {
2 | "editingEnabled": false,
3 | "vectorLayers": [],
4 | "oicList": []
5 | }
--------------------------------------------------------------------------------
/CONTRIBUTING.md:
--------------------------------------------------------------------------------
1 | Esri welcomes contributions from anyone and everyone. Please see our [guidelines for contributing](https://github.com/esri/contributing).
2 |
--------------------------------------------------------------------------------
/CustomTypes/Fema.oictype:
--------------------------------------------------------------------------------
1 | {
2 | "Parameters": {
3 | "MetadataFilePath": "",
4 | "RasterFolder": "",
5 | "SRS(wkid)": "",
6 | "HeadingOffset": ""
7 | }
8 | }
--------------------------------------------------------------------------------
/Widgets/DeprecatedWAB2D/OrientedImagery/images/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Esri/oriented-imagery/HEAD/Widgets/DeprecatedWAB2D/OrientedImagery/images/icon.png
--------------------------------------------------------------------------------
/Widgets/DeprecatedWAB2D/OrientedImagery/images/cancel.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Esri/oriented-imagery/HEAD/Widgets/DeprecatedWAB2D/OrientedImagery/images/cancel.png
--------------------------------------------------------------------------------
/Widgets/DeprecatedWAB2D/OrientedImagery/setting/Setting.js:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Esri/oriented-imagery/HEAD/Widgets/DeprecatedWAB2D/OrientedImagery/setting/Setting.js
--------------------------------------------------------------------------------
/Widgets/WebAppBuilder3D/OrientedImagery3D/images/Thumbs.db:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Esri/oriented-imagery/HEAD/Widgets/WebAppBuilder3D/OrientedImagery3D/images/Thumbs.db
--------------------------------------------------------------------------------
/Widgets/WebAppBuilder3D/OrientedImagery3D/images/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Esri/oriented-imagery/HEAD/Widgets/WebAppBuilder3D/OrientedImagery3D/images/icon.png
--------------------------------------------------------------------------------
/Widgets/DeprecatedWAB2D/OrientedImagery/css/fonts/icomoon.eot:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Esri/oriented-imagery/HEAD/Widgets/DeprecatedWAB2D/OrientedImagery/css/fonts/icomoon.eot
--------------------------------------------------------------------------------
/Widgets/DeprecatedWAB2D/OrientedImagery/css/fonts/icomoon.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Esri/oriented-imagery/HEAD/Widgets/DeprecatedWAB2D/OrientedImagery/css/fonts/icomoon.ttf
--------------------------------------------------------------------------------
/Widgets/DeprecatedWAB2D/OrientedImagery/css/fonts/icomoon.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Esri/oriented-imagery/HEAD/Widgets/DeprecatedWAB2D/OrientedImagery/css/fonts/icomoon.woff
--------------------------------------------------------------------------------
/Widgets/WebAppBuilder3D/OrientedImagery3D/images/loader-ie9.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Esri/oriented-imagery/HEAD/Widgets/WebAppBuilder3D/OrientedImagery3D/images/loader-ie9.gif
--------------------------------------------------------------------------------
/CustomTypes/Sanborn.oictype:
--------------------------------------------------------------------------------
1 | {
2 | "Parameters": {
3 | "RasterPath": "",
4 | "MetadataFolder": "",
5 | "Prefix": "",
6 | "Suffix": "",
7 | "AverageZ(meters)": ""
8 | }
9 | }
--------------------------------------------------------------------------------
/Widgets/DeprecatedWAB2D/OrientedImagery/css/fonts/tool-icons.eot:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Esri/oriented-imagery/HEAD/Widgets/DeprecatedWAB2D/OrientedImagery/css/fonts/tool-icons.eot
--------------------------------------------------------------------------------
/Widgets/DeprecatedWAB2D/OrientedImagery/css/fonts/tool-icons.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Esri/oriented-imagery/HEAD/Widgets/DeprecatedWAB2D/OrientedImagery/css/fonts/tool-icons.ttf
--------------------------------------------------------------------------------
/Widgets/DeprecatedWAB2D/OrientedImagery/css/fonts/tool-icons.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Esri/oriented-imagery/HEAD/Widgets/DeprecatedWAB2D/OrientedImagery/css/fonts/tool-icons.woff
--------------------------------------------------------------------------------
/Widgets/DeprecatedWAB2D/OrientedImagery/images/close_default.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Esri/oriented-imagery/HEAD/Widgets/DeprecatedWAB2D/OrientedImagery/images/close_default.png
--------------------------------------------------------------------------------
/CustomTypes/RieglRiPROCESS_CSV.oictype:
--------------------------------------------------------------------------------
1 | {
2 | "Parameters": {
3 | "RasterPath": "",
4 | "Metadata File Path": "",
5 | "Metadata Type(Panorama/Camera)": "",
6 | "SRS": ""
7 | }
8 | }
--------------------------------------------------------------------------------
/Widgets/DeprecatedWAB2D/OrientedImagery/css/fonts/launchpad-icons.eot:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Esri/oriented-imagery/HEAD/Widgets/DeprecatedWAB2D/OrientedImagery/css/fonts/launchpad-icons.eot
--------------------------------------------------------------------------------
/Widgets/DeprecatedWAB2D/OrientedImagery/css/fonts/launchpad-icons.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Esri/oriented-imagery/HEAD/Widgets/DeprecatedWAB2D/OrientedImagery/css/fonts/launchpad-icons.ttf
--------------------------------------------------------------------------------
/Widgets/DeprecatedWAB2D/OrientedImagery/css/fonts/launchpad-icons.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Esri/oriented-imagery/HEAD/Widgets/DeprecatedWAB2D/OrientedImagery/css/fonts/launchpad-icons.woff
--------------------------------------------------------------------------------
/Widgets/WebAppBuilder3D/OrientedImagery3D/css/fonts/launchpad-icons.eot:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Esri/oriented-imagery/HEAD/Widgets/WebAppBuilder3D/OrientedImagery3D/css/fonts/launchpad-icons.eot
--------------------------------------------------------------------------------
/Widgets/WebAppBuilder3D/OrientedImagery3D/css/fonts/launchpad-icons.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Esri/oriented-imagery/HEAD/Widgets/WebAppBuilder3D/OrientedImagery3D/css/fonts/launchpad-icons.ttf
--------------------------------------------------------------------------------
/Widgets/WebAppBuilder3D/OrientedImagery3D/css/fonts/launchpad-icons.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Esri/oriented-imagery/HEAD/Widgets/WebAppBuilder3D/OrientedImagery3D/css/fonts/launchpad-icons.woff
--------------------------------------------------------------------------------
/CustomTypes/Australis.oictype:
--------------------------------------------------------------------------------
1 | {
2 | "Parameters": {
3 | "RasterPath": "",
4 | "MetadataFolder": "",
5 | "Prefix": "",
6 | "Suffix": "",
7 | "AverageZ(meters)": "",
8 | "SRS(wkid)": ""
9 | }
10 | }
--------------------------------------------------------------------------------
/CustomTypes/UltramapOblique.oictype:
--------------------------------------------------------------------------------
1 | {
2 | "Parameters": {
3 | "RasterPath": "",
4 | "MetadataFile": "",
5 | "Prefix": "",
6 | "Suffix": "",
7 | "RotatedCameras": "",
8 | "AverageZ(meters)": ""
9 | }
10 | }
--------------------------------------------------------------------------------
/Widgets/DeprecatedWAB2D/OrientedImagery/README.md:
--------------------------------------------------------------------------------
1 | # Oriented Imagery 2D widget for Web AppBuilder
2 |
3 | This widget is deprecated and is no longer maintained. Users may migrate to the upcoming Oriented Imagery widget for Experience Builder for similar features.
--------------------------------------------------------------------------------
/Widgets/WebAppBuilder3D/OrientedImagery3D/images/cancel.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/CustomTypes/UltramapNadir.oictype:
--------------------------------------------------------------------------------
1 | {
2 | "Parameters": {
3 | "RasterPath": "",
4 | "MetadataFile": "",
5 | "Prefix": "",
6 | "Suffix": "",
7 | "RotatedCameras": "",
8 | "AverageZ(meters)": "",
9 | "Nadir Type(Panchromatic/MS)": ""
10 | }
11 | }
--------------------------------------------------------------------------------
/CustomTypes/GeospatialVideo.oictype:
--------------------------------------------------------------------------------
1 | {
2 | "Parameters": {
3 | "Metadata File": "",
4 | "Video File": "",
5 | "Frames Step (In Seconds)": "2"
6 | },
7 | "DefaultAttributes": {
8 | "Defaults": {
9 | "CamHeading": "",
10 | "CamPitch": "90",
11 | "CamRoll": "0",
12 | "HFOV": "",
13 | "VFOV": "",
14 | "AvgHtAG": "",
15 | "FarDist": "",
16 | "NearDist": "",
17 | "OIType": "V",
18 | "MaxDist": "1000"
19 | }
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/Widgets/WebAppBuilder3D/OrientedImagery3D/manifest.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "OrientedImagery3D",
3 | "label": "Oriented Imagery",
4 | "platform": "HTML3D",
5 | "2D": false,
6 | "3D": true,
7 | "version": "2.7",
8 | "wabVersion": "2.21",
9 | "author": "Esri",
10 | "description": "",
11 | "copyright": "",
12 | "license": "http://www.apache.org/licenses/LICENSE-2.0",
13 | "properties": {
14 | "supportMultiInstance": false
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/Widgets/DeprecatedWAB2D/OrientedImagery/manifest.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "OrientedImagery",
3 | "label": "Oriented Imagery",
4 | "platform": "HTML",
5 | "version": "2.11",
6 | "wabVersion": "2.11",
7 | "author": "Esri",
8 | "description": "",
9 | "copyright": "",
10 | "license": "http://www.apache.org/licenses/LICENSE-2.0",
11 | "properties": {
12 | "hasLocale" : true,
13 | "hasSettingLocale" : false,
14 | "hasSettingPage" : true,
15 | "hasSettingUIFile" : true,
16 | "hasSettingStyle" : true
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/CustomTypes/pictometry.oictype:
--------------------------------------------------------------------------------
1 | {
2 | "Parameters": {
3 | "InputFile": "",
4 | "PathToImage": "",
5 | "PixelSize(Microns)": "5.5",
6 | "AverageTerrainHeight(Meters)": "0",
7 | "HorizontalWKID": "",
8 | "VeritcalWKID": ""
9 | },
10 | "DefaultAttributes": {
11 | "Oblique": {
12 | "CamHeading": "",
13 | "CamPitch": "50",
14 | "CamRoll": "0",
15 | "HFOV": "60",
16 | "VFOV": "40",
17 | "AvgHtAG": "1200",
18 | "FarDist": "200",
19 | "NearDist": "20",
20 | "OIType": "O",
21 | "MaxDist": "100"
22 | }
23 | }
24 | }
--------------------------------------------------------------------------------
/Widgets/ExperienceBuilder/oriented-imagery/manifest.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "oriented-imagery",
3 | "label": "Oriented Imagery",
4 | "type": "widget",
5 | "dependency": [
6 | "jimu-arcgis",
7 | "https://oi1.img.arcgis.com/api/v2.7/main.js"
8 | ],
9 |
10 | "version": "2.7",
11 | "exbVersion": "1.5",
12 | "author": "Esri",
13 | "description": "This is an Oriented Imagery Experience Builder widget",
14 | "copyright": "",
15 | "license": "http://www.apache.org/licenses/LICENSE-2.0",
16 | "defaultSize": {
17 | "width": 800,
18 | "height": 800
19 | },
20 | "translatedLocales": [
21 | "en"
22 | ]
23 | }
24 |
--------------------------------------------------------------------------------
/Widgets/WebAppBuilder3D/OrientedImagery3D/setting/nls/strings.js:
--------------------------------------------------------------------------------
1 | define({
2 | root:{
3 | addOIC:"Add Oriented Imagery Catalog(s)",
4 | from: "From",
5 | folder: "Folder",
6 | group: "Group",
7 | content: "My Content",
8 | groups: "My Groups",
9 | oic: "OIC",
10 | add: "Add",
11 | delete: "Delete",
12 | allowUser: "Allow user to add Oriented Imagery catalog",
13 | select: "Select",
14 | error1: "Error!",
15 | error2: "Portal Error!",
16 | notification1: "Please wait! Connecting to Portal...",
17 | notification2: "OIC already added to the list."
18 | }
19 |
20 | });
--------------------------------------------------------------------------------
/Widgets/WebAppBuilder3D/OrientedImagery3D/Widget.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/Widgets/ExperienceBuilder/oriented-imagery/src/setting/assets/style.css:
--------------------------------------------------------------------------------
1 | @charset "UTF-8";
2 | /* @import "calcite-web.css"; */
3 | @font-face {
4 | font-family: "launchpad-icons";
5 | src:url("fonts/launchpad-icons.eot");
6 | src:url("fonts/launchpad-icons.eot?#iefix") format("embedded-opentype"),
7 | url("fonts/launchpad-icons.woff") format("woff"),
8 | url("fonts/launchpad-icons.ttf") format("truetype"),
9 | url("fonts/launchpad-icons.svg#launchpad-icons") format("svg");
10 | font-weight: normal;
11 | font-style: normal;
12 |
13 | }
14 |
15 | .oi-hideFeatureLayers {
16 | display: none;
17 | }
18 |
19 | .oi-showFeatureLayers {
20 | display: block;
21 | }
--------------------------------------------------------------------------------
/CustomTypes/Drone2Map.oictype:
--------------------------------------------------------------------------------
1 | {
2 | "Parameters": {
3 | "RasterPath": "",
4 | "Drone2Map Camera File": "",
5 | "Drone2Map Image List": "",
6 | "Imagery Type": "",
7 | "Input Images SRS (WKID)": "",
8 | "Terrain Average Elevation": ""
9 | },
10 | "DefaultAttributes": {
11 | "Oblique": {
12 | "CamHeading": "",
13 | "CamPitch": "",
14 | "CamRoll": "0",
15 | "HFOV": "",
16 | "VFOV": "",
17 | "AvgHtAG": "",
18 | "FarDist": "",
19 | "NearDist": "",
20 | "OIType": "O",
21 | "MaxDist": "300"
22 | },
23 | "Nadir": {
24 | "CamHeading": "",
25 | "CamPitch": "0",
26 | "CamRoll": "0",
27 | "HFOV": "",
28 | "VFOV": "",
29 | "AvgHtAG": "",
30 | "FarDist": "",
31 | "NearDist": "",
32 | "OIType": "T",
33 | "MaxDist": "500"
34 | }
35 | }
36 | }
37 |
--------------------------------------------------------------------------------
/Widgets/ExperienceBuilder/oriented-imagery/src/config.ts:
--------------------------------------------------------------------------------
1 | /**
2 | Licensing
3 |
4 | Copyright 2020 Esri
5 |
6 | Licensed under the Apache License, Version 2.0 (the "License"); You
7 | may not use this file except in compliance with the License. You may
8 | obtain a copy of the License at
9 | http://www.apache.org/licenses/LICENSE-2.0
10 |
11 | Unless required by applicable law or agreed to in writing, software
12 | distributed under the License is distributed on an "AS IS" BASIS,
13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
14 | implied. See the License for the specific language governing
15 | permissions and limitations under the License.
16 |
17 | A copy of the license is available in the repository's
18 | LICENSE file.
19 | */
20 | import { ImmutableObject } from 'jimu-core';
21 |
22 | export interface Config {
23 | editingEnabled: boolean,
24 | vectorLayers: any,
25 | oicList: any
26 | }
27 |
28 | export type IMConfig = ImmutableObject;
--------------------------------------------------------------------------------
/Widgets/ExperienceBuilder/oriented-imagery/src/setting/translations/default.ts:
--------------------------------------------------------------------------------
1 | /**
2 | Licensing
3 |
4 | Copyright 2020 Esri
5 |
6 | Licensed under the Apache License, Version 2.0 (the "License"); You
7 | may not use this file except in compliance with the License. You may
8 | obtain a copy of the License at
9 | http://www.apache.org/licenses/LICENSE-2.0
10 |
11 | Unless required by applicable law or agreed to in writing, software
12 | distributed under the License is distributed on an "AS IS" BASIS,
13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
14 | implied. See the License for the specific language governing
15 | permissions and limitations under the License.
16 |
17 | A copy of the license is available in the repository's
18 | LICENSE file.
19 | */
20 | export default {
21 | enableEditing: 'Add overlays to viewer', //#804
22 | addOIC: 'Add',
23 | chooseOIC: 'Choose OIC from',
24 | deleteOIC: 'Delete',
25 | itemurl: 'Item URL',
26 | contents: 'My contents',
27 | groups: 'My groups',
28 | org: 'My org groups',
29 | chooseMapWidget: 'Select map widget',
30 | addToViewer: 'Add to viewer',
31 | editLayer: 'Enable editing', //#804
32 | configureEdit: 'Configure editing',
33 | editingTooltip: 'Layer needs to be editable', //#872
34 | editingSwitchTooltip: 'Map/Scene must contain feature layers'
35 | }
36 |
--------------------------------------------------------------------------------
/Widgets/ExperienceBuilder/oriented-imagery/src/runtime/translations/default.ts:
--------------------------------------------------------------------------------
1 | /**
2 | Licensing
3 |
4 | Copyright 2020 Esri
5 |
6 | Licensed under the Apache License, Version 2.0 (the "License"); You
7 | may not use this file except in compliance with the License. You may
8 | obtain a copy of the License at
9 | http://www.apache.org/licenses/LICENSE-2.0
10 |
11 | Unless required by applicable law or agreed to in writing, software
12 | distributed under the License is distributed on an "AS IS" BASIS,
13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
14 | implied. See the License for the specific language governing
15 | permissions and limitations under the License.
16 |
17 | A copy of the license is available in the repository's
18 | LICENSE file.
19 | */
20 | export default {
21 | _widgetLabel: 'Oriented Imagery',
22 | toggleButtonOn: 'Turn off to select features in map',
23 | toggleButtonOff: 'Turn on to pick a focus point in map to view image',
24 | exposure: 'Image exposure points',
25 | currentCoverage: 'Current coverage',
26 | additionalCoverage: 'Additional coverage',
27 | coverageMap: 'Coverage map',
28 | chooseView: 'Choose viewer mode',
29 | chooseImage: 'Click on the view to search images',
30 | removeImage: 'Click here to remove image from scene',
31 | viewImage: 'Click here to view the selected feature in image.'
32 |
33 | }
34 |
--------------------------------------------------------------------------------
/Widgets/DeprecatedWAB2D/OrientedImagery/setting/css/style.css:
--------------------------------------------------------------------------------
1 |
2 | .oi-settings-label {
3 | font-weight: bold;
4 |
5 | }
6 |
7 | .oi-settings-btn {
8 | width: auto;
9 | color: #fff;
10 | margin-left: 5px;
11 | border: 1px solid #ddd;
12 | -webkit-box-sizing: border-box;
13 | -moz-box-sizing: border-box;
14 | box-sizing: border-box;
15 | -webkit-transition: all 0.05s linear;
16 | transition: all 0.05s linear;
17 | cursor: pointer;
18 | font-size: 0.9375rem;
19 |
20 | }
21 | .oi-settings-btn:disabled {
22 | cursor: not-allowed;
23 | pointer-events: none;
24 | }
25 | .oi-settings-btn:hover{
26 | background: #ddd;
27 | }
28 |
29 | .oi-settings-btn.dijitButton .dijitButtonNode {
30 | padding: 0.2rem 0.4rem;
31 | border: 0px transparent;
32 |
33 | background: transparent;
34 | box-shadow: none;
35 | }
36 |
37 | .oi-settings-dataGrid {
38 | margin: 5px 0px;
39 | background: white;
40 | }
41 | .oi-settings-dataGrid.dgrid {
42 | height: 10rem;
43 | width: 40%;
44 | display: inline-block;
45 | }
46 | .oi-settings-dataGrid .dgrid-scroller {
47 | overflow-y: auto;
48 | margin-top: 5px;
49 | }
50 |
51 | .oi-settings-textBox {
52 | width: 60%;
53 | }
54 | .oi-settings-container {
55 | margin-top: 10px;
56 | }
57 | .oi-settings-loadingContainer {
58 | width: 100%;
59 | height: 100%;
60 | position: absolute;
61 | top: 0px;
62 | bottom: 0px;
63 | left: 0px;
64 | right: 0px;
65 | display:none;
66 | }
--------------------------------------------------------------------------------
/Widgets/WebAppBuilder3D/OrientedImagery3D/setting/css/style.css:
--------------------------------------------------------------------------------
1 |
2 | .oi-settings-label {
3 | font-weight: bold;
4 |
5 | }
6 |
7 | .oi-settings-btn {
8 | width: auto;
9 | color: #fff;
10 | margin-left: 5px;
11 | border: 1px solid #ddd;
12 | -webkit-box-sizing: border-box;
13 | -moz-box-sizing: border-box;
14 | box-sizing: border-box;
15 | -webkit-transition: all 0.05s linear;
16 | transition: all 0.05s linear;
17 | cursor: pointer;
18 | font-size: 0.9375rem;
19 |
20 | }
21 | .oi-settings-btn:disabled {
22 | cursor: not-allowed;
23 | pointer-events: none;
24 | }
25 | .oi-settings-btn:hover{
26 | background: #ddd;
27 | }
28 |
29 | .oi-settings-btn.dijitButton .dijitButtonNode {
30 | padding: 0.2rem 0.4rem;
31 | border: 0px transparent;
32 |
33 | background: transparent;
34 | box-shadow: none;
35 | }
36 |
37 | .oi-settings-dataGrid {
38 | margin: 5px 0px;
39 | background: white;
40 | }
41 | .oi-settings-dataGrid.dgrid {
42 | height: 5rem;
43 | width:40%;
44 | display: inline-block;
45 | }
46 | .oi-settings-dataGrid .dgrid-scroller {
47 | overflow-y: auto;
48 | margin-top: 5px;
49 | }
50 |
51 | .oi-settings-textBox {
52 | width: 60%;
53 | }
54 | .oi-settings-container {
55 | margin-top: 10px;
56 | }
57 | .oi-settings-loadingContainer {
58 | width: 100%;
59 | height: 100%;
60 | position: absolute;
61 | top: 0px;
62 | bottom: 0px;
63 | left: 0px;
64 | right: 0px;
65 | display:none;
66 | }
--------------------------------------------------------------------------------
/Widgets/ExperienceBuilder/oriented-imagery/icon.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
22 |
--------------------------------------------------------------------------------
/Widgets/DeprecatedWAB2D/OrientedImagery/setting/Setting.html:
--------------------------------------------------------------------------------
1 |
2 |
Add Oriented Imagery Catalog(s):
3 |
4 |
5 |
6 |
7 |
8 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
--------------------------------------------------------------------------------
/Widgets/WebAppBuilder3D/OrientedImagery3D/setting/Setting.html:
--------------------------------------------------------------------------------
1 |
2 |
${nls.addOIC}:
3 |
4 |
5 |
6 |
7 | |
8 |
12 | |
13 |
14 |
15 | |
16 | |
17 |
18 |
19 | |
20 | |
21 | |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
--------------------------------------------------------------------------------
/Widgets/WebAppBuilder3D/OrientedImagery3D/nls/strings.js:
--------------------------------------------------------------------------------
1 | define({
2 | root:{
3 | addOIC: "Add Oriented Imagery Catalog",
4 | selectPointOn: "Turn on to pick a focus point in scene to view image",
5 | selectPointOff: "Turn off to select features in scene",
6 | viewMode: "Image viewer mode",
7 | twoD: "2D",
8 | threeD: "3D",
9 | exposurePoints: "Image exposure points",
10 | currentCoverage: "Current coverage",
11 | similarCoverage: "Additional coverage",
12 | coverageMap: "Coverage map",
13 | vectorLayer: "Vector layer(s)",
14 | addVector: "Add layer to the viewer",
15 | removeVector: "Remove layer from the viewer",
16 | viewGraphic: "Click here to view the selected feature in image.",
17 | removeImage: "Click here to remove image from scene",
18 | dialogTitle1: "Oriented Imagery Viewer",
19 | from: "From",
20 | agol: "ArcGIS Online",
21 | file: "File",
22 | itemUrl: "Item URL",
23 | content: "My Content",
24 | groups: "My Groups",
25 | folder: "Folder",
26 | group: "Group",
27 | oic: "OIC",
28 | add: "Add",
29 | remove: "Remove",
30 | selectOIC: "Select catalog",
31 | select: "Select",
32 | addAll: "Add all",
33 | delete: "Delete",
34 | update: "Update",
35 | notification1: "Please wait. Searching for image.",
36 | notification2: "Please wait! Connecting to ArcGIS Online...",
37 | error1: "Error! Invalid OIC File.",
38 | error2: "Error! Failed to load file",
39 | error3: "Error! Request to OIC Item failed.",
40 | error4: "Error! Invalid OIC.",
41 | error5: "Error! Item type is not OIC.",
42 | error6: "Error! Please enter a valid OIC item url.",
43 | fieldAddMsg: "Image Coordinates will not be stored. For precise editing in Image Space, please add the following fields",
44 | addField: "Add fields?",
45 | cancel: "Cancel",
46 | samples: "Samples",
47 | orgGroups: "My Org Groups",
48 | enterprise: "ArcGIS Enterprise",
49 | enterpriseUrl: "Enterprise portal url",
50 | addFieldMsg: "Cannot add fields",
51 | loginMsg: "Please log in to add fields."
52 |
53 | }
54 |
55 | });
--------------------------------------------------------------------------------
/CustomTypes/Sanborn.py:
--------------------------------------------------------------------------------
1 | #------------------------------------------------------------------------------
2 | # Copyright 2018 Esri
3 | # Licensed under the Apache License, Version 2.0 (the "License");
4 | # you may not use this file except in compliance with the License.
5 | # You may obtain a copy of the License at
6 | #
7 | # http://www.apache.org/licenses/LICENSE-2.0
8 | #
9 | # Unless required by applicable law or agreed to in writing, software
10 | # distributed under the License is distributed on an "AS IS" BASIS,
11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | # See the License for the specific language governing permissions and
13 | # limitations under the License.
14 | #------------------------------------------------------------------------------
15 | # Name: UltramapOblique.py
16 | # Description: This is an custom OIC type.
17 | # Version: 1.1.2
18 | # Date Created : 20181104
19 | # Date updated : 20190523
20 | # Requirements: ArcGIS Pro 2.2
21 | # Author: Esri Imagery Workflows team
22 | #------------------------------------------------------------------------------
23 |
24 | import arcpy
25 | import os
26 | import sys
27 | import math
28 | import datetime
29 | project_folder = os.path.dirname(os.path.dirname(os.path.realpath(__file__)))
30 | gptools_folder = os.path.join((project_folder), "GPTool")
31 | sys.path.append(gptools_folder)
32 | frame_camera_path = os.path.join((gptools_folder),"FrameCamera")
33 | sys.path.append(frame_camera_path)
34 | from FrameCamera import FrameCamera
35 |
36 | def __init__(self, nametype):
37 | self._name = nametype
38 |
39 | def main(oicPath, oicParas, inputParams, defValues, log=None):
40 | try:
41 | frame_camera = FrameCamera(log)
42 | eoFolder = oicParas['MetadataFolder']
43 | preFix = oicParas["Prefix"]
44 | postFix = oicParas['Suffix']
45 | rasterDir = oicParas['RasterPath']
46 | averageZ = oicParas['AverageZ(meters)']
47 | if not averageZ:
48 | averageZ = 0
49 | else:
50 | try:
51 | averageZ = float(averageZ)
52 | except:
53 | averageZ = 0
54 | cameraType = 'sanborn'
55 | frame_camera.writeToFCSanborn(eoFolder, preFix, postFix, rasterDir, cameraType, oicPath, defValues, averageZ)
56 | return("Successfully added list of images.")
57 | except Exception as e:
58 | if log:
59 | log.Message("Error in adding images. {}".format(str(e)), log.const_critical_text)
60 | return ("Error in adding images." + str(e))
--------------------------------------------------------------------------------
/CustomTypes/Australis.py:
--------------------------------------------------------------------------------
1 | #------------------------------------------------------------------------------
2 | # Copyright 2018 Esri
3 | # Licensed under the Apache License, Version 2.0 (the "License");
4 | # you may not use this file except in compliance with the License.
5 | # You may obtain a copy of the License at
6 | #
7 | # http://www.apache.org/licenses/LICENSE-2.0
8 | #
9 | # Unless required by applicable law or agreed to in writing, software
10 | # distributed under the License is distributed on an "AS IS" BASIS,
11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | # See the License for the specific language governing permissions and
13 | # limitations under the License.
14 | #------------------------------------------------------------------------------
15 | # Name: UltramapOblique.py
16 | # Description: This is an custom OIC type.
17 | # Version: 1.1.2
18 | # Date Created : 20181104
19 | # Date updated : 20190523
20 | # Requirements: ArcGIS Pro 2.2
21 | # Author: Esri Imagery Workflows team
22 | #------------------------------------------------------------------------------
23 |
24 | import arcpy
25 | import os
26 | import sys
27 | import math
28 | import datetime
29 | project_folder = os.path.dirname(os.path.dirname(os.path.realpath(__file__)))
30 | gptools_folder = os.path.join((project_folder), "GPTool")
31 | sys.path.append(gptools_folder)
32 | frame_camera_path = os.path.join((gptools_folder),"FrameCamera")
33 | sys.path.append(frame_camera_path)
34 | from FrameCamera import FrameCamera
35 |
36 | def __init__(self, nametype):
37 | self._name = nametype
38 |
39 | def main(oicPath, oicParas, inputParams, defValues, log=None):
40 | try:
41 | frame_camera = FrameCamera(log)
42 | eoFolder = oicParas['MetadataFolder']
43 | preFix = oicParas["Prefix"]
44 | postFix = oicParas['Suffix']
45 | rasterDir = oicParas['RasterPath']
46 | averageZ = oicParas['AverageZ(meters)']
47 | srs = oicParas['SRS(wkid)']
48 | if not averageZ:
49 | averageZ = 0
50 | else:
51 | try:
52 | averageZ = float(averageZ)
53 | except:
54 | averageZ = 0
55 | cameraType = 'australis'
56 | frame_camera.writeToFCAustralis(eoFolder, preFix, postFix, rasterDir, cameraType, oicPath, defValues, averageZ, srs)
57 | return("Successfully added list of images.")
58 | except Exception as e:
59 | if log:
60 | log.Message("Error in adding images. {}".format(str(e)), log.const_critical_text)
61 | arcpy.AddMessage("Error in adding images. {}".format(str(e)))
62 | return ("Error in adding images." + str(e))
--------------------------------------------------------------------------------
/CustomTypes/UltramapOblique.py:
--------------------------------------------------------------------------------
1 | #------------------------------------------------------------------------------
2 | # Copyright 2018 Esri
3 | # Licensed under the Apache License, Version 2.0 (the "License");
4 | # you may not use this file except in compliance with the License.
5 | # You may obtain a copy of the License at
6 | #
7 | # http://www.apache.org/licenses/LICENSE-2.0
8 | #
9 | # Unless required by applicable law or agreed to in writing, software
10 | # distributed under the License is distributed on an "AS IS" BASIS,
11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | # See the License for the specific language governing permissions and
13 | # limitations under the License.
14 | #------------------------------------------------------------------------------
15 | # Name: UltramapOblique.py
16 | # Description: This is an custom OIC type.
17 | # Version: 1.1.2
18 | # Date Created : 20181104
19 | # Date updated : 20190523
20 | # Requirements: ArcGIS Pro 2.2
21 | # Author: Esri Imagery Workflows team
22 | #------------------------------------------------------------------------------
23 |
24 | import arcpy
25 | import os
26 | import sys
27 | import math
28 | import datetime
29 | project_folder = os.path.dirname(os.path.dirname(os.path.realpath(__file__)))
30 | gptools_folder = os.path.join((project_folder), "GPTool")
31 | sys.path.append(gptools_folder)
32 | frame_camera_path = os.path.join((gptools_folder),"FrameCamera")
33 | sys.path.append(frame_camera_path)
34 | from FrameCamera import FrameCamera
35 |
36 | def __init__(self, nametype):
37 | self._name = nametype
38 |
39 | def main(oicPath, oicParas, inputParams, defValues, log=None):
40 | try:
41 | frame_camera = FrameCamera(log)
42 | eoFilename = oicParas['MetadataFile']
43 | preFix = oicParas["Prefix"]
44 | postFix = oicParas['Suffix']
45 | rasterDir = oicParas['RasterPath']
46 | rotatedCams = oicParas['RotatedCameras']
47 | averageZ = oicParas['AverageZ(meters)']
48 | if not averageZ:
49 | averageZ = 0
50 | else:
51 | try:
52 | averageZ = float(averageZ)
53 | except:
54 | averageZ = 0
55 | cameraType = 'ultramap'
56 | productType = 'oblique'
57 | frame_camera.writeToFCUltramap(eoFilename, preFix, postFix, rasterDir, rotatedCams, cameraType, productType, oicPath, defValues, averageZ)
58 | return("Successfully added list of images.")
59 | except Exception as e:
60 | if log:
61 | log.Message("Error in adding images. {}".format(str(e)), log.const_critical_text)
62 | return ("Error in adding images." + str(e))
--------------------------------------------------------------------------------
/CustomTypes/UltramapNadir.py:
--------------------------------------------------------------------------------
1 | #------------------------------------------------------------------------------
2 | # Copyright 2018 Esri
3 | # Licensed under the Apache License, Version 2.0 (the "License");
4 | # you may not use this file except in compliance with the License.
5 | # You may obtain a copy of the License at
6 | #
7 | # http://www.apache.org/licenses/LICENSE-2.0
8 | #
9 | # Unless required by applicable law or agreed to in writing, software
10 | # distributed under the License is distributed on an "AS IS" BASIS,
11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | # See the License for the specific language governing permissions and
13 | # limitations under the License.
14 | #------------------------------------------------------------------------------
15 | # Name: UltramapOblique.py
16 | # Description: This is an custom OIC type.
17 | # Version: 1.1.2
18 | # Date Created : 20181104
19 | # Date updated : 20190523
20 | # Requirements: ArcGIS Pro 2.2
21 | # Author: Esri Imagery Workflows team
22 | #------------------------------------------------------------------------------
23 |
24 | import arcpy
25 | import os
26 | import sys
27 | import math
28 | import datetime
29 | project_folder = os.path.dirname(os.path.dirname(os.path.realpath(__file__)))
30 | gptools_folder = os.path.join((project_folder), "GPTool")
31 | sys.path.append(gptools_folder)
32 | frame_camera_path = os.path.join((gptools_folder),"FrameCamera")
33 | sys.path.append(frame_camera_path)
34 | from FrameCamera import FrameCamera
35 |
36 | def __init__(self, nametype):
37 | self._name = nametype
38 |
39 | def main(oicPath, oicParas, inputParams, defValues, log=None):
40 | try:
41 | frame_camera = FrameCamera(log)
42 | eoFilename = oicParas['MetadataFile']
43 | preFix = oicParas["Prefix"]
44 | postFix = oicParas['Suffix']
45 | rasterDir = oicParas['RasterPath']
46 | rotatedCams = oicParas['RotatedCameras']
47 | averageZ = oicParas['AverageZ(meters)']
48 | nadirType = oicParas['Nadir Type(Panchromatic/MS)'] or 'panchromatic'
49 | if not averageZ:
50 | averageZ = 0
51 | else:
52 | try:
53 | averageZ = float(averageZ)
54 | except:
55 | averageZ = 0
56 | cameraType = 'ultramap'
57 | productType = 'nadir'
58 | frame_camera.writeToFCUltramap(eoFilename, preFix, postFix, rasterDir, rotatedCams, cameraType, productType, oicPath, defValues, averageZ, nadirType)
59 | return("Successfully added list of images.")
60 | except Exception as e:
61 | if log:
62 | log.Message("Error in adding imagelist. {}".format(str(e)), log.const_critical_text)
63 | return ("Error in adding imagelist." + str(e))
64 |
--------------------------------------------------------------------------------
/Widgets/DeprecatedWAB2D/OrientedImagery/Widget.html:
--------------------------------------------------------------------------------
1 |
2 |
Oriented Image Catalog:
3 |
5 |
6 |
7 | Image exposure points
8 |
9 |
10 |
14 |
18 |
22 |
25 |
47 |
48 |
--------------------------------------------------------------------------------
/Widgets/WebAppBuilder3D/OrientedImagery3D/css/style.css:
--------------------------------------------------------------------------------
1 | @charset "UTF-8";
2 | @import "calcite-web.css";
3 | @font-face {
4 | font-family: "launchpad-icons";
5 | src:url("fonts/launchpad-icons.eot");
6 | src:url("fonts/launchpad-icons.eot?#iefix") format("embedded-opentype"),
7 | url("fonts/launchpad-icons.woff") format("woff"),
8 | url("fonts/launchpad-icons.ttf") format("truetype"),
9 | url("fonts/launchpad-icons.svg#launchpad-icons") format("svg");
10 | font-weight: normal;
11 | font-style: normal;
12 |
13 | }
14 |
15 | [data-icon]:before {
16 | font-family: "launchpad-icons" !important;
17 | content: attr(data-icon);
18 | font-style: normal !important;
19 | font-weight: normal !important;
20 | font-variant: normal !important;
21 | text-transform: none !important;
22 | speak: none;
23 | line-height: 1;
24 | -webkit-font-smoothing: antialiased;
25 | -moz-osx-font-smoothing: grayscale;
26 | }
27 |
28 | [class^="launchpad-icon-"]:before,
29 | [class*=" launchpad-icon-"]:before {
30 | font-family: "launchpad-icons" !important;
31 | font-style: normal !important;
32 | font-weight: normal !important;
33 | font-variant: normal !important;
34 | text-transform: none !important;
35 | speak: none;
36 | line-height: 1;
37 | -webkit-font-smoothing: antialiased;
38 | -moz-osx-font-smoothing: grayscale;
39 | }
40 |
41 | .launchpad-icon-plus:before {
42 | content: "a";
43 | }
44 | .launchpad-icon-minus:before {
45 | content: "b";
46 | }
47 | .launchpad-icon-check:before {
48 | content: "k";
49 | }
50 |
51 |
52 | .cmt .viewer .cmtNavBarPanel{
53 | z-index: 2;
54 | }
55 | .cmt .measurement-floating-panel{
56 | z-index: 2;
57 | }
58 | .oi-widget-selectBtn.btn-clear:hover:not(.oi-widget-selectBtnSelected) {
59 | color: #0079c1;
60 | background: #ffffff;
61 | border-color: #0079c1;
62 | }
63 | .oi-widget-selectBtnSelected {
64 | color: #ffffff;
65 | background: #005e95;
66 | border-color: #005e95;
67 | }
68 | .oi-widget-label {
69 | color: #333;
70 | font-size: 14px;
71 | }
72 | .oi-widget-checkBox {
73 | margin-top: 5px;
74 | margin-bottom: 15px;
75 | }
76 | .oi-widget-checkBox .dijitCheckBox {
77 | background-image: none;
78 | background-color: transparent;
79 | border: 1px solid #a9a9a9;
80 | width: 16px;
81 | height: 16px;
82 | line-height: 1;
83 | padding: 0;
84 | text-align: center;
85 | position: relative;
86 | overflow: visible;
87 | }
88 | .oi-widget-checkBox .dijitCheckBox input {
89 | position: absolute;
90 | top: 0;
91 | margin: 0;
92 | }
93 | .oi-widget-checkBox .dijitCheckBoxIcon:before {
94 | font-family: verdana;
95 | font-style: normal;
96 | font-weight: normal;
97 | font-size: 14px;
98 | text-decoration: inherit;
99 | vertical-align: middle;
100 | content: "\2713";
101 | line-height: 1;
102 | color:#27b2cf;
103 | }
104 | .oi-widget-checkBox .dijitCheckBoxChecked,
105 | .oi-widget-checkBox .dijitCheckBoxCheckedDisabled {
106 | background-color:#005e95;
107 | border-color: #005e95;
108 | }
109 | .oi-widget-checkBox .dijitCheckBoxChecked:before,
110 | .oi-widget-checkBox .dijitCheckBoxCheckedDisabled:before {
111 | font-family: "launchpad-icons";
112 | font-style: normal;
113 | font-weight: normal;
114 | font-size: 14px;
115 | text-decoration: inherit;
116 | vertical-align: middle;
117 | content: "k";
118 | line-height: 1px;
119 | color: #fff;
120 | font-size: 14px;
121 | }
122 | .oi-widget-checkBox .dijitCheckBoxIcon {
123 | padding: 0;
124 | }
125 | .oi-widget-checkBox .dijitCheckBoxChecked {
126 | border: 1px solid transparent;
127 | }
128 | .oi-widget-checkBox .dijitCheckBoxHover {
129 | border: 1px solid #005e95;
130 | }
131 | .oi-widget-checkBox .dijitCheckBoxCheckedHover {
132 | border: 1px solid #005e95;
133 | }
134 | .oi-widget-checkBox .dijitCheckBoxDisabled,
135 | .oi-widget-checkBox .dijitCheckBoxCheckedDisabled {
136 | opacity: 0.65;
137 | -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=65)";
138 | filter: alpha(opacity=65);
139 | }
140 |
141 | .oi-widget-svg {
142 |
143 | margin-left: 0.5em;
144 | }
145 | .oi-widget-marginLeft {
146 | margin-left: 0.5em;
147 | }
148 | .oi-widget-dialog {
149 | z-index: 1;
150 | max-height: 85%;
151 | }
152 | .oi-widget-dialog .dijitDialogTitle {
153 | font-size: 12px;
154 | color: black;
155 | }
156 |
157 | .oi-widget-dialog .dijitDialogCloseIcon {
158 | width: 20px;
159 | height: 20px;
160 | background: none;
161 | color: white;
162 | line-height: 20px;
163 | text-align: center;
164 | position: absolute;
165 | top: 6px;
166 | right: 5px;
167 | font-family: "landsat";
168 | font-style: normal;
169 | font-weight: normal;
170 | font-size: 14px;
171 | text-decoration: inherit;
172 | vertical-align: middle;
173 | opacity: 0.65;
174 | outline:none;
175 | }
176 | .oi-widget-dialog .dijitDialogCloseIcon:before {
177 | content: url(../images/cancel.svg);
178 | }
179 | .oi-widget-dialog .dijitDialogCloseIconHover {
180 | opacity: 0.45;
181 | }
182 | .oi-widget-dialog.dijitDialog {
183 | background: #fff;
184 | border: 0 none;
185 | -webkit-box-shadow: 0 -1px 1px rgba(0,0,0,0.15), 0 3px 5px rgba(0,0,0,0.25);
186 | box-shadow: 0 -1px 1px rgba(0,0,0,0.15), 0 3px 5px rgba(0,0,0,0.25);
187 | }
188 | .oi-widget-dialog .dijitDialogTitleBar {
189 | background: #f3f3f3;
190 | border: 0 none;
191 | border-bottom: 0 none;
192 | padding: 7px 10px;
193 | text-align: center;
194 | line-height: 16px;
195 | -webkit-box-sizing: content-box;
196 | box-sizing: content-box;
197 | }
198 | .oi-widget-dialog .dijitDialogPaneContent{
199 | padding: 10px;
200 | background: #ffffff;
201 | border-top: 0 none;
202 | -webkit-box-sizing: content-box;
203 | overflow: auto;
204 | box-sizing: content-box;
205 | }
206 | .oi-widget-hide {
207 | display: none;
208 | }
209 | .oi-widget-centerBtn {
210 | margin: auto;
211 | display: block
212 | }
213 | select {
214 | max-width: 200px !important;
215 | }
216 |
217 | #oic-click-btn {
218 | bottom: 10vh;
219 | left: 1vw;
220 | }
--------------------------------------------------------------------------------
/Widgets/ExperienceBuilder/oriented-imagery/src/runtime/assets/style.css:
--------------------------------------------------------------------------------
1 | @charset "UTF-8";
2 | /* @import "calcite-web.css"; */
3 | @font-face {
4 | font-family: "launchpad-icons";
5 | src:url("fonts/launchpad-icons.eot");
6 | src:url("fonts/launchpad-icons.eot?#iefix") format("embedded-opentype"),
7 | url("fonts/launchpad-icons.woff") format("woff"),
8 | url("fonts/launchpad-icons.ttf") format("truetype"),
9 | url("fonts/launchpad-icons.svg#launchpad-icons") format("svg");
10 | font-weight: normal;
11 | font-style: normal;
12 |
13 | }
14 |
15 | [data-icon]:before {
16 | font-family: "launchpad-icons" !important;
17 | content: attr(data-icon);
18 | font-style: normal !important;
19 | font-weight: normal !important;
20 | font-variant: normal !important;
21 | text-transform: none !important;
22 | speak: none;
23 | line-height: 1;
24 | -webkit-font-smoothing: antialiased;
25 | -moz-osx-font-smoothing: grayscale;
26 | }
27 |
28 | [class^="launchpad-icon-"]:before,
29 | [class*=" launchpad-icon-"]:before {
30 | font-family: "launchpad-icons" !important;
31 | font-style: normal !important;
32 | font-weight: normal !important;
33 | font-variant: normal !important;
34 | text-transform: none !important;
35 | speak: none;
36 | line-height: 1;
37 | -webkit-font-smoothing: antialiased;
38 | -moz-osx-font-smoothing: grayscale;
39 | }
40 |
41 | .launchpad-icon-plus:before {
42 | content: "a";
43 | }
44 | .launchpad-icon-minus:before {
45 | content: "b";
46 | }
47 | .launchpad-icon-check:before {
48 | content: "k";
49 | }
50 |
51 |
52 | .cmt .viewer .cmtNavBarPanel{
53 | z-index: 2;
54 | }
55 | .cmt .measurement-floating-panel{
56 | z-index: 2;
57 | }
58 | .oi-widget-selectBtn.btn-clear:hover:not(.oi-widget-selectBtnSelected) {
59 | color: #0079c1;
60 | background: #ffffff;
61 | border-color: #0079c1;
62 | }
63 | .oi-widget-selectBtnSelected {
64 | color: #ffffff;
65 | background: #005e95;
66 | border-color: #005e95;
67 | }
68 | .oi-widget-label {
69 | color: #333;
70 | font-size: 14px;
71 | }
72 | .oi-widget-checkBox {
73 | margin-top: 5px;
74 | margin-bottom: 15px;
75 | }
76 | .oi-widget-checkBox .dijitCheckBox {
77 | background-image: none;
78 | background-color: transparent;
79 | border: 1px solid #a9a9a9;
80 | width: 16px;
81 | height: 16px;
82 | line-height: 1;
83 | padding: 0;
84 | text-align: center;
85 | position: relative;
86 | overflow: visible;
87 | }
88 | .oi-widget-checkBox .dijitCheckBox input {
89 | position: absolute;
90 | top: 0;
91 | margin: 0;
92 | }
93 | .oi-widget-checkBox .dijitCheckBoxIcon:before {
94 | font-family: verdana;
95 | font-style: normal;
96 | font-weight: normal;
97 | font-size: 14px;
98 | text-decoration: inherit;
99 | vertical-align: middle;
100 | content: "\2713";
101 | line-height: 1;
102 | color:#27b2cf;
103 | }
104 | .oi-widget-checkBox .dijitCheckBoxChecked,
105 | .oi-widget-checkBox .dijitCheckBoxCheckedDisabled {
106 | background-color:#005e95;
107 | border-color: #005e95;
108 | }
109 | .oi-widget-checkBox .dijitCheckBoxChecked:before,
110 | .oi-widget-checkBox .dijitCheckBoxCheckedDisabled:before {
111 | font-family: "launchpad-icons";
112 | font-style: normal;
113 | font-weight: normal;
114 | font-size: 14px;
115 | text-decoration: inherit;
116 | vertical-align: middle;
117 | content: "k";
118 | line-height: 1px;
119 | color: #fff;
120 | font-size: 14px;
121 | }
122 | .oi-widget-checkBox .dijitCheckBoxIcon {
123 | padding: 0;
124 | }
125 | .oi-widget-checkBox .dijitCheckBoxChecked {
126 | border: 1px solid transparent;
127 | }
128 | .oi-widget-checkBox .dijitCheckBoxHover {
129 | border: 1px solid #005e95;
130 | }
131 | .oi-widget-checkBox .dijitCheckBoxCheckedHover {
132 | border: 1px solid #005e95;
133 | }
134 | .oi-widget-checkBox .dijitCheckBoxDisabled,
135 | .oi-widget-checkBox .dijitCheckBoxCheckedDisabled {
136 | opacity: 0.65;
137 | -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=65)";
138 | filter: alpha(opacity=65);
139 | }
140 |
141 | .oi-widget-svg {
142 |
143 | margin-left: 0.5em;
144 | }
145 | .oi-widget-marginLeft {
146 | margin-left: 0.5em;
147 | }
148 | .oi-widget-dialog {
149 | z-index: 1;
150 | max-height: 85%;
151 | }
152 | .oi-widget-dialog .dijitDialogTitle {
153 | font-size: 12px;
154 | color: black;
155 | }
156 |
157 | .oi-widget-dialog .dijitDialogCloseIcon {
158 | width: 20px;
159 | height: 20px;
160 | background: none;
161 | color: white;
162 | line-height: 20px;
163 | text-align: center;
164 | position: absolute;
165 | top: 6px;
166 | right: 5px;
167 | font-family: "landsat";
168 | font-style: normal;
169 | font-weight: normal;
170 | font-size: 14px;
171 | text-decoration: inherit;
172 | vertical-align: middle;
173 | opacity: 0.65;
174 | outline:none;
175 | }
176 | .oi-widget-dialog .dijitDialogCloseIcon:before {
177 | content: url(../images/cancel.svg);
178 | }
179 | .oi-widget-dialog .dijitDialogCloseIconHover {
180 | opacity: 0.45;
181 | }
182 | .oi-widget-dialog.dijitDialog {
183 | background: #fff;
184 | border: 0 none;
185 | -webkit-box-shadow: 0 -1px 1px rgba(0,0,0,0.15), 0 3px 5px rgba(0,0,0,0.25);
186 | box-shadow: 0 -1px 1px rgba(0,0,0,0.15), 0 3px 5px rgba(0,0,0,0.25);
187 | }
188 | .oi-widget-dialog .dijitDialogTitleBar {
189 | background: #f3f3f3;
190 | border: 0 none;
191 | border-bottom: 0 none;
192 | padding: 7px 10px;
193 | text-align: center;
194 | line-height: 16px;
195 | -webkit-box-sizing: content-box;
196 | box-sizing: content-box;
197 | }
198 | .oi-widget-dialog .dijitDialogPaneContent{
199 | padding: 10px;
200 | background: #ffffff;
201 | border-top: 0 none;
202 | -webkit-box-sizing: content-box;
203 | overflow: auto;
204 | box-sizing: content-box;
205 | }
206 | .oi-widget-hide {
207 | display: none;
208 | }
209 | .oi-widget-centerBtn {
210 | margin: auto;
211 | display: block
212 | }
213 | select {
214 | max-width: 200px !important;
215 | }
216 |
217 | button {
218 | line-height: normal!important;
219 | }
220 |
221 | .oi-widget-selectBtnSelected {
222 | color: #ffffff;
223 | background: #005e95;
224 | border-color: #005e95;
225 | }
--------------------------------------------------------------------------------
/CustomTypes/Fema.py:
--------------------------------------------------------------------------------
1 | #------------------------------------------------------------------------------
2 | # Copyright 2018 Esri
3 | # Licensed under the Apache License, Version 2.0 (the "License");
4 | # you may not use this file except in compliance with the License.
5 | # You may obtain a copy of the License at
6 | #
7 | # http://www.apache.org/licenses/LICENSE-2.0
8 | #
9 | # Unless required by applicable law or agreed to in writing, software
10 | # distributed under the License is distributed on an "AS IS" BASIS,
11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | # See the License for the specific language governing permissions and
13 | # limitations under the License.
14 | #------------------------------------------------------------------------------
15 | # Name: UltramapOblique.py
16 | # Description: This is an custom OIC type.
17 | # Version: 1.0
18 | # Date Created : 20181104
19 | # Requirements: ArcGIS Pro 2.2
20 | # Author: Esri Imagery Workflows team
21 | #------------------------------------------------------------------------------
22 |
23 | import arcpy
24 | import os
25 | import sys
26 | import csv
27 |
28 | def __init__(self, nametype):
29 | self._name = nametype
30 |
31 | def main(oicPath, oicParas, inputParams, defValues, log=None):
32 | try:
33 | metadataFile = oicParas['MetadataFilePath']
34 | headingOffset = oicParas["HeadingOffset"]
35 | rasterDir = oicParas['RasterFolder']
36 | srs = oicParas['SRS(wkid)']
37 | importCSVtoFCFema(metadataFile, rasterDir, headingOffset, srs, oicPath, defValues, log)
38 | return("Successfully added list of images.")
39 | except Exception as e:
40 | if log:
41 | log.Message("Error in adding images. {}".format(str(e)), log.const_critical_text)
42 | arcpy.AddMessage("Error in adding images. {}".format(str(e)))
43 | return ("Error in adding images." + str(e))
44 |
45 | def getTableDefaults(sourceValues, userDefaults):
46 | # Retuns the default parameters to be filled in the table. Computed from the defualt parameter values entered by the user and the corresponding values from the source.
47 | tableDefaults = {}
48 | for userDefault in userDefaults:
49 | if userDefault['isDefault']:
50 | tableDefaults[userDefault['name']] = None
51 | else:
52 | if userDefault['value']:
53 | tableDefaults[userDefault['name']] = userDefault['value']
54 | else:
55 | tableDefaults[userDefault['name']] = sourceValues[userDefault['name']]
56 | return tableDefaults
57 |
58 | def importCSVtoFCFema(metadataFilePath, rasterDir, headingOffset, srs, fcPath, defValues, log):
59 | fcFields = ['SHAPE@','Name','Image','CamHeading','CamPitch','CamRoll','OIType','HFOV','VFOV','AvgHtAG','FarDist','NearDist','ImgRot']
60 | fcCursor = arcpy.da.InsertCursor(fcPath,fcFields)
61 | desc = arcpy.Describe(fcPath)
62 | fcSRS = desc.spatialReference
63 |
64 | oicParts = fcPath.split(os.sep)
65 | oicProjectPath = os.sep.join(oicParts[:-2])
66 | grpLayerName = oicParts[-1].split('_')[0]
67 |
68 | with open(metadataFilePath, newline='') as metadataFile:
69 | metadataReader = csv.reader(metadataFile)
70 | for metadataRow in metadataReader:
71 | insertRow = []
72 | name = metadataRow[0]
73 | image = '{}.jpg'.format(os.path.join(rasterDir, name))
74 | camHeading = 0
75 | try:
76 | if metadataRow[6]:
77 | camHeading = float(metadataRow[6])
78 | if headingOffset:
79 | camHeading = camHeading + float(headingOffset)
80 | except:
81 | arcpy.AddWarning("Input Yaw or heading offset for image {} must be numeric.".format(image))
82 | log.Message("Iinput Yaw or heading offset for image {} must be numeric".format(image), log.const_critical_text)
83 | if camHeading < 0:
84 | camHeading = camHeading + 360
85 | camPitch = 0
86 | try:
87 | if metadataRow[5]:
88 | camPitch = float(metadataRow[5])
89 | except:
90 | arcpy.AddWarning("Input Pitch for image {} must be numeric".format(image))
91 | log.Message("Input Pitch for image {} must be numeric".format(image), log.const_critical_text)
92 | camRoll = 0
93 | try:
94 | if metadataRow[4]:
95 | camRoll = float(metadataRow[4])
96 | except:
97 | arcpy.AddWarning("Input Roll for image {} must be numeric".format(image))
98 | log.Message("In input Roll for image {} must be numeric".format(image), log.const_critical_text)
99 | avgHtAG = 0
100 | try:
101 | if metadataRow[3]:
102 | avgHtAG = float(metadataRow[3])
103 | except:
104 | arcpy.AddWarning("Input altitude for image {} must be numeric".format(image))
105 | log.Message("Input altitude for image {} must be numeric".format(image), log.const_critical_text)
106 | point = arcpy.Point()
107 | try:
108 | point.X = float(metadataRow[2])
109 | point.Y = float(metadataRow[1])
110 | except:
111 | arcpy.AddWarning("Input altitude for image {} must be numeric".format(image))
112 | log.Message("Input altitude for image {} must be numeric".format(image), log.const_critical_text)
113 | inSRSObj = arcpy.SpatialReference(int(srs))
114 | pointGeometry = arcpy.PointGeometry(point, inSRSObj).projectAs(fcSRS)
115 | pointCentroid = pointGeometry.centroid
116 | insertRow.extend([pointCentroid, name, image])
117 | sourceValues = {
118 | "CamPitch": camPitch,
119 | "CamRoll": camRoll,
120 | "CamHeading": camHeading,
121 | "FarDist": None,
122 | "NearDist": None,
123 | "AvgHtAG": avgHtAG,
124 | "HFOV": None,
125 | "VFOV": None
126 | }
127 | OIType = defValues['OIType'][0]
128 | insertRow.extend([sourceValues['CamHeading'], sourceValues['CamPitch'],
129 | sourceValues['CamRoll'], OIType, sourceValues['HFOV'],
130 | sourceValues['VFOV'], sourceValues['AvgHtAG'],
131 | sourceValues['FarDist'], sourceValues['NearDist'],
132 | 0])
133 | fcCursor.insertRow(insertRow)
--------------------------------------------------------------------------------
/CustomTypes/RieglRiPROCESS_CSV.py:
--------------------------------------------------------------------------------
1 | #------------------------------------------------------------------------------
2 | # Copyright 2018 Esri
3 | # Licensed under the Apache License, Version 2.0 (the "License");
4 | # you may not use this file except in compliance with the License.
5 | # You may obtain a copy of the License at
6 | #
7 | # http://www.apache.org/licenses/LICENSE-2.0
8 | #
9 | # Unless required by applicable law or agreed to in writing, software
10 | # distributed under the License is distributed on an "AS IS" BASIS,
11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | # See the License for the specific language governing permissions and
13 | # limitations under the License.
14 | #------------------------------------------------------------------------------
15 | # Name: RieglRPROCESS_CSV.py
16 | # Description: This is a custom OIC type.
17 | # Version: 1.1.2
18 | # Date Created : 20181104
19 | # Date updated : 20190523
20 | # Requirements: ArcGIS Pro 2.2
21 | # Author: Esri Imagery Workflows team
22 | #------------------------------------------------------------------------------
23 |
24 | import arcpy
25 | import os
26 | import csv
27 | import json
28 | import math
29 | #import orientedimagerytools as oitools
30 |
31 | def __init__(self, nametype):
32 | self._name = nametype
33 |
34 | def main(oicPath, oicParas, inputParams, defValues, log=None):
35 | try:
36 | #defValues = {valueDict['name']: valueDict['value'] for valueDict in defValueList}
37 | outPathSRS = arcpy.Describe(oicPath).spatialReference
38 | rasterPath = oicParas['RasterPath']
39 | cameraFile = oicParas['Metadata File Path']
40 | imageryType = oicParas['Metadata Type(Panorama/Camera)']
41 | isCam = True if imageryType.lower() == 'camera' else False
42 | inputwkid = oicParas['SRS']
43 | if isCam:
44 | for i in range(6):
45 | camFileParts = os.path.splitext(cameraFile)
46 | camFilePath = ''.join(['{}{}'.format(camFileParts[0][:-1], str(i)), camFileParts[1]])
47 | importCSVtoFCLadyBug(camFilePath, oicPath, inputwkid, rasterPath, isCam, defValues, log)
48 | else:
49 | importCSVtoFCLadyBug(cameraFile, oicPath, inputwkid, rasterPath, isCam, defValues, log)
50 | return("Successfully added list of images.")
51 | except Exception as e:
52 | if log:
53 | log.Message("Error in adding images. {}".format(str(e)), log.const_critical_text)
54 | return ("Error in adding images." + str(e))
55 |
56 |
57 |
58 | def getDefaultValue(propertyName, isCam):
59 | if isCam:
60 | hfov = 72
61 | else:
62 | hfov = 360
63 | values = {
64 | "FarDist": 30,
65 | "NearDist": 3,
66 | "AvgHtAG": 3,
67 | "HFOV": hfov,
68 | "VFOV": 90
69 | }
70 | return values[propertyName]
71 |
72 | def replaceDefaultValues(defValues, isCam):
73 | for key in defValues:
74 | if key in ['HFOV', 'VFOV', 'AvgHtAG', 'FarDist', 'NearDist']:
75 | if not defValues[key]:
76 | defValues[key] = getDefaultValue(key, isCam)
77 | return defValues
78 |
79 | def getTableDefaults(sourceValues, userDefaults):
80 | # Retuns the default parameters to be filled in the table. Computed from the defualt parameter values entered by the user and the corresponding values from the source.
81 | tableDefaults = {}
82 | for userDefault in userDefaults:
83 | if userDefault['isDefault']:
84 | tableDefaults[userDefault['name']] = None
85 | else:
86 | if userDefault['value']:
87 | tableDefaults[userDefault['name']] = userDefault['value']
88 | else:
89 | tableDefaults[userDefault['name']] = sourceValues[userDefault['name']]
90 | return tableDefaults
91 |
92 | def importCSVtoFCLadyBug(csvTablePath, fcPath, inwkid, rasterPath, isCam, defValues, log):
93 | fcFields = ['SHAPE@','Name','Image','CamHeading','CamPitch','CamRoll','OIType','HFOV','VFOV','AvgHtAG','FarDist','NearDist','ImgRot']
94 | fcCursor = arcpy.da.InsertCursor(fcPath,fcFields)
95 | desc = arcpy.Describe(fcPath)
96 | fcSRS = desc.spatialReference
97 | headers = []
98 | with open(csvTablePath, 'r') as f:
99 | reader = csv.DictReader(f)
100 | headers = reader.fieldnames
101 | if 'Origin (Longitude[deg]' in headers:
102 | headers = ['Filename','Origin (Longitude[deg]','Latitude[deg]','Omega[deg]','Phi[deg]','Kappa[deg]']
103 | else:
104 | headers = ['Filename', 'Origin (Easting[m]', 'Northing[m]', 'Omega[deg]', 'Phi[deg]', 'Kappa[deg]']
105 |
106 | csvFields = tuple(headers)
107 |
108 | oicParts = fcPath.split(os.sep)
109 | oicProjectPath = os.sep.join(oicParts[:-2])
110 | grpLayerName = oicParts[-1].split('_')[0]
111 |
112 | with arcpy.da.SearchCursor(csvTablePath,csvFields) as inCursor:
113 | for row in inCursor:
114 | insertRow = []
115 | name = row[0]
116 | folderName = ''
117 | if 'camera' in name.lower():
118 | folderName = 'Camera_{}'.format(os.path.splitext(name)[0][-1])
119 | if rasterPath.startswith('http'):
120 | if folderName:
121 | imagePath = '/'.join([rasterPath.strip('/'), folderName, name])
122 | else:
123 | imagePath = '/'.join([rasterPath.strip('/'), name])
124 | else:
125 | if folderName:
126 | imagePath = os.path.join(rasterPath, folderName, name)
127 | else:
128 | imagePath = os.path.join(rasterPath, name)
129 | x = row[1]
130 | y = row[2]
131 | omega = row[3]
132 | phi = row[4]
133 | kappa = row[5]
134 |
135 | inPtSRS = arcpy.SpatialReference(int(inwkid))
136 | aPoint = arcpy.Point()
137 | aPoint.X = x
138 | aPoint.Y = y
139 |
140 | aPtGeometry = arcpy.PointGeometry(aPoint,inPtSRS).projectAs(fcSRS)
141 | aPoint = aPtGeometry.centroid
142 | insertRow.extend([aPoint, name, imagePath])
143 |
144 | omegaVal = omega * (math.pi/180)
145 | phiVal = phi * (math.pi / 180)
146 | kappaVal = kappa * (math.pi / 180)
147 |
148 | camHeading = (math.atan2(-1 * (math.sin(phiVal)), (-1 * (-math.sin(omegaVal)*math.cos(phiVal)))) * 180) / math.pi
149 | if camHeading < 0:
150 | camHeading = camHeading + 360
151 | camPitch = math.acos(math.cos(omegaVal)*math.cos(phiVal)) * 180 / math.pi
152 | camRoll = (math.atan2((-1 * ((math.sin(omegaVal)*math.sin(kappaVal)) - (math.cos(omegaVal)*math.sin(phiVal)* math.cos(kappaVal)))), (math.sin(omegaVal)*math.cos(kappaVal)) + (math.cos(omegaVal)* math.sin(phiVal)* math.sin(kappaVal))) * 180) / math.pi
153 | sourceValues = {
154 | "CamPitch": camPitch,
155 | "CamRoll": camRoll,
156 | "CamHeading": camHeading,
157 | "FarDist": None,
158 | "NearDist": None,
159 | "AvgHtAG": None,
160 | "HFOV": None,
161 | "VFOV": None
162 | }
163 | defValues = replaceDefaultValues(defValues, isCam)
164 | OIType = defValues['OIType'][0]
165 |
166 | insertRow.extend([sourceValues['CamHeading'], sourceValues['CamPitch'],
167 | sourceValues['CamRoll'], OIType, sourceValues['HFOV'],
168 | sourceValues['VFOV'], sourceValues['AvgHtAG'],
169 | sourceValues['FarDist'], sourceValues['NearDist'],
170 | 0])
171 | fcCursor.insertRow(insertRow)
172 |
173 | del inCursor
174 | del fcCursor
175 |
--------------------------------------------------------------------------------
/Widgets/DeprecatedWAB2D/OrientedImagery/css/style.css:
--------------------------------------------------------------------------------
1 | @charset "UTF-8";
2 |
3 | @font-face {
4 | font-family: "launchpad-icons";
5 | src:url("fonts/launchpad-icons.eot");
6 | src:url("fonts/launchpad-icons.eot?#iefix") format("embedded-opentype"),
7 | url("fonts/launchpad-icons.woff") format("woff"),
8 | url("fonts/launchpad-icons.ttf") format("truetype"),
9 | url("fonts/launchpad-icons.svg#launchpad-icons") format("svg");
10 | font-weight: normal;
11 | font-style: normal;
12 |
13 | }
14 |
15 | [data-icon]:before {
16 | font-family: "launchpad-icons" !important;
17 | content: attr(data-icon);
18 | font-style: normal !important;
19 | font-weight: normal !important;
20 | font-variant: normal !important;
21 | text-transform: none !important;
22 | speak: none;
23 | line-height: 1;
24 | -webkit-font-smoothing: antialiased;
25 | -moz-osx-font-smoothing: grayscale;
26 | }
27 |
28 | [class^="launchpad-icon-"]:before,
29 | [class*=" launchpad-icon-"]:before {
30 | font-family: "launchpad-icons" !important;
31 | font-style: normal !important;
32 | font-weight: normal !important;
33 | font-variant: normal !important;
34 | text-transform: none !important;
35 | speak: none;
36 | line-height: 1;
37 | -webkit-font-smoothing: antialiased;
38 | -moz-osx-font-smoothing: grayscale;
39 | }
40 |
41 | .launchpad-icon-plus:before {
42 | content: "a";
43 | }
44 | .launchpad-icon-minus:before {
45 | content: "b";
46 | }
47 | .oi-widget-dialog {
48 | border-radius: 10px !important;
49 | }
50 | .oi-widget-dialog-style {
51 | min-width: 250px !important;
52 | }
53 |
54 | .oi-widget-dialog.dijitDialog {
55 | background: #fff !important;
56 | border: 0 none !important;
57 | -webkit-box-shadow: 0 -1px 1px rgba(0,0,0,0.15),0 3px 5px rgba(0,0,0,0.25) !important;
58 | box-shadow: 0 -1px 1px rgba(0,0,0,0.15),0 3px 5px rgba(0,0,0,0.25) !important;
59 | }
60 | .oi-widget-dialog .dijitDialogPaneContent {
61 | background: #333333 !important;
62 | padding: 10px !important;
63 | border-top: 0 none !important;
64 | position: relative !important;
65 | -webkit-box-sizing: content-box !important;
66 | box-sizing: content-box !important;
67 | overflow-x: hidden !important;
68 | overflow-y: hidden !important;
69 | overflow: hidden !important;
70 | float: none !important;
71 | color: black !important;
72 | }
73 | .oi-widget-dialog-style .dijitDialogPaneContent {
74 | background: #FFFFFF !important;
75 | }
76 | .oi-widget-dialog .dijitDialogPaneActionBar {
77 | /* the bar at bottom with OK/Cancel buttons */
78 | padding-top: 15px !important;
79 | text-align: right !important;
80 | position: relative !important;
81 | }
82 | .oi-widget-dialog .dijitTooltipDialog .dijitDialogPaneActionBar {
83 | margin: 15px -10px -5px !important;
84 | }
85 | .oi-widget-dialog .dijitDialogPaneActionBar .dijitButton {
86 | float: none !important;
87 | }
88 | .oi-widget-dialog .dijitDialogTitleBar {
89 | /* outer container for the titlebar of the dialog */
90 | background: #242424 !important;
91 | border: 0 none !important;
92 | border-bottom: 0 none !important;
93 | padding: 7px 10px !important;
94 | text-align: center !important;
95 | line-height: 16px !important;
96 | -webkit-box-sizing: content-box !important;
97 | box-sizing: content-box !important;
98 | max-height: 30px !important;
99 | }
100 | .oi-widget-dialog .dijitDialogTitle {
101 | /* typography and styling of the dialog title */
102 | font-size: 12px !important;
103 | color: #ccc !important;
104 | }
105 | .oi-widget-dialog .dijitDialogCloseIcon {
106 | /* the default close icon for the dialog */
107 | width: 20px !important;
108 | height: 20px !important;
109 | background: none !important;
110 | color: white !important;
111 | line-height: 20px !important;
112 | text-align: center !important;
113 | position: absolute !important;
114 | top: 6px !important;
115 | right: 10px !important;
116 | font-family: "landsat" !important;
117 | font-style: normal !important;
118 | font-weight: normal !important;
119 | font-size: 14px !important;
120 | text-decoration: inherit !important;
121 | vertical-align: middle !important;
122 | opacity: 0.65;
123 | -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=65)";
124 | filter: alpha(opacity=65);
125 | }
126 | .oi-widget-dialog .dijitDialogCloseIcon:before {
127 | content: url("../images/close_default.png");
128 | }
129 | .oi-widget-dialog .dijitDialogCloseIcon .closeText {
130 | display: none;
131 | }
132 | .oi-widget-dialog .dijitDialogCloseIconHover,
133 | .oi-widget-dialog .dijitDialogCloseIconActive {
134 | opacity:1;
135 | -ms-filter: none;
136 | filter: none;
137 | }
138 | .oi-widget-dialog .dijitDialogUnderlay {
139 | background: #000;
140 | opacity: 0.65;
141 | -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=65)";
142 | filter: alpha(opacity=65);
143 | }
144 | .oi-widget-label {
145 | color: #333 !important;
146 | font-size: 14px !important;
147 | }
148 | .oi-widget-checkBox {
149 | padding-top: 5px !important;
150 | padding-left: 5px !important;
151 | }
152 | .oi-widget-svg {
153 | margin-top: 3px;
154 | margin-left: 20px;
155 | }
156 | /*.oi-widget-checkBox.dijitCheckBox {
157 | margin-left: 5px;
158 | }*/
159 | .oi-widget-addBtn {
160 | width: auto !important;
161 | border: 1px solid #ddd !important;
162 | -webkit-box-sizing: border-box;
163 | -moz-box-sizing: border-box;
164 | box-sizing: border-box;
165 | -webkit-transition: all 0.05s linear;
166 | transition: all 0.05s linear;
167 | cursor: pointer !important;
168 | /* font-size: 0.9375rem;*/
169 | }
170 | .oi-widget-addBtn:hover{
171 | background: #ddd !important;
172 | }
173 | .oi-widget-addBtn.dijitButton .dijitButtonNode {
174 | padding: 0.2rem 0.4rem !important;
175 | border: 0px transparent !important;
176 | background: transparent !important;
177 | box-shadow: none !important;
178 | }
179 | .oi-widget-centerBtn.dijitButton .dijitButtonNode {
180 | color: black !important;
181 | min-width: 50px !important;
182 | }
183 | .oi-widget-addBtn .dijitButtonContents {
184 | padding: 5px !important;
185 | }
186 | .oi-widget-centerBtn {
187 | display: block;
188 | width: 50px !important;
189 | min-width: 50px !important;
190 | margin: 0 auto !important;
191 | }
192 | .oi-widget-addBtn:disabled {
193 | cursor: not-allowed !important;
194 | pointer-events: none !important;
195 | }
196 | .oi-widget-addBtn .dijitButtonText {
197 | padding: 0px;
198 | }
199 | .cmt .viewer .cmtNavBarPanel{
200 | z-index: 2;
201 | }
202 | .cmt .measurement-floating-panel{
203 | z-index: 2;
204 | }
205 | .oi-widget-select {
206 | margin-top: 5px !important;
207 | background: white !important;
208 | border: 1px solid #ddd !important;
209 | height: 30px !important;
210 | }
211 | .oi-widget-select .dijitSelect .dijitInputField{
212 | padding: 1px 10px !important;
213 | }
214 | .oi-widget-select .dijitSelectHover {
215 | background-color: white !important;
216 | border-color: #b5bcc7 !important;
217 | }
218 | .oi-widget-select .dijitSelectHover .dijitArrowButton{
219 | background-color:rgba(39,178,207,0.5) !important;
220 | border-color:rgba(39,178,207,0.5) !important;
221 | }
222 |
223 | .oi-widget-select .dijitSelectFocused {
224 | border-color: #b5bcc7 !important;
225 | }
226 | .oi-widget-select .dijitSelectFocused .dijitArrowButton{
227 | background-color:rgba(39,178,207,0.5) !important;
228 | border-color:rgba(39,178,207,0.5) !important;
229 | }
230 | .oi-widget-select .dijitMenu .dijitMenuItemSelected td{
231 | background-color:rgba(39,178,207,0.5) !important;
232 | border-color:rgba(39,178,207,0.5) !important;
233 | }
234 | /*
235 | .oi-widget-checkBox .dijitCheckBox {
236 | background-image: none !important;
237 | background-color: transparent !important;
238 | border: 1px solid #4d4d4d !important;
239 | width: 14px !important;
240 | height: 14px !important;
241 | line-height: 1 !important;
242 | padding: 0 !important;
243 | text-align: center !important;
244 | position: relative !important;
245 | overflow: visible !important;
246 | }
247 | .oi-widget-checkBox .dijitCheckBox input {
248 | position: absolute !important;
249 | top: 0 !important;
250 | }
251 | .oi-widget-checkBox .dijitCheckBoxIcon:before {
252 | font-family: verdana !important;
253 | font-style: normal !important;
254 | font-weight: normal !important;
255 | font-size: 14px !important;
256 | text-decoration: inherit !important;
257 | vertical-align: middle !important;
258 | content: "\2713" !important;
259 | line-height: 1 !important;
260 | color:#27b2cf !important;
261 | }
262 | .oi-widget-checkBox .dijitCheckBoxChecked,
263 | .oi-widget-checkBox .dijitCheckBoxCheckedDisabled {
264 | background-color:#27b2cf !important;
265 | border-color: #27b2cf !important;
266 | }
267 | .oi-widget-checkBox .dijitCheckBoxChecked:before,
268 | .oi-widget-checkBox .dijitCheckBoxCheckedDisabled:before {
269 | font-family: "landsat" !important;
270 | font-style: normal !important;
271 | font-weight: normal !important;
272 | font-size: 14px !important;
273 | text-decoration: inherit !important;
274 | vertical-align: middle !important;
275 | content: "\2713" !important;
276 | line-height: 1 !important;
277 | color: #fff !important;
278 | font-size: 10px !important;
279 | }
280 | .oi-widget-checkBox .dijitCheckBoxIcon {
281 | padding: 0 !important;
282 | }
283 | .oi-widget-checkBox .dijitCheckBoxChecked {
284 | border: 1px solid transparent !important;
285 | }
286 | .oi-widget-checkBox .dijitCheckBoxHover {
287 | border: 1px solid #007ac2 !important;
288 | }
289 | .oi-widget-checkBox .dijitCheckBoxCheckedHover {
290 | border: 1px solid #007ac2 !important;
291 | }
292 | .oi-widget-checkBox .dijitCheckBoxDisabled,
293 | .oi-widget-checkBox .dijitCheckBoxCheckedDisabled {
294 | opacity: 0.65;
295 | -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=65)";
296 | filter: alpha(opacity=65);
297 | }*/
--------------------------------------------------------------------------------
/Widgets/DeprecatedWAB2D/OrientedImagery/css/fonts/icomoon.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
--------------------------------------------------------------------------------
/Widgets/DeprecatedWAB2D/OrientedImagery/css/fonts/tool-icons.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | Apache License
2 | Version 2.0, January 2004
3 | http://www.apache.org/licenses/
4 |
5 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6 |
7 | 1. Definitions.
8 |
9 | "License" shall mean the terms and conditions for use, reproduction,
10 | and distribution as defined by Sections 1 through 9 of this document.
11 |
12 | "Licensor" shall mean the copyright owner or entity authorized by
13 | the copyright owner that is granting the License.
14 |
15 | "Legal Entity" shall mean the union of the acting entity and all
16 | other entities that control, are controlled by, or are under common
17 | control with that entity. For the purposes of this definition,
18 | "control" means (i) the power, direct or indirect, to cause the
19 | direction or management of such entity, whether by contract or
20 | otherwise, or (ii) ownership of fifty percent (50%) or more of the
21 | outstanding shares, or (iii) beneficial ownership of such entity.
22 |
23 | "You" (or "Your") shall mean an individual or Legal Entity
24 | exercising permissions granted by this License.
25 |
26 | "Source" form shall mean the preferred form for making modifications,
27 | including but not limited to software source code, documentation
28 | source, and configuration files.
29 |
30 | "Object" form shall mean any form resulting from mechanical
31 | transformation or translation of a Source form, including but
32 | not limited to compiled object code, generated documentation,
33 | and conversions to other media types.
34 |
35 | "Work" shall mean the work of authorship, whether in Source or
36 | Object form, made available under the License, as indicated by a
37 | copyright notice that is included in or attached to the work
38 | (an example is provided in the Appendix below).
39 |
40 | "Derivative Works" shall mean any work, whether in Source or Object
41 | form, that is based on (or derived from) the Work and for which the
42 | editorial revisions, annotations, elaborations, or other modifications
43 | represent, as a whole, an original work of authorship. For the purposes
44 | of this License, Derivative Works shall not include works that remain
45 | separable from, or merely link (or bind by name) to the interfaces of,
46 | the Work and Derivative Works thereof.
47 |
48 | "Contribution" shall mean any work of authorship, including
49 | the original version of the Work and any modifications or additions
50 | to that Work or Derivative Works thereof, that is intentionally
51 | submitted to Licensor for inclusion in the Work by the copyright owner
52 | or by an individual or Legal Entity authorized to submit on behalf of
53 | the copyright owner. For the purposes of this definition, "submitted"
54 | means any form of electronic, verbal, or written communication sent
55 | to the Licensor or its representatives, including but not limited to
56 | communication on electronic mailing lists, source code control systems,
57 | and issue tracking systems that are managed by, or on behalf of, the
58 | Licensor for the purpose of discussing and improving the Work, but
59 | excluding communication that is conspicuously marked or otherwise
60 | designated in writing by the copyright owner as "Not a Contribution."
61 |
62 | "Contributor" shall mean Licensor and any individual or Legal Entity
63 | on behalf of whom a Contribution has been received by Licensor and
64 | subsequently incorporated within the Work.
65 |
66 | 2. Grant of Copyright License. Subject to the terms and conditions of
67 | this License, each Contributor hereby grants to You a perpetual,
68 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69 | copyright license to reproduce, prepare Derivative Works of,
70 | publicly display, publicly perform, sublicense, and distribute the
71 | Work and such Derivative Works in Source or Object form.
72 |
73 | 3. Grant of Patent License. Subject to the terms and conditions of
74 | this License, each Contributor hereby grants to You a perpetual,
75 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76 | (except as stated in this section) patent license to make, have made,
77 | use, offer to sell, sell, import, and otherwise transfer the Work,
78 | where such license applies only to those patent claims licensable
79 | by such Contributor that are necessarily infringed by their
80 | Contribution(s) alone or by combination of their Contribution(s)
81 | with the Work to which such Contribution(s) was submitted. If You
82 | institute patent litigation against any entity (including a
83 | cross-claim or counterclaim in a lawsuit) alleging that the Work
84 | or a Contribution incorporated within the Work constitutes direct
85 | or contributory patent infringement, then any patent licenses
86 | granted to You under this License for that Work shall terminate
87 | as of the date such litigation is filed.
88 |
89 | 4. Redistribution. You may reproduce and distribute copies of the
90 | Work or Derivative Works thereof in any medium, with or without
91 | modifications, and in Source or Object form, provided that You
92 | meet the following conditions:
93 |
94 | (a) You must give any other recipients of the Work or
95 | Derivative Works a copy of this License; and
96 |
97 | (b) You must cause any modified files to carry prominent notices
98 | stating that You changed the files; and
99 |
100 | (c) You must retain, in the Source form of any Derivative Works
101 | that You distribute, all copyright, patent, trademark, and
102 | attribution notices from the Source form of the Work,
103 | excluding those notices that do not pertain to any part of
104 | the Derivative Works; and
105 |
106 | (d) If the Work includes a "NOTICE" text file as part of its
107 | distribution, then any Derivative Works that You distribute must
108 | include a readable copy of the attribution notices contained
109 | within such NOTICE file, excluding those notices that do not
110 | pertain to any part of the Derivative Works, in at least one
111 | of the following places: within a NOTICE text file distributed
112 | as part of the Derivative Works; within the Source form or
113 | documentation, if provided along with the Derivative Works; or,
114 | within a display generated by the Derivative Works, if and
115 | wherever such third-party notices normally appear. The contents
116 | of the NOTICE file are for informational purposes only and
117 | do not modify the License. You may add Your own attribution
118 | notices within Derivative Works that You distribute, alongside
119 | or as an addendum to the NOTICE text from the Work, provided
120 | that such additional attribution notices cannot be construed
121 | as modifying the License.
122 |
123 | You may add Your own copyright statement to Your modifications and
124 | may provide additional or different license terms and conditions
125 | for use, reproduction, or distribution of Your modifications, or
126 | for any such Derivative Works as a whole, provided Your use,
127 | reproduction, and distribution of the Work otherwise complies with
128 | the conditions stated in this License.
129 |
130 | 5. Submission of Contributions. Unless You explicitly state otherwise,
131 | any Contribution intentionally submitted for inclusion in the Work
132 | by You to the Licensor shall be under the terms and conditions of
133 | this License, without any additional terms or conditions.
134 | Notwithstanding the above, nothing herein shall supersede or modify
135 | the terms of any separate license agreement you may have executed
136 | with Licensor regarding such Contributions.
137 |
138 | 6. Trademarks. This License does not grant permission to use the trade
139 | names, trademarks, service marks, or product names of the Licensor,
140 | except as required for reasonable and customary use in describing the
141 | origin of the Work and reproducing the content of the NOTICE file.
142 |
143 | 7. Disclaimer of Warranty. Unless required by applicable law or
144 | agreed to in writing, Licensor provides the Work (and each
145 | Contributor provides its Contributions) on an "AS IS" BASIS,
146 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147 | implied, including, without limitation, any warranties or conditions
148 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149 | PARTICULAR PURPOSE. You are solely responsible for determining the
150 | appropriateness of using or redistributing the Work and assume any
151 | risks associated with Your exercise of permissions under this License.
152 |
153 | 8. Limitation of Liability. In no event and under no legal theory,
154 | whether in tort (including negligence), contract, or otherwise,
155 | unless required by applicable law (such as deliberate and grossly
156 | negligent acts) or agreed to in writing, shall any Contributor be
157 | liable to You for damages, including any direct, indirect, special,
158 | incidental, or consequential damages of any character arising as a
159 | result of this License or out of the use or inability to use the
160 | Work (including but not limited to damages for loss of goodwill,
161 | work stoppage, computer failure or malfunction, or any and all
162 | other commercial damages or losses), even if such Contributor
163 | has been advised of the possibility of such damages.
164 |
165 | 9. Accepting Warranty or Additional Liability. While redistributing
166 | the Work or Derivative Works thereof, You may choose to offer,
167 | and charge a fee for, acceptance of support, warranty, indemnity,
168 | or other liability obligations and/or rights consistent with this
169 | License. However, in accepting such obligations, You may act only
170 | on Your own behalf and on Your sole responsibility, not on behalf
171 | of any other Contributor, and only if You agree to indemnify,
172 | defend, and hold each Contributor harmless for any liability
173 | incurred by, or claims asserted against, such Contributor by reason
174 | of your accepting any such warranty or additional liability.
175 |
176 | END OF TERMS AND CONDITIONS
177 |
178 | APPENDIX: How to apply the Apache License to your work.
179 |
180 | To apply the Apache License to your work, attach the following
181 | boilerplate notice, with the fields enclosed by brackets "{}"
182 | replaced with your own identifying information. (Don't include
183 | the brackets!) The text should be enclosed in the appropriate
184 | comment syntax for the file format. We also recommend that a
185 | file or class name and description of purpose be included on the
186 | same "printed page" as the copyright notice for easier
187 | identification within third-party archives.
188 |
189 | Copyright : 2019 ESRI
190 |
191 | Licensed under the Apache License, Version 2.0 (the "License");
192 | you may not use this file except in compliance with the License.
193 | You may obtain a copy of the License at
194 |
195 | http://www.apache.org/licenses/LICENSE-2.0
196 |
197 | Unless required by applicable law or agreed to in writing, software
198 | distributed under the License is distributed on an "AS IS" BASIS,
199 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200 | See the License for the specific language governing permissions and
201 | limitations under the License.
202 |
203 |
--------------------------------------------------------------------------------
/Widgets/DeprecatedWAB2D/OrientedImagery/css/fonts/launchpad-icons.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
76 |
--------------------------------------------------------------------------------
/Widgets/WebAppBuilder3D/OrientedImagery3D/css/fonts/launchpad-icons.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
76 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # Oriented Imagery Classic - Development Resources
2 |
3 | These resources relate to Oriented Imagery Classic, which is a community-supported, add-in solution for managing and visualizing imagery as a part of your GIS. The oriented imagery capability is being integrated into the ArcGIS system; read [this blog](https://www.esri.com/arcgis-blog/products/arcgis/imagery/introducing-oriented-imagery/) to learn more.
4 |
5 | This repo contains developer resources for Oriented Imagery Classic, including 2D and 3D Web AppBuilder widgets, the Experience Builder widget, a description of the Oriented Imagery Classic API, and a schema for oriented imagery catalogs (OICs). Learn more about [Oriented Imagery Classic](https://doc.arcgis.com/en/imagery/workflows/resources/managing-and-visualizing-oriented-imagery.htm) on the Imagery Workflows site.
6 |
7 | Use the Oriented Imagery Classic widgets for Web AppBuilder for ArcGIS and Experience Builder to build web apps to explore oriented imagery (imagery not pointing straight down at the ground) from aerial, drone, or terrestrial sensors. App users select an oriented imagery catalog, click a location of interest on the map, then explore any available oblique, street-view, or inspection images that depict the area of interest using the inset viewer. As you pan and zoom in the oriented image, see the camera’s field of view dynamically updated on the map. Check out examples of a [2D app](https://oi1.img.arcgis.com/app/index.html) and a [3D app](https://oi1.img.arcgis.com/app3D/index.html) built with the widgets.
8 |
9 | Also in this repo, find a description of the [Oriented Imagery Classic API](OrientedImagery_API.pdf), which can be used to build custom oriented imagery applications.
10 |
11 | This repo also contains a [description of the oriented imagery catalog (OIC) schema](OrientedImageryCatalog_Schema.pdf) for use in developing your own applications. OIC is the data structure used to manage oriented imagery in ArcGIS. The OIC is defined as a JSON that references a point-based feature service that defines the camera location, orientation, and image metadata.
12 |
13 | To view OICs in ArcGIS Pro, download the [Oriented Imagery Classic add-in for ArcGIS Pro](https://esriurl.com/OrientedImageryAddIn). To create and manage your own OICs, download the Oriented Imagery Classic Management Tools from [ArcGIS Online](https://www.arcgis.com/home/item.html?id=36ee0bbedca64a5a8b68d7c69ab51728).
14 |
15 | 
16 |
17 |
18 | ## What's new in Oriented Imagery Classic developer resources
19 |
20 | ### Version 2.11 (release June 2022)
21 |
22 | * What’s new in Oriented Imagery widget for Experience Builder:
23 | - Fixed the issue with Oriented Imagery graphics not displayed in the correct order.
24 | - Updated the max canvas area on HTML canvas to work with iOS devices.
25 | - Added support for the query module in JS API 4.24 (QueryTask deprecated).
26 | - Support for GeoJSON added to the OI widget.
27 | - Added support for DefaultImagery and DefaultSearchLocation parameters.
28 | - Updated the widget code and removed the hard coded MaxDistance value.
29 |
30 |
31 | * What’s new in Oriented Imagery API:
32 | - Updated the max canvas area on HTML canvas to work with iOS devices.
33 | - Added support for GeoJSON in the OIC JSON.
34 | - Updated OI API to accomodate the deprecation of tasks/GeometryService in JS API 4.24.
35 | - Fixed the issue with copyright message appearing over the video slider in video OICs.
36 | - Current coverage is updated with change in video slider (viewer).
37 | - Fixed the issue for current coverage not updating in video OICs.
38 | - Updated the max canvas area on HTML canvas to work with iOS devices.
39 | - Folder structure for t9n (translation) strings updated.
40 | - Added support for the query module in JS API 4.24 (QueryTask deprecated).
41 | - Oriented Imagery catalogs now supports multiple authentication types for Enterprise portals.
42 | - API now suports depth image for all image types.
43 | - Updated the accuracy of editable features in the OIC viewer.
44 | - Editing workflow (editable features) now works in the Add-in.
45 | - The navigation tool refreshes upon selecting a space with no image.
46 | - Viewer.html file deprecated from the API folder.
47 |
48 | ### Version 2.10 (release March 2022)
49 |
50 | * What’s new in Oriented Imagery Webapp:
51 | - Added support for DefaultImage and DefaultSearchLocation parameter in the OIC.
52 | - Upgraded the Oriented Imagery graphics to display the correct order on the map.
53 | - Fixed the issue with the distance tool in the overlay tab for editable feature layer.
54 | - Fixed the measurement tool.
55 | - Updated the Image Gallery scroll bar.
56 | - Fixed the App widget used to view selected features in image.
57 | - Updated the distance tool in the overlay tab.
58 |
59 |
60 | * What’s new in Oriented Imagery API:
61 | - Added support for 360 degree images.
62 | - Enhanced the accuracy of the current coverage (image footprint).
63 | - CamOri attribute extended to support local tangent plane (ENU) cordinate system.
64 | - Updated navigation tool.
65 | - Added support for RGB based MRF imagery.
66 | - Added support to display thumbnails for feature attachments.
67 | - Updated superimpose view in the standard viewer.
68 | - Added support for mrf DEM.
69 | - Updated Autoswitch mode in the standard viewer.
70 | - Enhanced ground to image accuracy.
71 | - Added sharpness slider in the OI viewer.
72 | - Added Coverage Percent parameter to OIC json.
73 | - Updated the TimeUnit filter and the TimeSelector tool.
74 | - Integrated Mapillary API v4.0 with Oriented Imagery API.
75 | - Enhanced the accuracy of overlay vectors.
76 | - Updated the API to work in ArcGIS Enterprise.
77 | - Added support for ImageSuffix, DepthImageSuffix, DEMSuffix in the API.
78 | - Updated the logic for showing camera locations (overlay) in the viewer.
79 | - Added support to create OICs with XLS frametables.
80 | - Updated best image selected in 3D environment.
81 | - Removed corsEnabledServer from OI API as it is deprecated in 4.9 JS API version.
82 | - Add a button to enable/disable image depth slider in superimpose view.
83 | - Added support to get presigned URL for images on secured bucket.
84 | - Added a new mode of navigation from one image to another based on SortOrder attribute.
85 | - Other bug fixes.
86 |
87 | ### Version 2.9 (release December 2021)
88 |
89 | * What’s new in Oriented Imagery Webapp:
90 | - Overlaid line features issue has been fixed.
91 | - Face lines issue in superimpose view for cube images has been fixed.
92 | - All QuickCapture issues for item URL in OIC have been fixed.
93 |
94 | * What’s new in Oriented Imagery API:
95 | - TIF images are read in image space using RasterX.
96 | - Appropriate error messages based on HTTP status code are displayed.
97 | - Right Z values are computed if world elevation is provided as the DEM source.
98 | - New enhancements related video have been added.
99 | - Fixed the issue where images with large sizes were not being displayed in the viewer.
100 |
101 |
102 | ### Version 2.7 (release July 2021)
103 |
104 | * What’s new in Oriented Imagery API:
105 | - Use of item popup in image attribute viewer
106 | - Tiff / COG file support.
107 | - Use of feature service item URL in OIC.
108 | - Support to access OICs from IWA enabled portals.
109 | - 360 degree video bug fix.
110 | - Other bug fixes.
111 |
112 | * What’s new in Oriented Imagery 3D widget for Web AppBuilder For ArcGIS:
113 | - Updated Oriented Imagery API to v2.7
114 | - Several general fixes and performance and stability improvements.
115 |
116 | * What’s new in Oriented Imagery widget for Experience Builder:
117 | - Updated Oriented Imagery API to v2.7
118 | - Bug fixes
119 |
120 | ### Version 2.6 (release April 2021)
121 |
122 | * What’s new in Oriented Imagery API:
123 | - Added Time selector to filter images based on days, weeks, months, and years.
124 | - Added support for 360 video
125 | - Added superimpose view to superimpose imagery into maps on top of 3D Data layers and vector layers
126 | - Added image attributes tool to display attributes for the current image
127 | - Added support to adjust the size of navigation tool
128 | - Updated best image computation based on imagery type
129 | - Updated UI/UX of the viewer
130 | - Several general fixes and performance and stability improvements.
131 | * What’s new in Oriented Imagery 3D widget for Web AppBuilder For ArcGIS:
132 | - Updated UI/UX of the widget
133 | - Updated Oriented Imagery API to v2.6
134 | - Several general fixes and performance and stability improvements.
135 |
136 | ### Version 2.4 (release July 2020)
137 |
138 | * Web AppBuilder widgets using the ArcGIS API for JavaScript 4.x have been released. The 3.x versions are moved to mature support.
139 | * The Oriented Imagery API now supports:
140 | - Two different navigation tools: basic and advance.
141 | - You can now set the distance of features during editing for increased accuracy.
142 | - Point features now support labeling mode, where you can draw rectangles around objects on the image for point feature layers.
143 | * The sample web apps and 3D widget have the following enhancements:
144 | - Users can now add OICs from their ArcGIS Enterprise Portal account.
145 | - OAuth support for logging in.
146 |
147 | ### Version 2.3 (release May 2020)
148 |
149 | * Web AppBuilder widgets using the ArcGIS API for JavaScript 4.x have been released. The 3.x versions are moved to mature support.
150 | * The Oriented Imagery API now supports attaching bubble and panoramic imagery to a feature service.
151 | * The sample web apps have two enhancements:
152 | - App users can now add OICs from My Organization's Groups in ArcGIS Online.
153 | - The Image Exposure points layer is grayed out if no exposure points are found.
154 |
155 | ### Version 2.2 (release March 2020)
156 |
157 | * When digitizing in the web app, the user will now be prompted to add ImgUrn and ImgGeom fields to the feature service if they're not already there.
158 | * The Oriented Imagery API now includes the following:
159 | - Support for using a feature service with attachments as your data source.
160 | - Option to digitize features with measurement ON.
161 | - New navigation tool.
162 | - If the OIC includes an acquisition date, the date is displayed in the viewer.
163 | - Bug fixes for auto switch mode and for when near distance = 0.
164 |
165 | ### Version 2.1 (release January 2020)
166 |
167 | * [Custom Oriented Imagery Types](https://github.com/Esri/oriented-imagery/tree/master/CustomTypes) are now available for download.
168 | * Fieldnames are now case insensitive in the Oriented Imagery API.
169 | * In the API, measurement tools automatically turn on and off based on accuracy and depth info.
170 |
171 | ## Working with the widgets
172 |
173 | ### Widget features
174 |
175 | * Build custom Oriented Imagery apps with no programming required
176 | * Support for standard frame, panoramic, or omnidirectional cameras (among others)
177 | * A built-in viewer for non-nadir imagery, or the option to integrate a custom imagery viewer
178 | * Spatial navigation tools designed to work with non-nadir imagery
179 | * Querying based on current view and filters (including time)
180 | * Image enhancement options
181 | * Linear and height measurement tools – where suitable ancillary data available
182 | * Synchronized display of view extent
183 | * Option to display extents and images similar to your current selection
184 | * API to help 3rd party developers
185 |
186 |
187 | ### Instructions for using the Web AppBuilder 3D widget
188 |
189 | 1. Download and unzip the Oriented Imagery repo ZIP file
190 | 2. Download and install [Web AppBuilder for ArcGIS (Developer Edition)](https://developers.arcgis.com/web-appbuilder/guide/getstarted.htm)
191 | 3. Follow the instructions for [custom widget deployment](https://developers.arcgis.com/web-appbuilder/guide/deploy-custom-widget-and-theme.htm)
192 |
193 | ### Instructions for using the Experience Builder widget
194 |
195 | 1. Download and unzip the Oriented Imagery repo ZIP file
196 | 2. Download and install [ArcGIS Experience Builder (Developer Edition)](https://developers.arcgis.com/experience-builder/guide/)
197 |
198 |
199 | ### Requirements
200 |
201 | * ArcGIS Online or ArcGIS Enterprise portal account
202 | * Web AppBuilder for ArcGIS 2.15+ Developer Edition
203 | * ArcGIS Experience Builder 1.3+ Developer Edition
204 |
205 | ### Resources
206 |
207 | * [Web App Builder for ArcGIS (Developer Edition)](https://developers.arcgis.com/web-appbuilder/)
208 | * [ArcGIS Experience Builder (Developer Edition)](https://developers.arcgis.com/experience-builder/)
209 | * Examples of a [2D app](https://oi1.img.arcgis.com/app/index.html) and a [3D app](https://oi1.img.arcgis.com/app3D/index.html) built with Oriented Imagery widgets
210 |
211 | ## Issues
212 |
213 | Find a bug or want to request a new feature? Please let us know by submitting an issue.
214 |
215 | ## Contributing
216 |
217 | Esri welcomes contributions from anyone and everyone. Please see our [guidelines for contributing](https://github.com/esri/contributing).
218 |
219 | ## Licensing
220 | Copyright 2019 Esri
221 |
222 | Licensed under the Apache License, Version 2.0 (the "License");
223 | you may not use this file except in compliance with the License.
224 | You may obtain a copy of the License at
225 |
226 | http://www.apache.org/licenses/LICENSE-2.0
227 |
228 | Unless required by applicable law or agreed to in writing, software
229 | distributed under the License is distributed on an "AS IS" BASIS,
230 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
231 | See the License for the specific language governing permissions and
232 | limitations under the License.
233 |
234 | A copy of the license is available in the repository's [License](LICENSE?raw=true) file.
235 |
236 |
237 |
238 |
--------------------------------------------------------------------------------
/CustomTypes/Drone2Map.py:
--------------------------------------------------------------------------------
1 | #------------------------------------------------------------------------------
2 | # Copyright 2018 Esri
3 | # Licensed under the Apache License, Version 2.0 (the "License");
4 | # you may not use this file except in compliance with the License.
5 | # You may obtain a copy of the License at
6 | #
7 | # http://www.apache.org/licenses/LICENSE-2.0
8 | #
9 | # Unless required by applicable law or agreed to in writing, software
10 | # distributed under the License is distributed on an "AS IS" BASIS,
11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | # See the License for the specific language governing permissions and
13 | # limitations under the License.
14 | #------------------------------------------------------------------------------
15 | # Name: Drone2Map.py
16 | # Description: This is a custom OIC type.
17 | # Version: 2.0
18 | # Date Created : 20181104
19 | # Date updated : 20190704
20 | # Requirements: ArcGIS Pro 2.2
21 | # Author: Esri Imagery Workflows team
22 | #------------------------------------------------------------------------------
23 |
24 | import arcpy
25 | import os
26 | import sys
27 | import json
28 | import re
29 | import orientedimagerytools as oitools
30 | from numpy.linalg import inv
31 | import numpy as np
32 | from datetime import datetime
33 | import multiprocessing
34 | import concurrent.futures
35 | from concurrent.futures import ProcessPoolExecutor
36 | import math
37 | multiprocessing.set_executable(os.path.join(os.path.dirname(sys.executable), r"Python\envs\arcgispro-py3\pythonw.exe"))
38 |
39 | def __init__(self, nametype):
40 | self._name = nametype
41 |
42 | def main(oicPath, oicParas, inputParams, defValues, log=None):
43 | try:
44 | outPathSRS = arcpy.Describe(oicPath).spatialReference
45 | rasterPath = oicParas['RasterPath']
46 | cameraFile = oicParas['Drone2Map Camera File']
47 | imageDetailsFile = oicParas['Drone2Map Image List']
48 | imageryType = oicParas['Imagery Type']
49 | inputwkid = oicParas['Input Images SRS (WKID)']
50 | terrainAvgElev = float(oicParas['Terrain Average Elevation']) if oicParas['Terrain Average Elevation'] else 0
51 |
52 | calculateOrientation = True #if oicParas['Calculate Orientation(yes/no)'].strip().lower() == 'yes' else False
53 | importExifDrone2Map(oicPath, imageDetailsFile, outPathSRS, inputwkid, imageryType, rasterPath, cameraFile, calculateOrientation, defValues, log,terrainAvgElev)
54 | oicFilePath = getOicFilePath(oicPath)
55 | updateFilters(oicFilePath, imageryType)
56 | return("Successfully added list of images.")
57 | except Exception as e:
58 | if log:
59 | log.Message("Error in adding images. {}".format(str(e)), log.const_critical_text)
60 | return ("Error in adding images." + str(e))
61 |
62 | def getOicFilePath(fcPath):
63 | oicParts = fcPath.split(os.sep)
64 | oicProjectPath = os.sep.join(oicParts[:-2])
65 | grpLayerName = '_'.join(oicParts[-1].split('_')[:-1])
66 | oicFilePath = os.path.join(oicProjectPath, '{}.oic'.format(grpLayerName))
67 | return oicFilePath
68 |
69 | def importExifDrone2Map(inputTable, imageDetailsFile, outsrs, inwkid, imageryType, rasterPath, cameraFile, calculateOrientation, valueDefaults, log,terrainAvgElev):
70 | imgDetails = []
71 | with open(imageDetailsFile) as imgFile:
72 | lines = imgFile.readlines()
73 | lines = lines[1:]
74 | for line in lines:
75 | imgParams = line.split(' ')
76 | imgDict = {
77 | 'PerspectiveX': imgParams[1].strip(),
78 | 'PerspectiveY': imgParams[2].strip(),
79 | 'PerspectiveZ': imgParams[3].strip(),
80 | 'Omega': imgParams[4].strip(),
81 | 'Phi': imgParams[5].strip(),
82 | 'Kappa': imgParams[6].strip()
83 |
84 | }
85 | if rasterPath.startswith('http'):
86 | imgDict.update({'imagePath': '/'.join([rasterPath.strip('/'), imgParams[0]])})
87 | imgDetails.append(imgDict)
88 | else:
89 | imgDict.update({'imagePath': os.path.join(rasterPath, imgParams[0])})
90 | imgDetails.append(imgDict)
91 | importFields = ['SHAPE@','Name','Image','AcquisitionDate','CamHeading','CamPitch','CamRoll','HFOV','VFOV','AvgHtAG','FarDist','NearDist','OIType','SortOrder','CamOffset','Accuracy','ImgPyramids','DepthImg','CamOri','ImgRot']
92 | fcCursor = arcpy.da.InsertCursor(inputTable,importFields)
93 | imgCount = len(imgDetails)
94 | cntrCut = round((imgCount * 10) / 100)
95 | cntr = -1
96 | imgCntr = 0
97 | imgList = [imgDict['imagePath'] for imgDict in imgDetails]
98 | cameraParams = getDrone2MapCamParams(cameraFile, log)
99 |
100 | anImageDict = oitools.getImageInfo(imgList[0])
101 | exif_data = anImageDict['exif_data']
102 | errMsg = anImageDict['error']
103 |
104 | if exif_data == {}:
105 | aDateTime = None
106 | else:
107 | aDateTime = oitools._get_if_exist(exif_data, 'EXIF_DateTime')
108 | if aDateTime is not None:
109 | aDateTime = oitools.returnDate(aDateTime)
110 | else:
111 | aDateTime = oitools._get_if_exist(exif_data, 'EXIF_DateTimeOriginal')
112 | if aDateTime is not None:
113 | aDateTime = oitools.returnDate(aDateTime)
114 |
115 | for img in imgList:
116 |
117 |
118 | cntr = cntr + 1
119 | imgCntr = imgCntr + 1
120 |
121 |
122 | imgDict = [d for d in imgDetails if d['imagePath'] == img][0]
123 | xCoord = imgDict['PerspectiveX']
124 | yCoord = imgDict['PerspectiveY']
125 | zValue = imgDict['PerspectiveZ']
126 |
127 | if yCoord == xCoord == None:
128 | arcpy.AddWarning("Could not extract coordinate info to add image: "+os.path.basename(img))
129 | log.Message("Could not extract coordinate info to add image: {}".format(os.path.basename(img)), log.const_warning_text)
130 | continue
131 | else:
132 | if cntr == cntrCut:
133 | arcpy.AddMessage('Extracted Data for '+str(imgCntr)+' of '+str(imgCount))
134 | cntr = 0
135 |
136 | aValueList = []
137 |
138 | aPoint = arcpy.Point()
139 | aPoint.X = xCoord
140 | aPoint.Y = yCoord
141 |
142 | inSRS = arcpy.SpatialReference(int(inwkid))
143 | #inSRS.factoryCode = 4326
144 | aPtGeometry = arcpy.PointGeometry(aPoint,inSRS).projectAs(outsrs)
145 | aPoint = aPtGeometry.centroid
146 |
147 | aValueList.append(aPoint)
148 |
149 | if img.startswith('http'):
150 | ossep = '/'
151 | else:
152 | ossep = os.sep
153 |
154 | aNameList = img.split(ossep)
155 | if len(aNameList) >= 2:
156 | aCount = len(aNameList)
157 | shortName = aNameList[aCount-2]+ossep+aNameList[aCount-1]
158 | aName, anExt = os.path.splitext(shortName)
159 | aValueList.append(aName)
160 | else:
161 | aValueList.append(None)
162 |
163 | aValueList.append(img)
164 |
165 |
166 | aValueList.append(aDateTime)
167 |
168 | # below method returns a dictionary of default parameters calculated from the image source
169 | #sourceDefaults = oitools.getDefaultValuesFromSource(exif_data)
170 | # below method retuns the default parameters to be filled in the table. Computed from the defualt parameter values entered by the user and the corresponding values from the source.
171 |
172 | omegaVal = float(imgDict['Omega']) * (math.pi/180)
173 | phiVal = float(imgDict['Phi']) * (math.pi / 180)
174 | kappaVal = float (imgDict['Kappa']) * (math.pi / 180)
175 |
176 | camHeading = (math.atan2(-1 * (math.sin(phiVal)), (-1 * (-math.sin(omegaVal)*math.cos(phiVal)))) * 180) / math.pi
177 | if camHeading < 0:
178 | camHeading = camHeading + 360
179 |
180 | camPitch = math.acos(math.cos(omegaVal)*math.cos(phiVal)) * 180 / math.pi
181 | camRoll = (math.atan2((-1 * ((math.sin(omegaVal)*math.sin(kappaVal)) - (math.cos(omegaVal)*math.sin(phiVal)* math.cos(kappaVal)))), (math.sin(omegaVal)*math.cos(kappaVal)) + (math.cos(omegaVal)* math.sin(phiVal)* math.sin(kappaVal))) * 180) / math.pi
182 |
183 |
184 | HFOV = 2 * math.atan(cameraParams['sensorWidth']/(2 * cameraParams['FocalLength'] ))
185 | VFOV = 2 * math.atan(cameraParams['sensorHeight']/(2 * cameraParams['FocalLength'] ))
186 |
187 | HFOV = math.degrees(HFOV)
188 | VFOV = math.degrees(VFOV)
189 |
190 | AvgHtAG = imgDict['PerspectiveZ']
191 | AvgHtAG = float(AvgHtAG)
192 | AvgHtAG = abs(AvgHtAG - terrainAvgElev)
193 |
194 | if camPitch > 0 and camPitch < 90 and AvgHtAG != '' and AvgHtAG is not None:
195 | nearDistance = AvgHtAG * math.tan((camPitch - (VFOV/2)) * math.pi / 180)
196 | elif camPitch == 0 and AvgHtAG != '' and AvgHtAG is not None:
197 | nearDistance = -1 * AvgHtAG * math.sin(VFOV * math.pi / 360)
198 | else:
199 | nearDistance = None
200 | #nearDistance = valueDefaults['NearDist']
201 |
202 |
203 | if camPitch > 0 and camPitch < 90 and AvgHtAG != '' and AvgHtAG is not None:
204 | farDistance = AvgHtAG * math.tan((camPitch + (VFOV/2))* math.pi / 180)
205 | if farDistance < 0:
206 | farDistance = abs(farDistance)
207 | elif camPitch == 0 and AvgHtAG != '' and AvgHtAG is not None:
208 | farDistance = AvgHtAG * math.sin(VFOV * math.pi / 360)
209 | if farDistance < 0:
210 | farDistance = abs(farDistance)
211 | else:
212 | farDistance = None
213 | #farDistance = valueDefaults['FarDist']
214 |
215 |
216 | OIType = valueDefaults['OIType'][0]
217 | aValueList.extend([camHeading, camPitch,
218 | camRoll, HFOV,
219 | VFOV, AvgHtAG,
220 | farDistance, nearDistance,
221 | OIType])
222 | order = 0
223 | aValueList.append(order)
224 | camOffset = None
225 | aValueList.append(camOffset)
226 | accuracy = None
227 | aValueList.append(accuracy)
228 | imgPyramids = None
229 | aValueList.append(imgPyramids)
230 | depthImg = None
231 | aValueList.append(depthImg)
232 |
233 | inverseAffineMatrix = np.array([[cameraParams['A1'], cameraParams['A2'], cameraParams['A0']],
234 | [cameraParams['B1'], cameraParams['B2'], cameraParams['B0']],
235 | [0, 0, 1]], dtype='float')
236 |
237 | camOri = '|'.join(['2', str(inwkid), str(inwkid), imgDict['PerspectiveX'], imgDict['PerspectiveY'],
238 | str(imgDict['PerspectiveZ']), str(imgDict['Omega']), str(imgDict['Phi']), str(imgDict['Kappa']),
239 | str(round(float(inverseAffineMatrix[0][2]), 6)), str(round(float(inverseAffineMatrix[0][0]), 6)),
240 | str(round(float(inverseAffineMatrix[0][1]), 6)), str(round(float(inverseAffineMatrix[1][2]), 6)),
241 | str(round(float(inverseAffineMatrix[1][0]), 6)), str(round(float(inverseAffineMatrix[1][1]), 6)),
242 | str(cameraParams['FocalLength'] * 1000), str(cameraParams['PrincipalX']), str(cameraParams['PrincipalY']),
243 | str(cameraParams['K1']), str(cameraParams['K2']), str(cameraParams['K3'])])
244 |
245 | aValueList.append(camOri)
246 | imgRot = 0
247 | aValueList.append(imgRot)
248 | fcCursor.insertRow(aValueList)
249 |
250 | log.Message('Inserted row for: {}'.format(img), log.const_general_text)
251 |
252 | del fcCursor
253 |
254 | def getDrone2MapCamParams(camFile, log):
255 | try:
256 | with open(camFile) as f:
257 | allCamLines = f.readlines()
258 | except:
259 | log.Message('Error in reading camera file.', log.const_critical_text)
260 | try:
261 | camHeadings = [line for line in allCamLines if 'camera_calibration_file' in line.lower()]
262 | if len(camHeadings) >= 2:
263 | camLines = allCamLines[allCamLines.index(camHeadings[0]): allCamLines.index(camHeadings[1])]
264 | else:
265 | camLines = allCamLines
266 | for i, line in enumerate(camLines):
267 | if 'FOCAL' in line:
268 | focalLength = line.strip().split(' ')[1].strip()
269 | elif line.strip() == '#Principal Point Offset xpoff ypoff in mm':
270 | principalX = camLines[i+1].strip().split(' ')[1].strip()
271 | principalY = camLines[i+2].strip().split(' ')[1].strip()
272 | elif line.strip() == '#Symmetrical Lens Distortion Odd-order Poly Coeffs:K0,K1,K2,K3':
273 | k1, k2, k3 = camLines[i+1].strip().split(' ')[-3:]
274 | elif '#Focal Length' in line:
275 | sensorParams = re.findall('[\d]+[\.]?[\d]*', line)
276 | if len(sensorParams) >= 1:
277 | sensorWidth = float(sensorParams[0].strip('.'))
278 | sensorHeight = float(sensorParams[1].strip('.'))
279 | elif '#Image size' in line:
280 | imageParams = re.findall('[\d]+[\.]?[\d]*', line)
281 | if len(imageParams) >= 2:
282 | imageWidth = float(imageParams[0].strip('.'))
283 | imageHeight = float(imageParams[1].strip('.'))
284 |
285 | pixelSize = sensorWidth * 1000 / imageWidth
286 | a0 = ((imageWidth/2) - 0.5) #* pixelSize
287 | a1 = 1/pixelSize
288 | a2 = 0
289 | b0 = ((imageHeight/2) - 0.5) #* pixelSize
290 | b1 = 0
291 | b2 = -1/pixelSize
292 | return {
293 | 'A0': a0,
294 | 'A1': a1,
295 | 'A2': a2,
296 | 'B0': b0,
297 | 'B1': b1,
298 | 'B2': b2,
299 | 'FocalLength': float(focalLength),
300 | 'PrincipalX': float(principalX),
301 | 'PrincipalY': float(principalY),
302 | 'K1': float(k1),
303 | 'K2': float(k2),
304 | 'K3': float(k3),
305 | 'sensorWidth': sensorWidth,
306 | 'sensorHeight': sensorHeight,
307 |
308 | }
309 | except Exception as e:
310 | log.Message('Error in reading camera parameters.{}'.format(str(e)), log.const_critical_text)
311 |
312 | def updateFilters(oicPath, imageryType):
313 | with open(oicPath) as oicFile:
314 | oicDict = json.load(oicFile)
315 | if not oicDict['properties'].get('Filters'):
316 | oicDict['properties']['Filters'] = {"All": "1=1"}
317 | if imageryType.lower() == 'oblique':
318 | if not oicDict['properties']['Filters'].get('Oblique'):
319 | oicDict['properties']['Filters']['Oblique'] = "Type = 'Oblique'"
320 | elif imageryType.lower() == 'nadir':
321 | if not oicDict['properties']['Filters'].get('Nadir'):
322 | oicDict['properties']['Filters']['Nadir'] = "Type = 'Nadir'"
323 | with open(oicPath, 'w') as oicFile:
324 | json.dump(oicDict, oicFile)
--------------------------------------------------------------------------------
/CustomTypes/pictometry.py:
--------------------------------------------------------------------------------
1 | #------------------------------------------------------------------------------
2 | # Copyright 2018 Esri
3 | # Licensed under the Apache License, Version 2.0 (the "License");
4 | # you may not use this file except in compliance with the License.
5 | # You may obtain a copy of the License at
6 | #
7 | # http://www.apache.org/licenses/LICENSE-2.0
8 | #
9 | # Unless required by applicable law or agreed to in writing, software
10 | # distributed under the License is distributed on an "AS IS" BASIS,
11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | # See the License for the specific language governing permissions and
13 | # limitations under the License.
14 | #------------------------------------------------------------------------------
15 | # Name: pictometry.py
16 | # Description: This is an custom OIC type. It ingests data from a shape file containing data and attributes for pictometry data.
17 | # Version: 1.1.2
18 | # Date Created : 20181126
19 | # Date updated : 20190523
20 | # Requirements: ArcGIS Pro 2.2
21 | # Author: Esri Imagery Workflows team
22 | #------------------------------------------------------------------------------
23 |
24 | import arcpy
25 | import os
26 |
27 | #class pictometry:
28 | def __init__(self, nametype):
29 | self._name = nametype
30 |
31 |
32 | def main(oicpath,oicparas,inputParams,defValues, log=None):
33 |
34 | try:
35 | # Get the Spatial reference to the input OIC.
36 | outPathSRS = arcpy.Describe(oicpath).spatialReference
37 | count = int(arcpy.GetCount_management(oicpath)[0])
38 | if not count:
39 | maxObjectID = 0
40 | else:
41 | maxObjectID = arcpy.da.SearchCursor(oicpath, "OBJECTID", sql_clause = (None, "ORDER BY OBJECTID DESC")).next()[0]
42 |
43 | inPath = oicparas['InputFile']
44 | imgPath = oicparas['PathToImage']
45 | if log:
46 | log.Message("Input file: {}".format(inPath), log.const_general_text)
47 | log.Message("Input folder: {}".format(imgPath), log.const_general_text)
48 | ps_microns = oicparas['PixelSize(Microns)']
49 |
50 | avght_meters = oicparas['AverageTerrainHeight(Meters)']
51 |
52 | h_wkid = oicparas['HorizontalWKID']
53 | v_wkid = oicparas['VeritcalWKID']
54 |
55 | inChkFldsList = [
56 | 'ImageName',
57 | 'ShotDate',
58 | 'ImageRows',
59 | 'ImageCols',
60 | 'PPx',
61 | 'PPy',
62 | 'CameraX',
63 | 'CameraY',
64 | 'CameraZ',
65 | 'Omega',
66 | 'Phi',
67 | 'Kappa',
68 | 'BalancedFL',
69 | 'BalancedK0',
70 | 'BalancedK1',
71 | 'BalancedK2',
72 | 'BalancedK3',
73 | 'Units']
74 |
75 | missingFldList = []
76 | for mFldName in inChkFldsList:
77 | mFldList = arcpy.ListFields(inPath,mFldName)
78 | if len(mFldList) == 0:
79 | missingFldList.append(mFldName)
80 |
81 | if len(missingFldList) >=1:
82 | errorMsg = 'Error: The following fields were required and could not be found in the input table:'+'\n'+(','.join(missingFldList))
83 | log.Message('Error: The following fields were required and could not be found in the input table:'+'\n'+(','.join(missingFldList)), log.const_critical_text)
84 | return(errorMsg)
85 |
86 | #Get the SRS
87 | #start, ext = os.path.splitext(inPath)
88 | inFileDesc = arcpy.Describe(inPath)
89 | if hasattr(inFileDesc, "spatialReference"):
90 | inPathSRS = arcpy.Describe(inPath).spatialReference
91 | else:
92 | inPathSRS = arcpy.SpatialReference(int(h_wkid))
93 |
94 |
95 | #build a list of input fields
96 | ## stringfields = arcpy.ListFields(inPath)
97 | ## inputFields = []
98 | ## for fld in stringfields:
99 | ## if ('FID' in fld.name) or ('Shape' in fld.name):
100 | ## pass
101 | ## else:
102 | ## inputFields.append(fld.name)
103 |
104 | #Add missing fiedls to the OIC Table.
105 | arcpy.AddMessage("Adding Fields:")
106 | log.Message("Adding Fields:", log.const_general_text)
107 | #for infldName in inChkFldsList:
108 |
109 | for infld in arcpy.ListFields(inPath):
110 |
111 | if ('FID' in infld.name) or ('Shape' in infld.name):
112 | pass
113 | else:
114 | chkFldName = infld.name
115 | fieldChkList = arcpy.ListFields(oicpath,chkFldName)
116 | try:
117 | if len(fieldChkList) == 0:
118 | if chkFldName in inChkFldsList:
119 | arcpy.AddField_management(oicpath, infld.name, infld.type, infld.precision, infld.scale, infld.length, infld.aliasName)
120 | log.Message('Adding field {}'.format(infld.name), log.const_general_text)
121 | else:
122 | arcpy.AddMessage( "The field name: " + infld.name + " already exists.")
123 | log.Message('The field name: {} already exists.'.format(infld.name), log.const_general_text)
124 | except:
125 | log.Message('Could not add field {}'.format(infld.name), log.const_general_text)
126 | continue
127 |
128 | #build the input list of output fields.
129 | outFldList = arcpy.ListFields(oicpath)
130 | outFldNameList = []
131 | for outfld in outFldList:
132 | if ('OBJECTID' in outfld.name) or ('Shape' in outfld.name):
133 | pass
134 | else:
135 | outFldNameList.append(outfld.name)
136 |
137 | outFldNameList.insert(0,'SHAPE@')
138 |
139 | inputFields = inChkFldsList[:]
140 |
141 | #if useShapeFld == True:
142 | # inputFields.insert(0,'SHAPE@')
143 |
144 | outCursor = arcpy.da.InsertCursor(oicpath,outFldNameList)
145 | arcpy.AddMessage('Importing Records')
146 | log.Message('Importing Records', log.const_general_text)
147 |
148 | with arcpy.da.SearchCursor(inPath,inputFields) as inCursor:
149 | for inRec in inCursor:
150 | valueList = []
151 | valueList = [None] * (len(outFldNameList))
152 |
153 | ## if useShapeFld == True:
154 | ## aPoint = inRec[0]
155 | ##
156 | ## aPtGeometry = aPoint.projectAs(outPathSRS)
157 | ## aPoint = aPtGeometry.centroid
158 | ## valueList[0] = aPoint
159 | ## else:
160 | #use the shape fields
161 | xindx = inputFields.index('CameraX')
162 | yindx = inputFields.index('CameraY')
163 | inX = inRec[xindx]
164 | inY = inRec[yindx]
165 |
166 | aPoint = arcpy.Point()
167 | aPoint.X = inX
168 | aPoint.Y = inY
169 |
170 | aPtGeometry = arcpy.PointGeometry(aPoint,inPathSRS).projectAs(outPathSRS)
171 | aPoint = aPtGeometry.centroid
172 | valueList[0] = aPoint
173 |
174 | #Set all the default values.
175 | defKeys = defValues.keys()
176 | for aKey in defKeys:
177 | if aKey in outFldNameList:
178 | keyindex = outFldNameList.index(aKey)
179 | tdefVal = defValues[aKey]
180 | try:
181 | if tdefVal is not None:
182 | defValAsNum = float(tdefVal)
183 | valueList[keyindex] = defValAsNum
184 | else:
185 | #Assign default as none, if user defined default value is none.
186 | valueList[keyindex] = None
187 | except Exception as valueError:
188 | #arcpy.AddMessage ('Value Error:'+str(valueError))
189 | valueList[keyindex] = defValues[aKey][0]
190 |
191 | #read and set the values from the input table.
192 | for x in range(0, len(inputFields)):
193 | infldName = inputFields[x]
194 |
195 | if ('OBJECTID' in infldName) or ('Shape' in infldName):
196 | #handle things.
197 | continue
198 | else:
199 | aValue = inRec[x]
200 | #arcpy.AddMessage(infldName)
201 | outindex = outFldNameList.index(infldName)
202 | valueList[outindex] = aValue
203 | #add records
204 | #arcpy.AddMessage(outFldNameList)
205 | #arcpy.AddMessage(valueList)
206 | outCursor.insertRow(valueList)
207 |
208 | del inCursor
209 | del outCursor
210 | del inRec
211 |
212 | #Calculate additional values.
213 | ## chkFldList = arcpy.ListFields(oicpath,'X')
214 | ## if len(chkFldList) == 1:
215 | ## arcpy.AddMessage('Calculating X')
216 | ## arcpy.CalculateField_management(oicpath, 'X',
217 | ## "!SHAPE.CENTROID.X!",
218 | ## "PYTHON3")
219 | ## chkFldList = arcpy.ListFields(oicpath,'Y')
220 | ## if len(chkFldList) == 1:
221 | ## arcpy.AddMessage('Calculating Y')
222 | ## arcpy.CalculateField_management(oicpath, 'Y',
223 | ## "!SHAPE.CENTROID.Y!",
224 | ## "PYTHON3")
225 | arcpy.MakeFeatureLayer_management(oicpath, out_layer='lyr_selection',
226 | where_clause='"OBJECTID" > {}'.format(maxObjectID))
227 | chkFldList = arcpy.ListFields(oicpath,'Point')
228 |
229 | if len(chkFldList) == 1:
230 | arcpy.AddMessage('Calculating Point')
231 | log.Message('Calculating Point', log.const_general_text)
232 | arcpy.CalculateField_management('lyr_selection', 'Point',
233 | "str(!SHAPE.CENTROID.X!)+','+str(!SHAPE.CENTROID.Y!)",
234 | "PYTHON3")
235 |
236 | chkFldList = arcpy.ListFields(oicpath,'ImageName')
237 | if len(chkFldList) == 1:
238 | arcpy.AddMessage("Calculating Name")
239 | log.Message('Calculating Name', log.const_general_text)
240 | arcpy.CalculateField_management('lyr_selection', 'Name',
241 | '!ImageName!',
242 | "PYTHON3")
243 |
244 | chkFldList = arcpy.ListFields(oicpath,'AcquisitionDate')
245 | if len(chkFldList) == 1:
246 | arcpy.AddMessage("Calculating Date")
247 | log.Message('Calculating Date', log.const_general_text)
248 | arcpy.CalculateField_management('lyr_selection', 'AcquisitionDate',
249 | '!ShotDate!',
250 | "PYTHON3")
251 |
252 | chkFldList = arcpy.ListFields(oicpath,'HFOV')
253 | if len(chkFldList) == 1:
254 | arcpy.AddMessage("Calculating HFOV")
255 | log.Message('Calculating HFOV', log.const_general_text)
256 | arcpy.CalculateField_management('lyr_selection', 'HFOV',
257 | 'math.degrees(2 * math.atan(!BalancedFL!/(!ImageCols!*'+ps_microns+'/2000)))',
258 | "PYTHON3")
259 |
260 | chkFldList = arcpy.ListFields(oicpath,'VFOV')
261 | if len(chkFldList) == 1:
262 | arcpy.AddMessage("Calculating VFOV")
263 | log.Message('Calculating VFOV', log.const_general_text)
264 | arcpy.CalculateField_management('lyr_selection', 'VFOV',
265 | 'math.degrees(2 * math.atan(!BalancedFL!/(!ImageRows!*'+ps_microns+'/2000)))',
266 | "PYTHON3")
267 |
268 |
269 | chkFldList = arcpy.ListFields(oicpath,'SRS')
270 | if len(chkFldList) == 1:
271 | arcpy.AddMessage('Calculating SRS')
272 | log.Message('Calculating SRS', log.const_general_text)
273 | arcpy.CalculateField_management('lyr_selection', 'SRS',
274 | outPathSRS.factoryCode,
275 | "PYTHON3")
276 |
277 | chkFldList = arcpy.ListFields(oicpath,'CameraZ')
278 | if len(chkFldList) == 1:
279 | arcpy.AddMessage('Calculating AvgHtag')
280 | log.Message('Calculating AvgHtag', log.const_general_text)
281 | arcpy.CalculateField_management('lyr_selection', 'AvgHtAG',
282 | '!CameraZ! - '+avght_meters,
283 | "PYTHON3")
284 |
285 | chkFldList = arcpy.ListFields(oicpath,'Name')
286 | if len(chkFldList) == 1:
287 | #arcpy.AddMessage('Calculating Name')
288 | arcpy.CalculateField_management('lyr_selection', 'Name',
289 | "!ImageName!",
290 | "PYTHON3")
291 |
292 | chkFldList = arcpy.ListFields(oicpath,'ImageName')
293 | if len(chkFldList) == 1:
294 | #imgPath = os.path.normpath(imgPath)
295 |
296 | imageCodeBlock = "def makeImgPath(imagePath,imgName):\n import os\n fullimageName = os.path.join(imagePath,imgName+'.jpg') \n return (fullimageName)"
297 | arcpy.AddMessage('Calculating Image Path')
298 | log.Message('Calculating Image Path', log.const_general_text)
299 | arcpy.CalculateField_management('lyr_selection', 'Image',
300 | 'makeImgPath(r"'+imgPath+'",!Name!)',
301 | "PYTHON3",imageCodeBlock)
302 |
303 | #if omega phi and kappa values are available use it to caluclate camheading, campitch and camroll.
304 | if outFldNameList.count('Omega') == 1 and outFldNameList.count('Phi') == 1 and outFldNameList.count('Kappa') == 1:
305 |
306 | camHeadingFormula = '(math.atan2(-1 * (math.sin(!Phi! * (math.pi/180))), (-1 * (-math.sin(!Omega! * (math.pi/180))*math.cos(!Phi!)))) * 180) / math.pi'
307 | arcpy.CalculateField_management('lyr_selection', 'CamHeading',
308 | camHeadingFormula,
309 | "PYTHON3")
310 |
311 | camPitchFormula = 'math.acos(math.cos(!Omega! * (math.pi/180))*math.cos(!Phi! * (math.pi/180))) * 180 / math.pi'
312 | arcpy.CalculateField_management('lyr_selection', 'CamPitch',
313 | camPitchFormula,
314 | "PYTHON3")
315 |
316 | camRollFormula = '(math.atan2((-1 * ((math.sin(!Omega! * (math.pi/180))*math.sin(!Kappa! * (math.pi/180))) - (math.cos(!Omega! * (math.pi/180))*math.sin(!Phi! * (math.pi/180))* math.cos(!Kappa! * (math.pi/180))))), (math.sin(!Omega! * (math.pi/180))*math.cos(!Kappa! * (math.pi/180))) + (math.cos(!Omega! * (math.pi/180))* math.sin(!Phi! * (math.pi/180))* math.sin(!Kappa! * (math.pi/180)))) * 180) / math.pi'
317 | arcpy.CalculateField_management('lyr_selection', 'CamRoll',
318 | camRollFormula,
319 | "PYTHON3")
320 |
321 | chkFldList = arcpy.ListFields(oicpath,'FarDist')
322 | if len(chkFldList) == 1:
323 | farDistCodeBlock = "def retAvgHt(VFOV,AvgHtAG,Pitch):\n FarDist = AvgHtAG*math.sin(Pitch+(VFOV/2))\n if FarDist > (AvgHtAG*4.0):\n FarDist=AvgHtAG*4.0\n return (FarDist)"
324 | arcpy.AddMessage('Calculating FarDist')
325 | log.Message('Calculating FarDist', log.const_general_text)
326 | arcpy.CalculateField_management('lyr_selection', 'FarDist',
327 | "retAvgHt(!VFOV!,!AvgHtAG!,!CamPitch!)",
328 | "PYTHON3",farDistCodeBlock)
329 |
330 | chkFldList = arcpy.ListFields(oicpath,'NearDist')
331 | if len(chkFldList) == 1:
332 |
333 | arcpy.AddMessage('Calculating NearDist')
334 | log.Message('Calculating NearDist', log.const_general_text)
335 | arcpy.CalculateField_management('lyr_selection', 'NearDist',
336 | "!AvgHtAG!*math.sin(!CamPitch!-(!VFOV!/2))",
337 | "PYTHON3")
338 |
339 | chkFldList = arcpy.ListFields(oicpath,'CamOri')
340 | if len(chkFldList) == 1:
341 |
342 | camORiExp = "returnCO(+"+h_wkid+","+v_wkid+",!CameraX!,!CameraY!,!CameraZ!,!Omega!,!Phi!,!Kappa!,!ImageCols!,!ImageRows!,"+ps_microns+",!BalancedFL!,!PPx!,!PPy!,!BalancedK0!,!BalancedK1!,!BalancedK2!,!Units!)"
343 | camORICodeBlock = "def returnCO(WKID_H,WKID_V,X,Y,Z,O,P,K,cols,rows,psm,FL,ppx,ppy,K1,K2,K3,units):\n \n if 'feet' in units.lower():\n SC = 0.3048\n else:\n SC = 1 \n Z = Z*SC\n A0 = cols/2\n A1 = 1/psm\n A2 = 0\n B0 = rows/2\n B1 = 0\n B2 = A1\n PPAX = ppx*psm\n PPAY = ppx*psm\n \n camoristr = 'T|'+str(WKID_H)+'|'+str(WKID_V)+'|'+str(X)+'|'+str(Y)+'|'+str(Z)+'|'+str(O)+'|'+str(P)+'|'+str(K)+'|'+str(A0)+'|'+str(A1)+'|'+str(A2)+'|'+str(B0)+'|'+str(B1)+'|'+str(B2)+'|'+str(FL)+'|'+str(PPAX)+'|'+str(PPAY)+'|'+str(K1)+'|'+str(K2)+'|'+str(K3)\n return(camoristr) "
344 |
345 | arcpy.AddMessage('Calculating Camera Orientation Parameters')
346 | log.Message('Calculating Camera Orientation Parameters', log.const_general_text)
347 | arcpy.CalculateField_management('lyr_selection', 'CamOri',
348 | camORiExp,
349 | "PYTHON3",camORICodeBlock)
350 |
351 | arcpy.AddMessage('Cleaning up Oriented Imagery Catalog')
352 | log.Message('Cleaning up Oriented Imagery Catalog', log.const_general_text)
353 | arcpy.DeleteField_management(oicpath, inChkFldsList)
354 |
355 | return ("Completed.")
356 | except Exception as e:
357 | if log:
358 | log.Message("Error in type pictometry. {}".format(str(e)), log.const_critical_text)
359 | return("Error in type pictometry. {}".format(str(e)))
--------------------------------------------------------------------------------
/Widgets/WebAppBuilder3D/OrientedImagery3D/setting/Setting.js:
--------------------------------------------------------------------------------
1 | ///////////////////////////////////////////////////////////////////////////
2 | // Copyright © 2016 Esri. All Rights Reserved.
3 | //
4 | // Licensed under the Apache License Version 2.0 (the "License");
5 | // you may not use this file except in compliance with the License.
6 | // You may obtain a copy of the License at
7 | //
8 | // http://www.apache.org/licenses/LICENSE-2.0
9 | //
10 | // Unless required by applicable law or agreed to in writing, software
11 | // distributed under the License is distributed on an "AS IS" BASIS,
12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | // See the License for the specific language governing permissions and
14 | // limitations under the License.
15 | ///////////////////////////////////////////////////////////////////////////
16 |
17 | define([
18 | 'dojo/_base/declare',
19 | 'jimu/BaseWidgetSetting',
20 | 'dojo/dom',
21 | "dojo/_base/lang",
22 | 'dojo/dom-construct',
23 | 'dojo/dom-style',
24 | "dojo/html",
25 | 'dijit/_WidgetsInTemplateMixin',
26 | "esri/request", "esri/arcgis/Portal",
27 | "dgrid/List",
28 | 'dgrid/Selection',
29 | 'dgrid/Keyboard'
30 | ],
31 | function (
32 | declare,
33 | BaseWidgetSetting,
34 | dom, lang,
35 | domConstruct,
36 | domStyle, html,
37 | _WidgetsInTemplateMixin, esriRequest, arcgisPortal, List, Selection, Keyboard
38 | ) {
39 | return declare([BaseWidgetSetting, _WidgetsInTemplateMixin], {
40 | baseClass: 'jimu-widget-OrientedImagery3D-setting',
41 | arrayList: [],
42 | returnFlag: false,
43 | startup: function () {
44 | this.inherited(arguments);
45 | this.loadingNode = domConstruct.toDom('');
46 | domConstruct.place(this.loadingNode, this.domNode);
47 | this.hideLoading();
48 | this.portalUrl = this.appConfig.portalUrl.charAt(this.appConfig.portalUrl.length - 1) === "/" ? this.appConfig.portalUrl : this.appConfig.portalUrl + "/";
49 | this.createDataGrid();
50 | this.agolContentSelect.on("change", lang.hitch(this, this.populateFolderGroupList));
51 | this.agolFolderList.on("change", lang.hitch(this, this.populateOICList));
52 | this.agolOICList.on("change", lang.hitch(this, this.checkOIC));
53 | this.addBtn.on("click", lang.hitch(this, this.addOIC));
54 | this.deleteBtn.on("click", lang.hitch(this, this.deleteFromList));
55 | this.getOICFromAgol();
56 | this.setConfig(this.config);
57 |
58 | },
59 | createDataGrid: function () {
60 | var newList = declare([List, Selection, Keyboard]);
61 | this.list = new newList({}, this.dataGrid);
62 | // this.list.on('dgrid-select', lang.hitch(this, function (event) {
63 | // this.deleteBtn.set("disabled", false);
64 | // }));
65 | // this.list.on('dgrid-deselect', lang.hitch(this, function (event) {
66 | // if (!this.list.selection) {
67 | // this.deleteBtn.set("disabled", true);
68 | // }
69 | // }));
70 | this.arrayList = [];
71 | this.list.refresh();
72 | this.list.renderArray(this.arrayList);
73 |
74 | },
75 | checkOIC: function (value) {
76 | if (value)
77 | this.addBtn.set("disabled", false);
78 | else
79 | this.addBtn.set("disabled", true);
80 | },
81 | addOIC: function () {
82 | this.showLoading();
83 | var duplicateEntry;
84 | var oicUrl = this.agolOICList.get("value").split("items/")[1];
85 | for (var a in this.arrayList) {
86 | if (this.arrayList[a].itemUrl.indexOf(oicUrl) !== -1) {
87 | duplicateEntry = true;
88 | break;
89 | } else {
90 | duplicateEntry = false;
91 | }
92 | }
93 | if (!duplicateEntry) {
94 | this.addOICItem();
95 | } else {
96 | this.errorNotification(this.nls.notification2);
97 | }
98 | },
99 | addOICItem: function () {
100 | var url = this.agolOICList.get("value");
101 | if (url) {
102 | var request = new esriRequest({
103 | url: url + "/data",
104 | content: {
105 | f: "json"
106 | },
107 | handleAs: "json",
108 | callbackParamName: "callback"
109 | });
110 | request.then(lang.hitch(this, function (oicInfo) {
111 | if (oicInfo && oicInfo.properties) {
112 | this.arrayList[0] = {
113 | title: oicInfo.properties.Name,
114 | serviceUrl: oicInfo.properties.ServiceURL,
115 | overviewUrl: oicInfo.properties.OverviewURL,
116 | itemUrl: this.portalUrl + "home/item.html?id=" + url.split("items/")[1]
117 | };
118 | this.list.refresh();
119 | this.list.renderArray([this.arrayList[this.arrayList.length - 1].title]);
120 | this.deleteBtn.set("disabled", false);
121 |
122 | this.hideLoading();
123 | } else {
124 | this.errorNotification(this.nls.error1);
125 | }
126 |
127 |
128 | }), lang.hitch(this, function () {
129 | this.errorNotification(this.nls.error1);
130 | }));
131 | } else {
132 | this.errorNotification(this.nls.error1);
133 | }
134 | },
135 | getOICFromAgol: function () {
136 | this.showLoading();
137 | var portal = new arcgisPortal.Portal(this.portalUrl);
138 | portal.signIn().then(lang.hitch(this, function (loggedInUser) {
139 | html.set(this.itemNotify, this.nls.notification1);
140 | if (!this.userContentInfo || loggedInUser.id !== this.userContentInfo.userId) {
141 | this.userContentInfo = {
142 | userId: loggedInUser.id,
143 | myFolders: {},
144 | myGroups: {},
145 | user: loggedInUser
146 | };
147 | new esriRequest({
148 | url: loggedInUser.url,
149 | content: {
150 | f: "json"
151 | },
152 | handleAs: "json",
153 | callbackParamName: "callback"
154 | }).then(lang.hitch(this, function (userGroups) {
155 | for (var b = 0; b < userGroups.groups.length; b++) {
156 | this.userContentInfo.myGroups[userGroups.groups[b].title] = {id: userGroups.groups[b].id, items: []};
157 | }
158 | this.getOICFromFolders(loggedInUser);
159 | }), lang.hitch(this, function () {
160 | this.getOICFromFolders(loggedInUser);
161 | }));
162 | } else {
163 | this.errorNotification("");
164 | this.hideLoading();
165 | }
166 | }), lang.hitch(this, function (error) {
167 | this.errorNotification(error.message || this.nls.error2);
168 | this.hideLoading();
169 | }));
170 | },
171 | getOICFromFolders: function (loggedInUser) {
172 | var request = new esriRequest({
173 | url: loggedInUser.userContentUrl,
174 | content: {
175 | f: "json"
176 | },
177 | handleAs: "json",
178 | callbackParamName: "callback"
179 | });
180 | request.then(lang.hitch(this, function (userContent) {
181 | this.userContentInfo.myFolders[userContent.currentFolder || "default"] = {id: null, items: []};
182 | for (var a = 0; a < userContent.items.length; a++) {
183 | if (userContent.items[a].type === "Oriented Imagery Catalog") {
184 | this.userContentInfo.myFolders[userContent.currentFolder || "default"].items.push({name: userContent.items[a].title, url: this.portalUrl + "sharing/rest/content/items/" + userContent.items[a].id});
185 | }
186 | }
187 | for (var a in userContent.folders) {
188 | this.userContentInfo.myFolders[userContent.folders[a].title] = {id: userContent.folders[a].id, items: []};
189 | }
190 | this.populateFolderGroupList(this.agolContentSelect.get("value"));
191 | this.errorNotification("");
192 | }), lang.hitch(this, function (error) {
193 | this.populateFolderGroupList(this.agolContentSelect.get("value"));
194 | this.errorNotification(error.mesage || this.nls.error1);
195 | }));
196 | },
197 | populateFolderGroupList: function (value) {
198 | if (value === "content") {
199 | var items = Object.keys(this.userContentInfo.myFolders);
200 | this.folderGroupLabel.innerHTML = this.nls.folder + ": ";
201 | } else {
202 | var items = Object.keys(this.userContentInfo.myGroups);
203 | this.folderGroupLabel.innerHTML = this.nls.group + ": ";
204 | }
205 | items.sort(function (a, b) {
206 | a = a.toLowerCase().split(" ")[0];
207 | b = b.toLowerCase().split(" ")[0];
208 | if (a < b) {
209 | return -1;
210 | }
211 | if (a > b) {
212 | return 1;
213 | }
214 | return 0;
215 | });
216 | this.agolFolderList.removeOption(this.agolFolderList.getOptions());
217 | this.agolFolderList.addOption({label: this.nls.select, value: ""});
218 | for (var a in items) {
219 | this.agolFolderList.addOption({label: items[a], value: items[a]});
220 | }
221 | this.agolOICList.removeOption(this.agolOICList.getOptions());
222 | this.agolOICList.addOption({label: this.nls.select, value: ""});
223 | this.addBtn.set("disabled", true);
224 | },
225 | populateOICList: function (value) {
226 | this.agolOICList.removeOption(this.agolOICList.getOptions());
227 | this.agolOICList.addOption({label: this.nls.select, value: ""});
228 | this.addBtn.set("disabled", true);
229 | if (value) {
230 | if (this.agolContentSelect.get("value") === "content")
231 | var items = this.userContentInfo.myFolders[value].items;
232 | else
233 | var items = this.userContentInfo.myGroups[value].items;
234 | if (items.length) {
235 | items.sort(function (a, b) {
236 | a = a.name.toLowerCase().split(" ")[0];
237 | b = b.name.toLowerCase().split(" ")[0];
238 | if (a < b) {
239 | return -1;
240 | }
241 | if (a > b) {
242 | return 1;
243 | }
244 | return 0;
245 | });
246 | for (var a in items) {
247 | this.agolOICList.addOption({label: items[a].name, value: items[a].url});
248 | }
249 | } else {
250 | if (this.agolContentSelect.get("value") === "content")
251 | this.getOICFromFolder(value);
252 | else
253 | this.getOICFromGroup(value);
254 | }
255 |
256 | }
257 | },
258 | getOICFromGroup: function (value) {
259 | this.showLoading();
260 | var id = this.userContentInfo.myGroups[value].id;
261 | var request = new esriRequest({
262 | url: this.portalUrl + "sharing/rest/content/groups/" + id,
263 | content: {
264 | f: "json"
265 | },
266 | "handleAs": "json",
267 | "callbackParamName": "callback"
268 | });
269 | request.then(lang.hitch(this, function (response) {
270 | if (response.items) {
271 | for (var a = 0; a < response.items.length; a++) {
272 | if (response.items[a].type === "Oriented Imagery Catalog") {
273 | this.userContentInfo.myGroups[value].items.push({name: response.items[a].title, url: this.portalUrl + "sharing/rest/content/items/" + response.items[a].id});
274 | }
275 | }
276 | var items = this.userContentInfo.myGroups[value].items;
277 | items.sort(function (a, b) {
278 | a = a.name.toLowerCase().split(" ")[0];
279 | b = b.name.toLowerCase().split(" ")[0];
280 | if (a < b) {
281 | return -1;
282 | }
283 | if (a > b) {
284 | return 1;
285 | }
286 | return 0;
287 | });
288 | for (var a in items) {
289 | this.agolOICList.addOption({label: items[a].name, value: items[a].url});
290 | }
291 | this.hideLoading();
292 | } else
293 | this.hideLoading();
294 | }), lang.hitch(this, function (error) {
295 | this.hideLoading();
296 | }));
297 | },
298 | getOICFromFolder: function (value) {
299 | this.showLoading();
300 | var id = this.userContentInfo.myFolders[value].id;
301 | var request = new esriRequest({
302 | url: this.userContentInfo.user.userContentUrl + "/" + id,
303 | content: {
304 | f: "json"
305 | },
306 | handleAs: "json",
307 | callbackParamName: "callback"
308 | });
309 | request.then(lang.hitch(this, function (response) {
310 | if (response.items) {
311 | for (var a = 0; a < response.items.length; a++) {
312 | if (response.items[a].type === "Oriented Imagery Catalog") {
313 | this.userContentInfo.myFolders[value].items.push({name: response.items[a].title, url: this.portalUrl + "sharing/rest/content/items/" + response.items[a].id});
314 | }
315 | }
316 | var items = this.userContentInfo.myFolders[value].items;
317 | items.sort(function (a, b) {
318 | a = a.name.toLowerCase().split(" ")[0];
319 | b = b.name.toLowerCase().split(" ")[0];
320 | if (a < b) {
321 | return -1;
322 | }
323 | if (a > b) {
324 | return 1;
325 | }
326 | return 0;
327 | });
328 | for (var a in items) {
329 | this.agolOICList.addOption({label: items[a].name, value: items[a].url});
330 | }
331 | this.hideLoading();
332 | } else
333 | this.hideLoading();
334 | }), lang.hitch(this, function (error) {
335 | this.hideLoading();
336 | }));
337 | },
338 | deleteFromList: function () {
339 | var index = [];
340 | // for (var a in this.list.selection) {
341 | // index.push(this.arrayList[parseInt(a)].title);
342 | // }
343 | // for (var a in index) {
344 | // for (var b = this.arrayList.length - 1; b >= 0; b--) {
345 | // if (index[a] === this.arrayList[b].title) {
346 | // this.arrayList.splice(b, 1);
347 | // break;
348 | // }
349 | // }
350 | // }
351 | this.arrayList = [];
352 | this.list.refresh();
353 | var tempList = [];
354 | // for (var b in this.arrayList) {
355 | // tempList.push(this.arrayList[b].title);
356 | // }
357 | this.list.renderArray(tempList);
358 | if (this.arrayList.length === 0) {
359 | this.deleteBtn.set("disabled", true);
360 | }
361 | },
362 | setConfig: function (config) {
363 | this.config = config;
364 | if (this.config.oic) {
365 | this.arrayList = this.config.oic;
366 | var temp = [];
367 | for (var a in this.arrayList) {
368 | temp.push(this.arrayList[a].title);
369 | }
370 | this.list.refresh();
371 | this.list.renderArray(temp);
372 | }
373 |
374 | },
375 | getConfig: function () {
376 | this.config.oic = this.arrayList;
377 | return this.config;
378 | },
379 | errorNotification: function (text) {
380 | this.hideLoading();
381 | html.set(this.errorNotify, text);
382 | html.set(this.itemNotify, "");
383 | domStyle.set(this.errorNotify, "display", "block");
384 | setTimeout(lang.hitch(this, function () {
385 | domStyle.set(this.errorNotify, "display", "none");
386 | }), 5000);
387 | },
388 | showLoading: function () {
389 | domStyle.set(this.loadingNode, "display", "block");
390 | },
391 | hideLoading: function () {
392 | domStyle.set(this.loadingNode, "display", "none");
393 | }
394 | });
395 | });
--------------------------------------------------------------------------------