2

I would like to obtain the information of a raster layer at some points. Apparently the Point sampling tool does the job. I have used this tool, and all the raster values extracted at specific points are NULL... Both vector and raster layer are in the same CRS. I use QGIS 2.0.i in Windows 8.1. Any clue ?

By the way, does anybody knows how the raster value is computed by this tool = Is it interpolated ? or is it the closest raster value to the point coordinate ? )

closed as unclear what you're asking by underdark Apr 22 '17 at 12:07

Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

  • What dataset type is your raster (e.g. tif, jpg, MrSID, jp2)? – artwork21 May 1 '14 at 16:51
0

To expand on PolyGeo's answer as I had the same problem. What is most likely happening is that the layer in which you have your sample points is probably in a different Co-ordinate Reference System than that of the Raster Image.

It may look like both layers are co-incident but this could be simply a display feature caused by "on the fly" CRS transformation. This makes it look like all your layers are in the same projection but in reality they may not be. Turn this off and see what happens.

If they are not then when you run the point sampling tool, it does run correctly but since the layers aren't coincident there is nothing i.e null values "beneath" your sampling points layer.

Make sure that both your vector layer and rastor layer are definitely in the same CRS. I had this exact same problem and this was the solution. Simply selecting the CRS in the layer properties isn't sufficient. You may need to perform a projection transform of one of you layers by right-clicking -> Save As and creating a shape file in the new projection.

For example, I had a large bathymetry polygon layer which I wanted to find the depths at specific locations. I created a vector layer with my sampling points from an ascii files with UTM32 co-ordinates. It turned out however that my bathymetry polygon data was delivered in UTM33 (despite the actual location being located in UTM32.). The solution was to transform the sampling point layer to a shapefile in UTM33.

-2

Use the Coordinate Reference System (CRS) of the raster image.

We're looking for long answers that provide some explanation and context. Don't just give a one-line answer; explain why your answer is right, ideally with citations. Answers that don't include explanations may be removed.

  • 3
    Welcome to GIS SE! Normally "about a paragraph" is considered minimum length for an answer (or question) here so I recommend that you edit your question to explain briefly how your answer addresses the asker's question. – PolyGeo Jul 23 '14 at 8:24

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