Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

Python zonale statictics on raster

from rasterstats import zonal_stats

stats = zonal_stats("tests/data/polygons.shp",
                     "tests/data/slope.tif",
                     stats=['min', 'max', 'mean', 'majority', 'sum'],
                     all_touched=False,
                     
                   )

start
{'min' : 0, 'max' : 5, 'mean' : 2.5, 'majority' : 4, 'sum': 42}
Comment

PREVIOUS NEXT
Code Example
Python :: how to save a count countvectorizer model in python 
Python :: pyqt-opengl-drawing-simple-scenes 
Python :: how print python 
Python :: REST APIs with Flask and Python free download 
Python :: Python Raw string using r prefix 
Python :: const obj = { a: 1, b: 2, c: 3, }; const obj2 = { ...obj, a: 0, }; console.log(obj2.a, obj2.b); 
Python :: change the Values to Numpy Array 
Python :: HTML automation not working on vscode with folder named templates on django 
Python :: kivy window location 
Python :: Get index for value_counts() 
Python :: Fill area under line plot 
Python :: using deque to make a list 
Python :: translating the mean of a data to a specific value 
Python :: tutorial on how to search the database in your django project 
Python :: django python get more commands paramaters 
Python :: threading lock example 
Python :: NMF cosine similarities 
Python :: complete pipeline sample 
Python :: Python3 code to find Triangular Number Series   
Python :: python typing namedtuple 
Python :: Tree : Top View 
Python :: map column dataframe python 
Python :: How to draw a Ninja Design using python turtle 
Python :: image name validate using regex python 
Python :: index is datetime and i want the row number 
Python :: studygyaan python everywhere - host on heroku 
Python :: python stopwords not defined 
Python :: shorten all floats in a list 
Python :: how to write a correct python code 
Python :: Empty a variable without destroying it 
ADD CONTENT
Topic
Content
Source link
Name
3+6 =