Query elevation data within python script

181
1
05-30-2019 08:04 AM
WalterBoyd
New Contributor

Greetings, I'm new to ArcGis and this community.  Hope this isn't a dumb question.  In a python script I'm loading a polygon shapefile and creating a buffer around each polygon, writing this to a new file.  This all works great.  But the size of the buffer needs to depend on the ground elevation of the polygon. 

So here is my question:  What approach should I take to get the elevation of a polygon? 

I've tried the SummarizeElevation tool, but only works on 1000 polys at a time, and it's slow.  The AddSurfaceInformation_3d is just throwing a 999999 error for me (and yes I tried repair).

Also note, the elevation doesn't need to be super accurate.  Sampling the first point on the polygon would be sufficient.

Thanks!
Walter 

0 Kudos
1 Reply
DuncanHornby
MVP Frequent Contributor

You say: 

 Sampling the first point on the polygon would be sufficient

but you also say it does not have to be super accurate.

I would have thought getting the centroid of the polygon was the easiest option? That you can do with the Feature to Point tool then run Extract Values to Points tool. Finally join back the elevation to you polygon layer add a new field and compute your buffer distance into that field and then buffer.

0 Kudos