How to draw a polygon or circle on few locations in Jupyter notebook?

09-21-2018 03:54 AM
New Contributor

In jupyter notebook, I'm trying to make draw a shape (say circle) on some location points plotted on map as shown below:

# df is a pandas dataframe with coloumns 'lon' & 'lat'

points = gis.content.import_data(df)


# cen_lon, cen_lat are center longitude and latitude respectively.

g.draw('circle',[cen_x, cen_y])

I want a circle/polygon should appear, which encircles the points of df upto some radius r

0 Kudos
3 Replies
MVP Esteemed Contributor

Since the data has already been loaded as a layer, what about arcgis.features.analysis.create_buffer?

New Contributor

I tried the following (both with analysis.create_buffers and use_proximitiy.create_buffers (simo xu)]:

layer0 = g.layers[0]
buffer0 = use_proximity.create_buffers(layer0, distances=[50], units = 'Miles')

and getting this error:

AttributeError: 'NoneType' object has no attribute 'create_buffers'

0 Kudos
by MVP Regular Contributor
MVP Regular Contributor

Agree with Joshua.

And here is an example using a quite similar approach, it should work straight away for your data if you give it some simple tweaks.

Proximity analysis | ArcGIS for Developers 

0 Kudos