How to convert a classified image with 0-8 bands (i.e water, barren, crops, trees, builtup etc) to vectors in google earth engine - google-earth-engine

please remember that I am new to google earth engine
I have a classified image on sentinal that has 8 classes as bands
0 as water
1 as builtup
2 as barren
3 as trees
4 as grass
5 as crops
etc
I want to convert these bands into polygons using reduceToVectors()
below is the link to earth engine snippet for checking further details about image and its
bands.
https://code.earthengine.google.com/0b7045cc3e0577590ac5917d78fa4d6a

Related

Show regional cluster using python - folium and other vizualization library

I'm working on a dataset of location characteristics that I separate into 7 clusters.
I have 7 characteristic clusters with, in each, between 20 and 2000 locations.
Each cluster have a score (between 0 and 1).
My goal is to do a regional clusterizing on each characteristic cluster, then to show these regional clusters on a map with a color based on the score on the characteristic cluster.
Example : I have 1000 locations. Each location have a temperature. I detect 3 clusters within the data.
I separate these 1000 locations into 3 clusters:
1st_cluster : 500 locations and a score of (=mean of temperature of all locations) 0 degrees
2nd_cluster : 300 locations and a score of -10 degrees
3rd_cluster : 200 locations and a score of +10 degrees
That part is already done.
I want to show on a map these 3 clusters BUT to detect regional tendancy.
For now, I used folium to plot each characteristic (=temperature) cluster individually and let the library detect regional behavior.
But I couldn't find a way to plot on the same map all clusters (my code only detect when multiple locations are in the same area and create a regional cluster).
I don't really know if folium is a good library to continue and, if not, I don't know what library to use and how.
Do you have any ideas and advices ?
Thanks

How to stack/merge geom_stars items/plots in one - in R

If I have plotted the Relative Error Maps for the Silt soil attribute for the following 4 different soil types: Cambisols, calcisols, leptosols and fluvisols that form my study case area:
With this part of the code (3 times with diff soil type) i made the following maps:
I have followed this procedure also for the other 2 soil types i ve got inmy sptudy area (Calcisols, Fluvisols), and i want to combine these 3 maps in one, so as to show the relative error for the soil attribute in total (so as not to have any spaces in the whole area). Is it possible to merge these 3 ggplots in one so as to plot the holistic relative error map for clay?
Or with some way to save the plot as a dataframe object and then stack?

Obtain the differential spectrum of each marine floating target and its background/neighborhood water in Google Earth Engine

How to obtain the differential spectrum of each floating target (algal pattern here), that is, the band value of each algal pattern subtract the band value of the adjacent water around it (such as the median water spectrum)
I first extract floating algae from the sea. I can use NDVI, NDWI, etc. to extract the algae and its edges first (See the Fig.1, algae is in viridis palette). My goal is to get the difference between the spectra of the algae and the surrounding water. Therefore, I carried out buffer operation on the edge of algae patterns (See the Fig.2, yellow buffer). The buffer represents the water around algae. My goal was to calculate the difference between algae pattern and the surrounding background water body. I have considered the object-based approach, but this is very memory intensive and has limitations on spot size. Now I want to do it based on pixels and morphology. How to achieve this?
An alternative idea maybe:Fill nodata values (masked algae) using neighborhood water in an image, then using subtraction between the original image and the new one to obtain the difference between the spectra of the algae and the surrounding water.

Find centre location coordinates in R - geospatial analysis

I am trying to find the centre coordinates of high-density areas in R.
The dataset I have has about 1.5million rows and looks like this (dummy data)
LATITUDE LONGITUDE val
1 35.83111 -90.64639 359.1
2 42.40630 -90.31810 74.5
3 40.07806 -83.07806 115.4
4 40.53210 -90.14730 112.0
5 42.76310 -84.76220 118.4
6 39.29750 -87.97460 134.4 ...
...
After plotting it using ggmap and ggplot using the command
ggmap(UK_Map) +
geom_density2d(data=processedSubsetData,aes(x=processedSubsetData$Longitude,y=processedSubsetData$Latitude), bins=5) +
stat_density2d(data=processedSubsetData,aes(x=processedSubsetData$Longitude,y=processedSubsetData$Latitude,fill=..level.., alpha=..level..), geom='polygon')
I have the visualization which looks like below image.
As you can see from the image, there some high-density areas. I need to find the local centre coordinates of these high-density areas in the map.
I have tried calculating distance between the points and also rounding the coordinates to group them. But I am not able to make it work and is stuck.
Thanks

Space time 3d map

I would like to plot 3d spheres over a map in specific points.
Radious of the spheres measures my variable in one time.
I have x,y for east and north axis in UTM projection.
In z is the time and I have 2 observations in 4 positions of my map.
I want to present how changed my variable in the space and time.
The image I have in Shapefile or Geotiff format.
I saw another 3d plot similar to this one but not with maps.
Example 1
Example 2
My plot should be like this one:

Resources