0

I have FeatureCollection with 4 columns with different datatypes. One of them is "long" which I neet to converte to "Int". The FeatureCollection was imported as shapefiles. I need this column as "Int" to do classification.

type: FeatureCollection id: users/aleksandramonika/pola_beskidy_trening version: 1667257388739078 columns: Object (4 properties) id: Long class: Long name: String system:index: String

I don't know how to access and change type of a column.

I tried to change the value with remap, but the datatype was changed to "any".

FeatureCollection (30 elements, 4 columns) type: FeatureCollection columns: Object (4 properties) id: Long class: name: String system:index: String

var agriculture = ee.FeatureCollection(agriculture).remap(
  [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], 
 [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], 
 'class');

0 Answers0