0

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

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

1 Answer 1

0

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

2

Your Answer

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

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