0

I am fairly new to QGIS and I am doing a masters degree.

I have a number of GPS coordinates which represent the location of elephant sightings. I need to find out what habitat type each of these coordinates was recorded in (e.g. scrubland, grassland, forest). To do this I have been trying to use the World Terrestrial Ecosystems map from Esri Landscape (https://www.arcgis.com/home/item.html?id=d9434e94c817434c8448445501aee60a) which is a world map showing many different habitat types.

I have loaded the map into QGIS alongside my GPS coordinates (which can be seen in the attached screenshot)

Habitat map with GPS coordinates overlain

but i am unsure about how to assign each of these coordinates a habitat type based on the underlying map. I have tried using a point sampling tool which i have used for previous analysis but it just produces a blank csv file with no results.

How could I tackle this?

2
  • 3
    More information please on what you're trying to do. Screenshots would help. So would a sample of your data and a link to the World Terrestrial Ecosystems map.
    – Pointdump
    May 14, 2022 at 18:40
  • As per the help center please do not include chit chat like thanks in your posts.
    – PolyGeo
    May 15, 2022 at 21:50

2 Answers 2

2

Use QGIS expressions with the function raster_value(). Be aware: both layers have to be in the same CRS:

 raster_value( 'raster', 1, $geometry)
  • raster is the name of your raster layer.
  • 1 is the number of the band.
3
  • 2
    Adding to @Babel's amswer, for instance you could edit your point (observations) layer's settings and add a virtual field (Field calculator in the Fields tab) with the expression he provides. This virtual field would then tell you the veg type at each observation point.
    – Houska
    May 15, 2022 at 13:29
  • Thanks for the suggestion, I tried this and the results it produced were blank. I’ve had this issue with all the things I’ve tried and think maybe something is wrong with the map itself?
    – JoshB
    May 16, 2022 at 7:24
  • Whatbkind of data you have, hiw are your layers saved? Do you have them saved as local files?
    – Babel
    May 16, 2022 at 8:16
1

You can use the processing tool Sample raster values:

"Extracts raster values at the point locations. "

2
  • Thanks for the suggestion, I tried this and the results it produced were blank. I’ve had this issue with all the things I’ve tried and think maybe something is wrong with the map itself?
    – JoshB
    May 16, 2022 at 7:24
  • The problem is probably that the layer is a service. You need to download the raster if it is available.
    – BERA
    May 16, 2022 at 18:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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