Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

How can I extract values from a raster by points. I prefer not in Arcgis. I prefer in Qgis or Mapwindow or other open source gis.

share|improve this question
1  
So you have points and you need to extract the values from the raster under those points, or do you need to convert the raster cells into points. Just checking before I try and work out the answer. – Nathan W Nov 16 '10 at 11:07
    
The first, i have the points and i need to extract thevalues from the raster, under those points. THNX!! – Vassilis Nov 16 '10 at 12:50
up vote 19 down vote accepted

QGIS "Point Sampling Tool" should be the plugin you're looking for.

Here's a detailed description of how to use it: http://pvanb.wordpress.com/2010/02/15/sampling-raster-values-at-point-locations-in-qgis/

Update based on Paolo's comment:

the plugin is not the only solution, and not always the easiest solution anymore. An alternative solution is the Saga function ‘Add grid values to point’ in the processing toolbox. See for details http://pvanb.wordpress.com/2014/07/01/sampling-raster-values-at-point-locations-in-qgis-an-update/

share|improve this answer
    
yes easier this way with the plugin – Mapperz Nov 16 '10 at 14:56
4  
People are still finding the above-mentioned post through this Q&A. However, the plugin is not the only solution, and not always the easiest solution anymore. An alternative solution is the Saga function ‘Add grid values to point’ in the processing toolbox. See for details this post. – Paulo Jul 4 '14 at 10:17
    
Running on QGIs 2.10 I cant' seem to find that specific function in the processing toolbox. Was it removed from the options list? – TTome Oct 6 '15 at 19:42
    
Caution. I just ran the Point Sampling Tool. 60,000 points and 13 rasters. The results failed my 30 random sample test for each year. This tool has issues with large datasets. I would not use it. – If you do not know- just GIS Feb 11 at 15:29

You can use this: http://www.saga-gis.org/saga_module_doc/2.1.3/shapes_grid_3.html

Its in the SAGA Toolbox of Qgis! It does everything in one step :)

share|improve this answer

A quick thought, http://gis-techniques.blogspot.com/2012/10/extract-raster-values-from-points.html has step by step guide to use R Raster package extract raster values from points. Now days R raster package is popular for raster handling in terms of resource, easiness and quick and dirty job done.

share|improve this answer

In PostGIS 2.0 you can do:

SELECT ST_Value(rast, geom) val
FROM yourrastertabe, yourpointtable
WHERE ST_Intersects(rast, geom)

Make sure your raster is tiled very small when you load it (-t 10x10 with the loader).

share|improve this answer
    
MAKE SURE THE RASTER FILE IS TILED VERY SMALL (-t 10x10) – nickves Jan 23 '13 at 12:10

Quick thought:

  1. gdal_polygonize.py - polygonize your raster feature
  2. Insert your point features and polygons into PostGIS database
  3. Use st_intersects function to pull all elevation values where features intersect
share|improve this answer
    
interesting approach, because yesterday start studing how to use Postgis. – Vassilis Mar 12 '12 at 20:35
    
Thanks, it's fairly simplistic but it works. Here is what I was able to produce with this approach: i.imgur.com/h8CGJ.png – user5584 Mar 14 '12 at 13:58

In GRASS GIS, you can either query the map in the GUI or use http://grass.osgeo.org/gdp/html_grass64/r.what.html

share|improve this answer
2  
For Grass I found this:pvanb.wordpress.com/2010/05/05/… – Vassilis Nov 19 '10 at 8:58
    
Another GRASS module that is capable of sampling a raster is v.sample, which is also available through the QGIS processing toolbox. – user55937 Feb 12 at 20:45

If you have access to FME then you can use one of two transformers in FME Workbench.

The RasterCellCoercer ("Decomposes all input numeric raster features into individual points or polygons. One vector feature is output for each cell in the raster.")

The PointOnRasterValueExtractor ("Takes in point features and a single reference raster. The output consists of the band and palette value(s) at the location of each point.")

share|improve this answer
    
No I don't have or use FME, is a standalone application or a plugin? – Vassilis Nov 26 '10 at 9:14

Hawthorne Beyer's GME tools do this nicely via command line, and allow easy batching with 'for' loops.

isectpntrst(in="path/to/shapefile", raster="path/to/raster", field="fieldname")

GME isectpntrst command reference

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.