By running the code, one obtains:

FeatureCollection (Error) Image.reduceToVectors: First band ('x') of image must be integral.

I don´t understand this error. My goal is to convert the pixel values into vector data, e.g. Points.

var coorsfeat = mean.reduceToVectors({ reducer : null, geometry : geometry, crs :mean.projection().getInfo().crs, crsTransform :mean.projection().getInfo().transform, geometryType : 'centroid', labelProperty : 'Precip' })

Link to GEE

  • Using different data, or another Type of Geometry(points) to reduce over, did not help – Alexander Vocaet Feb 28 at 14:32

The error regarding the Integral was fixable by converting the input Data from float to Int. I recommend a multiplication to evade Data precision loss.

Fix: var mean= ImCol.filterBounds(aoi).filterDate('2017-01-01','2017-12-31').mean() .multiply(10000).toInt()

Unfortunately, this retrieves 0 Features.

Changing the Following Arguments to scale did the Trick :

crs :mean.projection().getInfo().crs, crsTransform :mean.projection().getInfo().transform

Unfortunately, this doesn't obtain one Feature per Pixel. Gonna open a new Thread for this one, as it seems to be a different problem then initially described in this thread

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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