Add Landcover graph error

Hello Everyone.
Whenever I am trying to run the add landcover graph in snap sen et it shows the java error exception. It produces an output which is blank but in the color manipulation tab it shows the landcover classes. I am using snap 7 configured with python 3.6.3. Can somebody please explain what is the problem here? It shows the following error:
java.io.FileNotFoundException: https://storage.googleapis.com/cci-lc-v207/ESACCI-LC-L4-LCCS-Map-300m-P1Y-2015-v2.0.7.zip
at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.access$200(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection$9.run(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection$9.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.AccessController.doPrivilegedWithCombiner(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.getHeaderField(Unknown Source)
at java.net.URLConnection.getHeaderFieldLong(Unknown Source)
at java.net.URLConnection.getContentLengthLong(Unknown Source)
at java.net.URLConnection.getContentLength(Unknown Source)
at sun.net.www.protocol.https.HttpsURLConnectionImpl.getContentLength(Unknown Source)
at org.esa.snap.engine_utilities.download.DownloadableContentImpl.downloadFile(DownloadableContentImpl.java:246)
Caused: java.io.FileNotFoundException: https://storage.googleapis.com/cci-lc-v207/ESACCI-LC-L4-LCCS-Map-300m-P1Y-2015-v2.0.7.zip
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
at java.lang.reflect.Constructor.newInstance(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection$10.run(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection$10.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at sun.net.www.protocol.http.HttpURLConnection.getChainedException(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.access$200(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection$9.run(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection$9.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.AccessController.doPrivilegedWithCombiner(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source)
at sun.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream(Unknown Source)
at org.esa.snap.engine_utilities.download.DownloadableContentImpl.downloadFile(DownloadableContentImpl.java:247)
[catch] at org.esa.snap.engine_utilities.download.DownloadableContentImpl.lambda$getRemoteHttpFile$0(DownloadableContentImpl.java:224)
at org.esa.snap.engine_utilities.download.DownloadableContentImpl.getRemoteHttpFile(DownloadableContentImpl.java:229)
at org.esa.snap.engine_utilities.download.DownloadableContentImpl.getRemoteFile(DownloadableContentImpl.java:109)
at org.esa.snap.engine_utilities.download.DownloadableContentImpl.findFile(DownloadableContentImpl.java:184)
at org.esa.snap.engine_utilities.download.DownloadableContentImpl.getContentFile(DownloadableContentImpl.java:86)
at org.esa.snap.landcover.dataio.FileLandCoverTile.(FileLandCoverTile.java:61)
at org.esa.snap.landcover.dataio.FileLandCoverModel.loadProducts(FileLandCoverModel.java:106)
at org.esa.snap.landcover.dataio.FileLandCoverModel.getLandCover(FileLandCoverModel.java:75)
at org.esa.snap.landcover.gpf.AddLandCoverOp$LandCoverSourceImage.computeSample(AddLandCoverOp.java:240)
at org.esa.snap.core.image.RasterDataNodeSampleOpImage.computeProductData(RasterDataNodeSampleOpImage.java:34)
at org.esa.snap.core.image.RasterDataNodeOpImage.computeRect(RasterDataNodeOpImage.java:127)
at javax.media.jai.SourcelessOpImage.computeTile(SourcelessOpImage.java:137)
at com.sun.media.jai.util.SunTileScheduler.scheduleTile(SunTileScheduler.java:904)
at javax.media.jai.OpImage.getTile(OpImage.java:1129)
at javax.media.jai.PlanarImage.getData(PlanarImage.java:2085)
at com.bc.ceres.glevel.MultiLevelImage.getData(MultiLevelImage.java:64)
at org.esa.snap.core.datamodel.Band.readRasterData(Band.java:311)
at org.esa.snap.core.dataio.ProductSubsetBuilder.readBandRasterDataRegion(ProductSubsetBuilder.java:395)
at org.esa.snap.core.dataio.ProductSubsetBuilder.readBandRasterDataImpl(ProductSubsetBuilder.java:332)
at org.esa.snap.core.dataio.AbstractProductReader.readBandRasterData(AbstractProductReader.java:253)
at org.esa.snap.core.gpf.common.SubsetOp.computeTile(SubsetOp.java:304)
at org.esa.snap.core.gpf.internal.OperatorImage.computeRect(OperatorImage.java:80)
at javax.media.jai.SourcelessOpImage.computeTile(SourcelessOpImage.java:137)
at com.sun.media.jai.util.SunTileScheduler.scheduleTile(SunTileScheduler.java:904)
at javax.media.jai.OpImage.getTile(OpImage.java:1129)
at javax.media.jai.PlanarImage.getData(PlanarImage.java:2085)
at com.bc.ceres.glevel.MultiLevelImage.getData(MultiLevelImage.java:64)
at org.esa.snap.core.gpf.internal.OperatorContext.getSourceTile(OperatorContext.java:428)
at org.esa.snap.core.gpf.internal.OperatorContext.getSourceTile(OperatorContext.java:414)
at org.esa.snap.core.gpf.internal.OperatorImage.computeRect(OperatorImage.java:73)
at javax.media.jai.SourcelessOpImage.computeTile(SourcelessOpImage.java:137)
at com.sun.media.jai.util.SunTileScheduler.scheduleTile(SunTileScheduler.java:904)
at javax.media.jai.OpImage.getTile(OpImage.java:1129)
at com.sun.media.jai.util.RequestJob.compute(SunTileScheduler.java:247)
at com.sun.media.jai.util.WorkerThread.run(SunTileScheduler.java:468)

I have the same problem but I have not still been able to solve it

It seems that the online resource is not available anymore.
I’ve already asked @oana_hogoiu, @kraftek to take care of this.

1 Like

Is this the new link where the CCI Landcover maps are available http://maps.elie.ucl.ac.be/CCI/viewer/download.php?

Where should i add the new address in this xml? Can you please help me?
add_landcover.xml (1.8 KB)

You cannot add a new location to the graph. This must be changed in the code.

I’m not sure if the location you point to is the suitable replacement.
But you can try to download it and collocate it with your data.

The land cover map cannot be downloaded manually as well. What should i do now?

Afterwards you filled in the form, you can download the data.

If the downloaded data does not help you probably just have to wait till it the issue is fixed.

The data cannot be downloaded from here even after logging in.

Can you please tell me how can I update the CCILandCoverModelDescriptor?

I guess you can’t or are you a developer and you can program Java?
If so, the first steps are described here:
SNAP development - SNAP - SNAP Wiki (atlassian.net)

And then you can update the URL here in this file:
s2tbx/CCILandCoverModelDescriptor.java at master · senbox-org/s2tbx (github.com) and maybe the filename need to be updated too for the new location.

In the end sending a pull request with the changes would be great.

I just heard that the developers are taking care of this.

1 Like

You are right. It would not be possible for me. However, i have been able to download the landcover map manually from here-https://data.ceda.ac.uk/neodc/esacci/land_cover/data/land_cover_maps/v2.0.7
But after downloading it manually what should i do? I have tried by doing a subset of the landcover map for my study area. then i was able to perform the step produce maps for the vegetation structural parameters. But when i am trying to perform the calculation of aerodynamic resistance then it shows the error.
ERROR:boolean index did not match indexed array along dimension 0; dimension is 351 but corresponding boolean dimension is 5490

Oh okay. Thank you so much for letting me know. Can you kindly tell me how long it would take approximately?
Sorry for bothering you so much regarding this issue. But since this work is for my MSc thesis and i have my deadline coming up thats why. Hope you would understand. Thank you so much again.

Hello.

If you managed to download the zip file (should be named ESACCI-LC-L4-LCCS-Map-300m-P1Y-2015-v2.0.7.zip), in order for SNAP to use it you should place it in the following location: ~/.snap/auxdata/LandCover/CCILandCover-2015/ (or, if you’re on Windows, in your user profile folder, such as C:\Users<your_user>.snap\auxdata\LandCover\CCILandCover-2015).

The new URL for downloading this land cover map will be available in a subsequent update.

1 Like

Then how should I cut my study area from the global landcover data?

If the data is placed in the folder @kratek mentioned, you can use the “Add Landcover Band” function. It is not downloaded anymore.

I have create a folder named LandCover and then keep the downloaded data in that folder right?
Then in SNAP i have to open the OutputMask product and then by right clicking should i perform add landcover band ? But this way still it starts to download and fails.

The download location you have found provides only the tif files.
Try this FTP: ftp://geo10.elie.ucl.ac.be/v207/
And download this: ESACCI-LC-L4-LCCS-Map-300m-P1Y-2015-v2.0.7.zip
and place it in the folder @kraftek mentioned.

If it still does not work you can extract the content from this file or use the tif you have already downloaded and try the Collocation function (Raster / Geometric / Collocation). There you can select the product you already have and the LandCover Classification. You can disable all the renaming options, because there is probably no naming conflict. The classification band will be named ‘band_1’, but you can rename it later.
Both approaches worked for me. Let us know if you still experience problems.

I have downloaded it in netcdf format.

I had the same problem and could fix it successfully.

As recommended above I downloaded six files from https://data.ceda.ac.uk/neodc/esacci/land_cover/data/land_cover_maps/v2.0.7 and put them into a *.zip file named ESACCI-LC-L4-LCCS-Map-300m-P1Y-2015-v2.0.7.zip (the files are ESACCI-LC-L4-LCCS-Map-300m-P1Y-2015-v2.0.7.tif, ESACCI-LC-L4-LCCS-Map-300m-P1Y-2015-v2.0.7b.nc, ESACCI-LC-Legend.csv, ESACCI-LCMapsColorLegend.dsr, ESACCI-LCMapsColorLegend.lyr, ESACCI-LCMapsColorLegend.qml).

I put the *zip-file to .snap\auxdata\LandCover\CCILandCover-2015 (on Win 10).

2 Likes