Skip to content

Instantly share code, notes, and snippets.

View AsgerPetersen's full-sized avatar

Asger Skovbo Petersen AsgerPetersen

  • Copenhagen, Denmark
View GitHub Profile
@AsgerPetersen
AsgerPetersen / lasreader.pxd
Created October 6, 2015 12:01 — forked from gcasey/lasreader.pxd
Reading LAS file efficiently into numpy using cython
#%%cython -I/usr/local/include -L/usr/local/lib -llas_c
# Created by Casey Goodlett
cimport cython
import numpy as np
cimport numpy as np
import liblas
DTYPE = np.float64
ctypedef np.float64_t DTYPE_t
"""
Zonal Statistics
Vector-Raster Analysis
Copyright 2013 Matthew Perry
Changes by AsgerPetersen:
- Use band nodata value if user does not override it
- Allow calculating statistics for all geometry types
- Allow buffer to be applied before calculation