0

I have an image, which I have uploaded on Google earth engine under the asset id: "users/chandrakant/Max_RZSC_WGS1984_25km".

I want to visualize the data, but I am not able to do that using the code below.

A link to my tiff image is in the link below. https://www.dropbox.com/sh/hpqj2tfei8o82xo/AADNPWEA4PN9ybNN6zx8771Ca?dl=0

var image = ee.Image("users/chandrakant/Max_RZSC_WGS1984_25km");
var vizParams = {
  bands: ['b1'],
  min: 0.0,
  max: 1000.0,
  palette: ['bbe029', '0a9501', '074b03'],
};
Map.setCenter(6.746, 46.529, 2);
Map.addLayer(image, vizParams, 'Rootzone Storage Capacity');
Map.centerObject(image);

Can someone provide some suggestion, on why nothing is showing up on the map when I run it? There is no error shown in the console.

Added information:

**Point** (-58.9, -4.83) at 10Km/px
Longitude: -58.895520981116704
​Latitude: -4.833137881525199
​Zoom Level: 4
​​Scale (approx. m/px): 9783.93962050256
**Pixels**
Rootzone Storage Capacity: Image (1 band)
b1: masked
Objects
Rootzone Storage Capacity: Image users/chandrakant/RZSC_2000_2015 (1 band)
type: Image
id: users/chandrakant/RZSC_2000_2015
version: 1561473739510841
bands: List (1 element)
0: "b1", float, EPSG:32745, 1440x400 px
properties: Object (4 properties)
system:asset_size: 786204
system:footprint: LinearRing, 5 vertices
system:index: 0
system:time_start: 1451520000000

After reprojecting

var image = ee.Image("users/chandrakant/RZSC_2000_2015_Trial_2");
var vizParams = {
  bands: ['b1'],
  min: 0.0,
  max: 1000.0,
  palette: ['bbe029', '0a9501', '074b03'],
};
Map.setCenter(6.746, 46.529, 2);
//Map.addLayer(image, vizParams, 'Rootzone Storage Capacity');
Map.centerObject(image);

print('Projection, crs, and crs_transform:', image.projection());
var reprojected = image.reproject('EPSG:4326');
print('Projection, crs, and crs_transform:', reprojected.projection());
Map.addLayer(reprojected, vizParams, 'Reprojected');

Still not able to view the image.

Ep1c1aN
  • 683
  • 9
  • 25
  • How about adding 1 line `Map.centerObject(image)` at the end of your code ? – Kevin Jun 26 '19 at 13:55
  • Thanks @Kevin. But, I am still not able to visualize the variation. The 'Inspector tab gives the following output (mentioned in edits above). – Ep1c1aN Jun 28 '19 at 13:10
  • It says `b1: masked` in your added information. That means the pixel you clicked has been made hidden. Also, I just downloaded your tif image. Looks like its coordinate system is incorrect. In its native coordinate system (WGS_1984_UTM_Zone_45S), latitude values range from 8e15 to 1.1e16 which is very weird. Just wonder where did you get this tif image from? – Kevin Jun 28 '19 at 13:43
  • @Kevin. I tried to reproject the image, but I don't think that projection is the problem here. I have added a new .tfw file in the dropbox link above, which might be helpful (google earth engine asks for it when uploading. – Ep1c1aN Jun 29 '19 at 12:57
  • 1
    I changed coordinate system of the tif file to GCS_WGS_1984 in ArcMap (in its Properties -> General tab -> Spatial Reference), and now it looks normal to me. I thought someone has accidentally modified its coordinate system from GCS_WGS_1984 to WGS_1984_UTM_Zone_45S. This should be done through reprojection, not via changing the tif file properties. – Kevin Jun 29 '19 at 14:28
  • Thanks @Kevin. I reprojected the image in ArcMap and now the whole code works fine. – Ep1c1aN Jun 29 '19 at 17:01

0 Answers0