Skip to content

Commit

Permalink
type
Browse files Browse the repository at this point in the history
  • Loading branch information
cariashuang0417 committed Oct 24, 2024
1 parent 87e2be7 commit bfd0097
Showing 1 changed file with 15 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@
"root_folder = gis.content.folders.get()\n",
"# Loop through each file and publish it as a service\n",
"for current_sd_file in sd_file_list:\n",
" item = root_folder.add({\"title\": \"New Layer\", \"item_type\": \"Service Definition\"}, data_dir + current_sd_file).result() # .sd file is uploaded and a .sd file item is created\n",
" item = root_folder.add({\"title\": \"New Layer\", \"type\": \"Service Definition\"}, data_dir + current_sd_file).result() # .sd file is uploaded and a .sd file item is created\n",
" if \"BuildCache\" not in current_sd_file:\n",
" published_item = item.publish() # .sd file item is published and a web layer item is created\n",
" else:\n",
Expand Down Expand Up @@ -276,7 +276,7 @@
],
"source": [
"proot_folder = p_gis.content.folders.get()\n",
"uploaded_file = proot_folder.add({\"title\": \"Nursing Home Location\", \"item_type\": \"Service Definition\"}, file=sd_file).result()\n",
"uploaded_file = proot_folder.add({\"title\": \"Nursing Home Location\", \"type\": \"Service Definition\"}, file=sd_file).result()\n",
"uploaded_file.tags"
]
},
Expand Down Expand Up @@ -387,7 +387,7 @@
"outputs": [],
"source": [
"data = \"data/power_pedestals_2012.zip\"\n",
"shpfile = root_folder.add({\"title\": \"power_pedestals_2012\", \"item_type\": \"Shapefile\"}, data).result()"
"shpfile = root_folder.add({\"title\": \"power_pedestals_2012\", \"type\": \"Shapefile\"}, data).result()"
]
},
{
Expand Down Expand Up @@ -556,7 +556,7 @@
"outputs": [],
"source": [
"csv_file = 'data/Chennai_precipitation.csv'\n",
"csv_item = root_folder.add({\"title\": \"Chennai Precipitation\", \"item_type\": \"CSV\"}, csv_file).result()"
"csv_item = root_folder.add({\"title\": \"Chennai Precipitation\", \"type\": \"CSV\"}, csv_file).result()"
]
},
{
Expand Down Expand Up @@ -652,7 +652,10 @@
{
"cell_type": "markdown",
"metadata": {
"collapsed": true
"collapsed": true,
"jupyter": {
"outputs_hidden": true
}
},
"source": [
"### Create a new folder for the items\n",
Expand Down Expand Up @@ -708,7 +711,10 @@
{
"cell_type": "markdown",
"metadata": {
"collapsed": true
"collapsed": true,
"jupyter": {
"outputs_hidden": true
}
},
"source": [
"Now that the items are moved, we can request for the item's `ownerFolder` property and ensure it matches the `id` of the folder created in the previous step"
Expand Down Expand Up @@ -739,7 +745,7 @@
"notebookRuntimeVersion": "4.0"
},
"kernelspec": {
"display_name": "Python 3",
"display_name": "Python 3 (ipykernel)",
"language": "python",
"name": "python3"
},
Expand All @@ -753,7 +759,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.11.8"
"version": "3.11.0"
},
"toc": {
"base_numbering": 1,
Expand Down Expand Up @@ -799,5 +805,5 @@
}
},
"nbformat": 4,
"nbformat_minor": 1
"nbformat_minor": 4
}

0 comments on commit bfd0097

Please sign in to comment.