Mostrando entradas con la etiqueta remote sensing. Mostrar todas las entradas
Mostrando entradas con la etiqueta remote sensing. Mostrar todas las entradas

lunes, 3 de julio de 2023

Lionel Messi seen from the sky!!

Since the last FIFA World Cup everyone has been talking about Messi. But one person in Córdoba (ARG) went one step further: a drawing of Lionel Messi in the crop! So it can be seen from the sky!. To be able to see it you need to be registered to Google Earth Engine. Let's have a look!

Open the code editor and write:

//import Sentinel 2 collection
var s2 = ee.ImageCollection("COPERNICUS/S2_SR")
// Define a region
var region = ee.Geometry.Polygon([[
  [-64.27491667317739,-32.30908813533604],
  [-64.27491667317739,-32.313585635718105],
  [-64.27079680013051,-32.313585635718105],
  [-64.27079680013051,-32.30908813533604]
]])
// Filter the collection using the defined region
var filtered = s2.filterBounds(region)
// Filter by dates
filtered = filtered.filterDate('2023-01-01', '2023-01-15')
// Filter clouds
filtered = filtered.filter(ee.Filter.lt('CLOUD_COVERAGE_ASSESSMENT', 20))
// Convert the collection into a list
var ilist = filtered.toList(filtered.size())
// there are 3 images in this period, get the first one (you can also try with the others)
var i = ee.Image(ilist.get(0))
// compute a vegetation index 
var nd = i.normalizedDifference(['B8', 'B4'])
// clip with the region 
nd = nd.clip(region)
//Get the date of the image to show as the name of the image in the map
var d = i.date().format('yMMdd').getInfo()
// Get the min and max values of the vegetation index in the region we defined
var minmax = nd.reduceRegion({
  reducer:ee.Reducer.minMax(),
  geometry: region,
  scale: 10
}).getInfo()
var min = minmax['nd_min']
var max = minmax['nd_max']*0.7 // stretch
// create visualization parameters (you can play around with the palette in this section)
var vis = {min:min, max:max, palette:['pink', 'brown', 'black']}
// add layer to map
Map.addLayer(nd, vis, d)
// center scene
Map.centerObject(region, 16)

Or just use the following link: https://code.earthengine.google.com/447a24f33cedfa8a8c676d822340bb73

lunes, 26 de octubre de 2020

Add Basemaps to QGIS without installing any plugin

Hello

I will quickly show you how to add a BaseMap to QGIS without installing any plugin.

1. you have to find a website where you can get the URLs for the basemaps. I will use this as example: https://leaflet-extras.github.io/leaflet-providers/preview/

2. choose the layer you want and copy the URL. For example, I will use ESRI World Imagery: https://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer/tile/{z}/{y}/{x} 

3. in the Navigator window of QGIS, look for "XYZ Tiles"

4. Right click > New Connection

5. set a Name of your choice

6. pase the URL you got from step 2 into the URL text field

7. once it appears under the section "XYZ Tiles" you can add it to the map as any other layer

You can see a video of the process here: https://www.youtube.com/watch?v=3j8UaOYC-0A

Thank you for reading. Leave your comments in the comments sections