Python Forum
Extract data from rasters to plot time-series
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Extract data from rasters to plot time-series
#1
Hi! Start off by stating I'm VERY new to python, so please excuse my utter confusion.

Here's the deal. I have a model that simulates snowpack, which produces rasters (.tif). The model produces one raster for each day of the year, therefore I have 365 snowpack.tif files. I want to make time-series plots at specific points to compare to actual snowpack data from SNOTEL stations.

Is there a script that can efficiently extract the snowpack value at specific points of all the 365 .tif files, and then export that data (say to a .csv file)?

I have a shapefile of the SNOTEL locations (SNOTEL.shp), which lists the latitude and longitude in the attribute table. I'm trying to figure out a script that will read the rows (the latitude and longitude values) in a SNOTEL.shp file's attribute table, which will then tell the script to extract snowpack values from the rasters (snowpack.tif). The raster's are a matrix, so I may need to convert the lat/long to col/row, but the raster does derive lat/long in the attribute table.

Again, sorry if this is confusing and please ask for clarification where needed. Any advice is appreciated.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Is it possible to extract 1 or 2 bits of data from MS project files? cubangt 8 945 Feb-16-2024, 12:02 AM
Last Post: deanhystad
  Date Time Series Help...Please spra8560 2 314 Feb-01-2024, 01:38 PM
Last Post: spra8560
  Why can't it extract the data from .txt well? Melcu54 3 646 Aug-20-2023, 10:07 PM
Last Post: deanhystad
  Likert survey data plot error Andrzej_Andrzej 6 1,307 Jul-16-2023, 10:11 PM
Last Post: deanhystad
  Plot a pandas data fram via pyqtgraph with an modul import and qt designer widget Nietzsche 0 802 May-29-2023, 02:42 PM
Last Post: Nietzsche
  Print names in x-axis of a time-series values hobbyist 4 1,178 Apr-22-2023, 09:29 PM
Last Post: deanhystad
  first time use plot - I get empty graph korenron 6 1,968 Feb-04-2023, 02:14 PM
Last Post: deanhystad
  Create simple live plot of stock data dram 2 2,859 Jan-27-2023, 04:34 AM
Last Post: CucumberNox
Thumbs Up Python 3 Jupyter notebook ternary plot data nicholas 0 897 Jan-21-2023, 05:01 PM
Last Post: nicholas
  python Extract sql data by combining below code. mg24 1 915 Oct-03-2022, 10:25 AM
Last Post: mg24

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020