Skip to content

Commit b9a34e2

Browse files
committed
fix sedf guide
1 parent 9ffa22b commit b9a34e2

File tree

1 file changed

+25
-22
lines changed

1 file changed

+25
-22
lines changed

guide/05-working-with-the-spatially-enabled-dataframe/spatially-enabled-dataframe-advanced-topics.ipynb

Lines changed: 25 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -807,7 +807,7 @@
807807
}
808808
],
809809
"source": [
810-
"m = gis.map(\"San Diego, CA\", 8)\n",
810+
"m = gis.map(\"San Diego, CA\")\n",
811811
"m"
812812
]
813813
},
@@ -818,7 +818,7 @@
818818
"outputs": [],
819819
"source": [
820820
"# draw the camp `point`\n",
821-
"m.draw(camp_pendleton_s_geodefn)"
821+
"m.content.draw(camp_pendleton_s_geodefn)"
822822
]
823823
},
824824
{
@@ -866,7 +866,7 @@
866866
}
867867
],
868868
"source": [
869-
"midx = gis.map(\"United States\", 3)\n",
869+
"midx = gis.map(\"United States\")\n",
870870
"midx"
871871
]
872872
},
@@ -877,7 +877,7 @@
877877
"outputs": [],
878878
"source": [
879879
"midx.center = [39, -98]\n",
880-
"midx.basemap = 'gray-vector'"
880+
"midx.basemap.basemap = 'gray-vector'"
881881
]
882882
},
883883
{
@@ -937,6 +937,7 @@
937937
"source": [
938938
"import time\n",
939939
"from arcgis.geometry import Geometry, Polygon\n",
940+
"from arcgis.map.symbols import SimpleFillSymbolEsriSFS\n",
940941
"\n",
941942
"#define a symbol to visualize the spatial index quadrants\n",
942943
"sym = {\n",
@@ -968,7 +969,9 @@
968969
" 'rings':[[[minx,miny], [minx, maxy], [maxx, maxy], [maxx, miny], [minx, miny]]],\n",
969970
" 'spatialReference': sp_ref})\n",
970971
" #child_extent = Polygon(child_geom)\n",
971-
" midx.draw(shape = child_geom, symbol = sym)\n",
972+
" \n",
973+
" sym = SimpleFillSymbolEsriSFS(**sym)\n",
974+
" midx.content.draw(shape = child_geom, symbol = sym)\n",
972975
" time.sleep(2)"
973976
]
974977
},
@@ -1485,7 +1488,7 @@
14851488
}
14861489
],
14871490
"source": [
1488-
"m1 = gis.map(\"United States\", 3)\n",
1491+
"m1 = gis.map(\"United States\")\n",
14891492
"m1"
14901493
]
14911494
},
@@ -1504,7 +1507,7 @@
15041507
"metadata": {},
15051508
"outputs": [],
15061509
"source": [
1507-
"sym_poly = {\n",
1510+
"sym_poly = SimpleFillSymbolEsriSFS(**{\n",
15081511
" \"type\": \"esriSFS\",\n",
15091512
" \"style\": \"esriSFSSolid\",\n",
15101513
" \"color\": [0,0,0,0], # hollow, no fill\n",
@@ -1513,10 +1516,10 @@
15131516
" \"style\": \"esriSLSSolid\",\n",
15141517
" \"color\": [255,0,0,255], # red border\n",
15151518
" \"width\": 3}\n",
1516-
"}\n",
1519+
"})\n",
15171520
"\n",
15181521
"# draw the dataframe extent with AOI\n",
1519-
"m1.draw(shape = df_geoextent_geom, symbol = sym_poly)"
1522+
"m1.content.draw(shape = df_geoextent_geom, symbol = sym_poly)"
15201523
]
15211524
},
15221525
{
@@ -1540,7 +1543,7 @@
15401543
"area_of_interest_ring = [[[minx, miny], [minx, maxy], [maxx, maxy], [maxx, miny], [minx, miny]]]\n",
15411544
"area_of_interest_geom = Geometry({'rings': area_of_interest_ring, 'spatialReference': sp_ref})\n",
15421545
"\n",
1543-
"sym_poly_aoi = {\n",
1546+
"sym_poly_aoi = SimpleFillSymbolEsriSFS(**{\n",
15441547
" \"type\": \"esriSFS\",\n",
15451548
" \"style\": \"esriSFSSolid\",\n",
15461549
" \"color\": [0,0,0,0], # hollow, no fill\n",
@@ -1549,9 +1552,9 @@
15491552
" \"style\": \"esriSLSSolid\",\n",
15501553
" \"color\": [0,255,0,255], # green border\n",
15511554
" \"width\": 3}\n",
1552-
"}\n",
1555+
"})\n",
15531556
"\n",
1554-
"m1.draw(shape = area_of_interest_geom, symbol = sym_poly_aoi)"
1557+
"m1.content.draw(shape = area_of_interest_geom, symbol = sym_poly_aoi)"
15551558
]
15561559
},
15571560
{
@@ -1840,7 +1843,7 @@
18401843
}
18411844
],
18421845
"source": [
1843-
"m2 = gis.map(\"Los Angeles, CA\", 7)\n",
1846+
"m2 = gis.map(\"Los Angeles, CA\")\n",
18441847
"m2"
18451848
]
18461849
},
@@ -1859,7 +1862,7 @@
18591862
"metadata": {},
18601863
"outputs": [],
18611864
"source": [
1862-
"m2.draw(shape = area_of_interest_geom, symbol = sym_poly_aoi)"
1865+
"m2.content.draw(shape = area_of_interest_geom, symbol = sym_poly_aoi)"
18631866
]
18641867
},
18651868
{
@@ -1868,7 +1871,9 @@
18681871
"metadata": {},
18691872
"outputs": [],
18701873
"source": [
1871-
"pt_sym = {\n",
1874+
"from arcgis.map.symbols import SimpleMarkerSymbolEsriSMS\n",
1875+
"\n",
1876+
"pt_sym = SimpleMarkerSymbolEsriSMS(**{\n",
18721877
" \"type\": \"esriSMS\",\n",
18731878
" \"style\": \"esriSMSDiamond\",\n",
18741879
" \"color\": [255,140,0,255], # yellowish\n",
@@ -1879,11 +1884,11 @@
18791884
" \"outline\": {\n",
18801885
" \"color\": [255,140,0,255],\n",
18811886
" \"width\": 1}\n",
1882-
" }\n",
1887+
" })\n",
18831888
" \n",
18841889
"# draw the AOI that intersects\n",
18851890
"for pt_index in index_of_features:\n",
1886-
" m2.draw(shape = df.iloc[pt_index]['SHAPE'], symbol = pt_sym) "
1891+
" m2.content.draw(shape = df.iloc[pt_index]['SHAPE'], symbol = pt_sym) "
18871892
]
18881893
},
18891894
{
@@ -4096,7 +4101,7 @@
40964101
}
40974102
],
40984103
"source": [
4099-
"m3 = gis.map(\"Wyoming\", 6)\n",
4104+
"m3 = gis.map(\"Wyoming\")\n",
41004105
"m3"
41014106
]
41024107
},
@@ -4115,11 +4120,9 @@
41154120
"metadata": {},
41164121
"outputs": [],
41174122
"source": [
4118-
"from arcgis.geometry import Geometry\n",
4119-
"\n",
41204123
"# draw the spatial join results on Wyoming state\n",
41214124
"for idx, row in sdf2.iterrows():\n",
4122-
" m3.draw(row['SHAPE'], symbol=pt_sym)"
4125+
" m3.content.draw(row['SHAPE'], symbol=pt_sym)"
41234126
]
41244127
},
41254128
{
@@ -4147,7 +4150,7 @@
41474150
"name": "python",
41484151
"nbconvert_exporter": "python",
41494152
"pygments_lexer": "ipython3",
4150-
"version": "3.9.16"
4153+
"version": "3.12.4"
41514154
},
41524155
"toc": {
41534156
"base_numbering": 1,

0 commit comments

Comments
 (0)