Repo
The joy of mapping
Yesterday in the Great Smokies
Webcam
archive
with Boyd
boyd.xyz/j
Lidar
3D
above ground features
statewide.
πΆ
Bizarre Love Triangle
©1987 New Order
```py # Import ArcGIS Pro site package import arcpy ``` ___ ```py [1-2|1-5|1-10] # Location of geodatabase arcpy.env.workspace = 'c:/BoydsGIS/j/joy.gdb' # Let's not add output to map arcpy.env.addOutputsToMap = False # Set our CRS ky = arcpy.SpatialReference(3089) wgs84 = arcpy.SpatialReference(4326) ``` ___ ```py [1-3|1-6] # Set our area of interest lat = 38.1317719 lon = -84.5049721 # Distance in feet from lat,lon buffer = 1000 ``` ___ ```py # KyFromAbove Rest endpoint dsm = 'https://kyraster.ky.gov/arcgis/rest/services/ElevationServices/Ky_DSM_First_Return_5FT_Phase1/ImageServer' ``` ___ ```py [1-3|1-7] # Create area of interest center point point = arcpy.Point(lon, lat) ptGeometry = arcpy.PointGeometry(point, wgs84) arcpy.env.outputCoordinateSystem = ky arcpy.CopyFeatures_management(ptGeometry, "point") ``` ___ ```py [1-2|1-5] # Buffer and square our area of interest arcpy.analysis.Buffer("point", "aoi", buffer) arcpy.env.addOutputsToMap = True arcpy.management.FeatureEnvelopeToPolygon('aoi', 'square_aoi') arcpy.env.addOutputsToMap = False ``` ___ ```py [1-2|1-6] # Create collar for block diagram edges arcpy.analysis.Buffer('square_aoi', 'clip', -10) arcpy.analysis.Erase('square_aoi', 'clip', 'collar') ``` ___ ```py [1-3|1-6] # Extract DSM from area of interest a = arcpy.sa.ExtractByMask(dsm, 'square_aoi') a.save('dsm') print(f"{a.minimum} is our lowest elevation. That's our floor") ``` ___ ```py # Verify b = arcpy.sa.Raster('dsm') b ``` ___ ```py [1-2|1-6] # Create DSM surface with collared edges arcpy.PolygonToRaster_conversion("collar", "ORIG_FID", "zero_raster", "#", "#", 5) c = arcpy.sa.Con(arcpy.sa.IsNull('zero_raster'), b, b.minimum) c.save('surface') ``` ___ ```py # Add vertices along line every 5 feet arcpy.edit.Densify('lines', '#', 5) ``` ___ ```py # Add elevation to lines arcpy.ddd.UpdateFeatureZ('lines', 'surface') ```
PSA
Geoawareness
Week
Three
activities
π
πΊοΈ
Geocache
Nov 9
8:30 am β noon
outside Whitehall
Link to activities
Thank you
boyd.xyz/j