SNAP FAQs



 

Where can I download SNAP?

SNAP and the toolboxes can be downloaded from the STEP web page at https://step.esa.int/

How to update SNAP?

Updating SNAP via the GUI is easy. Simply select the menu entry “Help / Check for Updates”. This will check if updates are available, if so you just need to follow the wizard.
If you want to update SNAP via the command line, then please follow this guide Update SNAP from the command line

How to fix a corrupted module update?

Sometimes it can happen that the update process of SNAP is corrupted and strange error can be observed afterwards, e.g., missing components, inactive functions etc.
You can either uninstall snap (ensure to mark the option to remove all data) and then reinstall SNAP. Afterwards you need to update the modules again. Alternatively, you can simply erase the corrupted modules and download them again. To do so,

On Windows, go to the appData folder:
Press WINDOWS+R and type appdata in the upcoming dialog and press enter. Then navigate to \Roaming\SNAP\.
There delete the folders modules, update and update_tracking.

On Unix, you need to navigate to <user_home>/.snap/system
There delete the folders modules, update and update_tracking.

Afterwards SNAP should start like after a clean installation. And you can do the update again.

What are the minimal requirements for SNAP?

To give minimal requirements for SNAP is not easy. It depends very much on what you are using SNAP for. It depends on which data you use, medium or high resolution, and what kind of processing you perform.
As for the CPU, the faster the better. But for the memory you can use SNAP starting already with 8GB of RAM, even 4GB would work for small low-resolution data. In general, we would recommend having at least 16GB of memory. For some processing operations, e.g., SAR processing it is suggested to have 32GB or more.

If you do not meet the memory requirements for your use case, you will see errors like those described in this FAQ-entry:

I'm getting the error "Cannot-construct-DataBuffer", "GC-overhead-limit-exceeded" or "Java-Heap-Space". What-can-I-do?

How should I cite SNAP?

If you want to cite SNAP you can use the following suggestion:

SNAP - ESA Sentinel Application Platform v{LATEST-VERSION}, http://step.esa.int

A specific Toolbox can be cited like:

S1TBX - ESA Sentinel-1 Toolbox v{LATEST-VERSION}, http://step.esa.int/

Just replace {LATEST-VERSION} with the actual version, e.g.

SNAP - ESA Sentinel Application Platform v6.0.7, http://step.esa.int 

S1TBX - ESA Sentinel-1 Toolbox v7.0.1, http://step.esa.int/

How to find the log files?

  • You can find the log files by selecting from SNAP Desktop the menu entry Help / Show Log Directory.
    This will open the file explorer where the logs are located.
    Make sure to reproduce the error first and then attach the messages.log file.
    The logs of 2 previous SNAP sessions are stored in messages.log.1 and messages.log.2

How to change the log level?

The log level defines which messages are printed to the log file and the console?

The available levels are:

  • OFF (highest value)

  • SEVERE

  • WARNING

  • INFO

  • CONFIG

  • FINE

  • FINER

  • FINEST

  • ALL (lowest value)

Each message has a level assigned and the log system has configured level too. The message is only printed to the console or the log file if the level of the message is higher or equals as the configured level of the log system. To change which messages are considered the level of the logging system needs to be changed. This can be done by setting a property:

-Dsnap.log.level=<LEVEL>

This property can be set in the snap.properties, the gpt.vmoptions and the pconvert.vmoptions files. It is also possible to add this property to the command line call.
In the snap.properties the prefix -D must be removed.

It can happen that some messages are still printedeven if the level is set to OFF. For example by third party libraries or plugins which do not use the logging system of SNAP but use other means to print messages.

 

What to include in a forum post when reporting an issue?

Before you open a new topic, please use the search function of the forum to check if your problem is already discussed in existing topics. To keep the forum structure clean, please consider continuing discussions in existing topics before creating a new topic on similar issues. Once your post has been submitted, the corresponding topic will automatically be visible at the top of the topic list.

When reporting an issue, try to include as much information as possible to allow developers to reproduce the problem including:

  • Toolbox version and operating system, amount of RAM

  • Identify the relevant satellite products by giving the full name of the product

  • List the exact processing steps needed to recreate the issue

  • Attach relevant screen captures and resulting images (copy and paste function)

  • Attach the log file to your post. See SNAP FAQs | How to find the log files?

  • In case you processed a graph file, please upload the XML as well (using the upload button)

  • It also helps to understand when you shortly describe your overall aim (e.g. water change detection, vegetation monitoring...)

  • In case you get an error message, please include it in your question (again, please also check the search function if this error message has already been reported/solved)

  • If you work with multiple products, please mention if the error occurs for all of them or just for one specific product.

 

I’m behind a proxy and having difficulties connecting to servers. What can I do?

You can try to add the proxy settings as system properties, either to gpt.vmoptions in the bin directory or to snap.conf in the etc directory of the SNAP installation folder. Depending on what you execute SNAP Desktop or gpt.

The following page from Oracle might be helpful: Java Networking and Proxies (oracle.com)

The settings should be like:

-Dhttp.proxyHost=http.proxy.ip
-Dhttp.proxyPort=NNNN
-Dhttps.proxyHost=https.proxy.ip
-Dhttps.proxyPort=MMMM

Where http(s).proxy.ip is the IP address of your proxy server and NNNN, MMMM their respective ports.

The problem might also originate from IPv6 and IPv4 support.

Try setting the property -Djava.net.preferIPv4Stack=true in the gpt.vmoptions file
and to the snap.conf file (without ‘-D’) in the etc folder.

 

What does the “dl” unit mean?

The dl means dimensionless. The variable has no unit.

https://en.wikipedia.org/wiki/Reflectance#SI_radiometry_units

How to create an RGB composite from individual bands?

When having 3 data products with the individual bands for the channels of the RGB image you want to create, you needed to reference the products in the expressions of the RGB Image creation dialogue.

Right-click on one product and select “Open RGB Image Window“. In the example image, all bands have the same name ‘band_1' and you have to reference the correct product for the channels. Each product has a reference number which you can see in the Product Explorer. To reference ‘band_1’ in product 2 use the expression '$2.band_1'.
That’s the quickest way.

Alternatively, you can copy all bands into one product and save it for later use.
Therefore, you open the Band Maths and use one of the products as the target. To copy the other bands, use the same expression as in the RGB Image dialogue. Make sure to disable the Virtual option.
You can also specify a new name for the copied bands. Finally, you change the name of the already existing band in the target product and then you can save this product. To create an RGB now, you just open the RGB image dialogue and select the bands. If you name same Red, Green, Blue, they get automatically selected.

All bands need to have the same size. If they have different sizes, you need to resample them to a common size. You can use the resampling operation to do this.

Why are RGB images differently colorised and not comparable?

The different results of the RGB image creation results from the process how SNAP creates images.

The value range of a band is taken and clipped by 2.5% at the upper and lower end of the range. This is done to remove outliers.
But still the ranges can vary from image to image. SNAP now uses this range to create the image and creates the colour stretch. This leads to the different results.

You can overcome this by changing the colour stretch in the Colour Manipulation tool manually.

Another way of doing this is to clip the values already in the expressions of the RGB profile.

For Sentinel-2 the suitable expressions could look like:

blue=B2 < 0 ? 0 : B2 > 0.25 ? 0.25 : B2
green=B3 < 0 ? 0 : B3 > 0.3 ? 0.3 : B3
red=B4 < 0 ? 0 : B4 > 0.35 ? 0.35 : B4

For Sentinel-3 OLCI one could use these:

blue=Oa04_radiance < 0 ? 0 : Oa04_radiance > 430 ? 430 : Oa04_radiance
green=Oa06_radiance < 0 ? 0 : Oa06_radiance > 430 ? 430 : Oa06_radiance
red=Oa09_radiance < 0 ? 0 : Oa09_radiance > 430 ? 430 : Oa09_radiance

 

Here you can download the pre-defined profiles. You can load them into SNAP when creating an RGB image and save them for later use.

 

Actually, the same issue with varying colourisation applies to grey scaled images and not only to RGB images. Here you can use the Colour Manipulation tool to harmonise the image creation.

How to move the `.snap` directory to a different location?

For the SNAP Desktop:

Edit the snap.conf in the etc folder of the SNAP installation directory. You need administration rights to edit this file.

Inside you see the default_options string.

Add -J-Dsnap.userdir=C:\temp\mySnapDir to it or the path to another location. In the end you it will look like:
default_options="--branding snap --locale en_GB -J-XX:+AggressiveOpts -J-Xverify:none -J-Xms256M -J-Xmx11G -J-Dsnap.userdir=C:\temp\mySnapDir -J-Dnetbeans.mainclass=org.esa.snap.main.Main -J-Dsun.java2d.noddraw=true -J-Dsun.awt.nopixfmt=true -J-Dsun.java2d.dpiaware=false"

For gpt or pconvert:

Edit the corresponding gpt.vmoptions or the pconvert.vmoptions file. They are located in the bin folder of the SNAP installation directory. Simply add the line:

-Dsnap.userdir=C:\temp\mySnapDir

I have problems with the 3D World View on Linux, can I disable it?

The World Wind View causes sometimes trouble on Linux, especially in VMs. This is often caused by the 3D graphics card driver. Updating the driver might help and if you are in a VM it might help to enable 3D support. You can try to switch the World Wind View in to the flat mode. This can be done in the options panel in the World Wind tab of the General section or paste this property

into the snap.properties file which is located in the etc folder of the SNAP installation directory. If this still does not help you can remove the World Wind View module. Delete snap/modules/org-esa-snap-snap-worldwind.jar within the installation directory. If you then start SNAP, you get a warning that this module is missing. Accept it and let SNAP remember the decision. As a replacement, you can use the old-world map. You can find it at View / Tool Windows / World Map in the menu

See also: https://forum.step.esa.int/t/issues-observations-comments-of-snap-6-0-beta/6722/9

How can I get WorldWind to work? I see a blank window in the World View.

To use the WorldWind World Map, a 3D video card with updated drivers is necessary. Update your video card drivers. (How to update Windows drivers) (ATI/AMDNvidiaIntel). Some known issues exist with using WorldWind within a virtual machine such as VirtualBox.

I'm getting the error “Cannot construct DataBuffer”, “GC overhead limit exceeded” or “Java Heap Space”. What can I do?

This error indicates that you don't have enough memory. Either your system does not have enough memory (RAM) or the configuration for SNAP is not sufficient. If you have already worked with SNAP over a considerable time and many products are opened, it is advisable to close and restart SNAP and only open the product you really need for further processing. This often already releases a lot of memory and allows to continue. If this does not help, you can try to improve the memory configuration as described in the following.

For the SNAP Desktop application, you can increase the amount of memory available to SNAP (depending on how much RAM is installed on your computer). In the 'etc' folder of the SNAP installation directory, you'll find a file named snap.conf. Open it in a text editor. There is the line which starts with 'default_options='

In this line, you'll find an option like -J-Xmx5G. It defines how much of your total available RAM can be used by SNAP. By default, it is set to ~75% of the maximum value (here: 5G stands for 5 of 8 gigabytes of RAM). In case your system has more RAM, you can increase the -J-Xmx value. For 16 GB RAM, you could set the value to 12G, for 32 GB RAM to 24G and so on. For systems with more RAM, it was reported (here) that already 50% of the available RAM is a suitable setting and more effective than 75%. A second option is to increase the cache size (by default 1024) to 2048 or 4096. This can be done in the SNAP under Tools\Options in the Performance tab. This tab also allows you to find the ideal configuration of your system using a selected benchmark operator and clicking "compute". If you experience the error on the command line with gpt or pconvert you need to change different files. You need to change the corresponding vmoptions files, either gpt.vmoptions or pconvert.vmoptions (in the 'bin' folder). Change the value after -Xmx in the last line.

Note: In addition, it can help to quit applications currently not used. This can free memory being used by SNAP for the processing. Applications worth to be quit, can be monitored by monitoring tools of the operating system.

Related questions

How to increase memory for snappy?

You need to change the configuration in the snappy.ini file. The file is in the snappy folder. Change the line

to e.g.

This means that snappy can use 6GB of your RAM. A recommended value is 70%-80% of the available RAM in your system.

How can I automate processing steps?

The Graph Builder (under Tools) lets you define entire chains of workflows, starting with reading a product and ending with writing the final output. It is documented in this video. Each graph is stored as an XML file which defines all steps and parameters in the correct order. Once you have saved an XML file you can use the Batch Processing to apply it to a list of input products as demonstrated here. To run processing chains from the command line (without the SNAP GUI), please follow these instructions: Bulk Processing with GPT. If your graph consists of many steps, please have a look at the Tile Cache Operator: How to Use Tile Cache Operator to Improve Memory Consumption

Related questions

When processing an XML graph, I get an error saying something like “unexpected character in markup”?

Some characters have special meanings in XML. If they are used for other purposes, for example in an expression they need to be escaped.

These characters are: “ ' < > &

Character

Escaped

Character

Escaped

&quot;

'

&apos;

<

&lt;

>

&gt;

&

&amp;

An expression like this: B8 > 0 && B8 < 0.1

Needs to be written like: B8 %gt; 0 &amp;&amp; B8 &lt; 0.1

More details are on Stackoverflow.

How do I know how I have processed my data, with which parameters values?

The BEAM-DIMAP format (standard processing format in SNAP) stores all processing steps, including their input/output products, variables and parameters, in the metadata. You can find it in each product under Metadata > Processing Graph. Each node stands for one operation and contains sources and parameters. After every operator, the node of the WriteOp operator defines the name and location of the output product separately.

Besides the Processing Graph, there is sometimes a history folder in the Metadata section which also stores information on previous processing steps, e.g. the extents of a created subset.

Why should I stick to the BEAM-DIMAP format as long as possible?

The BEAM-DIMAP format is the default output format for all products generated in SNAP. It allows fast reading and writing of raster products, and most importantly, efficient handling of their metadata. Metadata store information on geocoding, dimensions, acquisition date, sensor specifics, etc. These information deliver important inputs for many operators in SNAP. Once a BEAM-DIMAP product is exported, for instance to a GeoTiff, many attributes of the metadata are no longer part of the raster product. Accordingly, SNAP cannot process them correctly, because meta information is missing (and cannot be restored from the GeoTiff after converting back to BEAM-DIMAP). It is therefore advised that you stick to the BEAM DIMAP format as long as possible and only convert or export it to a different format when your processing in SNAP is done.

I want to use a product processed in SNAP in another software

If you want to continue the processing or visualization of your data in another software (such as QGIS, ArcMap, ENVI, Erdas IMAGINE, Matlab ect...), you can use one of the output formats listed under File > Export.

However, exporting to other formats has disadvantages: Firstly, the BEAM DIMAP is the only format which grants the correct storage of all metadata (see the previous question). Secondly, conversion to different formats involves the risk of changes in the data type and precision (e.g. less decimal places, or 16 bit integer instead of 32 bit float). Therefore, exporting should be avoided where possible.

Solution: The data generated in SNAP is stored as in the BEAM DIMAP format. It is fully compatible according to the OGC standards and can directly read in most software packages, such as QGIS or ArcMap. Each BEAM DIMAP product consists of two elements

  • .dim: This file contains all metadata in a XML structure

  • .data: This directory contains all raster products (.img + .hdr), tie-point grids and vectors (stored as WKT)

If you want to open a raster in external software, navigate to your products location, go inside the .data folder and you find all rasters belonging to this product, stored as .img files with their corresponding header files (.hdr). QGIS, ArcMap and ENVI can directly read these products without further need for conversion.

Please also have a look at this tutorial for more explanations and examples: Export of products from SNAP

Related questions

What is a virtual band?

The BEAM DIMAP format, which is the standard processing format in SNAP, writes all rasters as .img files in the .data directory of the product folder. However, there are tools which only write virtual products:

  • Band Maths (unless you disable the "Virtual" option

    )

  • Conversion from/to dB

  • Filtered Band... (from the context menu)

  • and some others.

These tools do not create a physical band but a virtual one. They are characterized by a white V in the band icon:

As long as a band is virtual, it is not written on your hard drive. Instead, it is only defined based on a logical or mathematical expression. You can see this in the Pixel Value Expression in the band properties. This allows you to work with raster bands without the need to store them on your drive. However, the virtual bands can only be displayed and processed as long as the bands which were used to create them are stored in the same product. If you delete the original band (here: Sigma0_HH), the virtual band is no longer usable, because the expression points to information which is no longer present. Furthermore, displaying virtual bands can take a longer time because SNAP computes them on-the-fly (which is RAM-intensive).

To make a virtual band permanent, you can right-click it and select "Convert Band". Then click on File > Save Product to make these changes permanent. The band is then also written into the .data folder of your product and can be used independently from the original band.

Related questions

What are flags and how should I interpret them?

Flags are binary information about a certain pixel. You might now that computer data consists of bytes and bytes consist of 8 bits. Each flag is represented by one bit. 8 flags can be stored in one byte.
Each of the flags (bits) has a special meaning. Usually binary information. The flag indicates if the corresponding pixel is a land or a water pixel or if it is cloudy or it has been processed in a certain way.
Assuming we have a byte, which contains 3 flags.

Meaning

Bit 2

Bit 1

Bit 0

Byte Value

Meaning

Bit 2

Bit 1

Bit 0

Byte Value

LAND

0

0

1

1

WATER

0

1

0

2

CLOUD

1

0

0

4

So far it is easy. But you can have clouds over water, for example. Then the byte value or flags value would be a combination of both single flags (here 6).

If you now are just confronted with the value 6 how can you find out which flags are set? Usually, this is done by SNAP for you and the flags are shown in the Pixel Info View.
But sometimes you need to do it on your own, e.g in your own code. (SNAP offers also easy solutions for this case).
To find out which flags are set you need to do bit operations the value.

For further details please have a look at the Wikipedia pages about Bits and Bitwise operations

What is the difference between flags and masks?

For a description of Flags see the question ‘What are flags and how should I interpret them?’.
Masks are often based on flags. This allows you to mask water pixels in your data, for example. But masks can also be defined differently. For example, by an expression or by a drawn rectangle or by a shapefile which has been loaded. Masks are often used as a Region-Of-Interest (ROI). For instance, when computing statistics in SNAP you can select a mask as the ROI. Then the statistic is only computed with the ROI.

Why do the pixel values differ after export to GeoTiff compared to those in SNAP?

This can have various reasons.

  1. Please select the band in the Product Explorer and select from the Menu > Analysis > Information. Please carefully check the entries on Geophysical data type vs. Raw data type (how SNAP displays the data vs. how the data is actually stored, e.g. Sentinel-2 bands are stored as 16-bit integers (full numbers), but displayed as 32-bit float (decimal values)
    Scaling factor and Scaling offset (the factor defines if the actual pixels are multiplied by a constant, e.g. Sentinel-2 bands are multiplied by 1.0E4 (divided by 10000) so the pixels are displayed as reflectance between 0 and 1)
    No-data value (defines which pixels are displayed transparently in SNAP)
    Valid-pixel expression (allows to mask out pixels in SNAP according to a logical or mathematical expression)
    → All these definitions are only valid in SNAP and not considered when exporting to GeoTiff or other external formats. They must be taken into consideration accordingly.

  2. As every external format has its own specifications on the maximum file size and detail, conversion errors can occur (e.g. 16 bit (0-32786) before conversion vs. 8 bit (0-255) after conversion).

Please also have a look at this tutorial: Export of products from SNAP

Related questions

How can I export pixel value for specific points?

In SNAP you have different ways to do this. It depends on your needs which way to go.

  • You can set Pins at the pixel location you are interested in. and then use the functionality of the Pin Manager to export the values. Have a look at the SNAP help for details.

  • You can draw geometry on the image and then export the pixel of the transect. Right-click on the image view and then select 'Export Transect Pixels'.
    This will export only the pixels of the outline of a geometry.

  • You can draw geometry on the image and then export the pixel of the transect. Right-click on the image view and then select 'Export Mask Pixels'. This will export the whole area covered by the geometry.

  • You can also export the Product as ASCII file. Select from the menu File / Export / CSV. Make sure that you create a subset of your product and tailor the product to the region you are interested in. The exported files are getting very big quickly.

  • In the menu at Raster / Export /Extract Pixel Values is another option available. Here you can define multiple coordinates by geo-location (and time) and extract the values from a stack of data products. This operation can also be invoked from the command line via the got tool. Have a look at the SNAP help for details.

The help pages are not showing up when clicking on the help button?

Sometimes it can happen that one plugin breaks the whole help system. Provide the list of installed plugins in the forum along with the problem description. A developer can have look at your problem.
Open in SNAP Desktop the plugin dialogue and switch to the Installed tab and make a screenshot.
On the command line you can follow what is written on this page: Update SNAP from the command line. Perform what is written in the “List all modules” section.

Where can I find tutorials on SNAP?

Many tutorials a linked on the STEP page in the Tutorial section. More guides und how-tos can be found in the SNAP wiki.

How to maintain GPT performance as fast as possible?

For best performance, it is good to have a lot of RAM available. The amount the gpt tool can use, can be adjusted in the gpt.vmoptions file.

Related questions

How do I specify intermediate and final output file names or do I need to specify the file names?

In order to write intermediate results to disk you need to add the Write operator to the graph. For the final result a Write operator is added automatically to the graph by gpt. So, all you need is to specify the target on the command line.

How to best batch the gpt e.g. using just DOS-batch or using python

For batch processing there is an example available in our SNAP wiki.
For python there are meanwhile some examples available in this forum. Probably reading this thread (Example script for multiple operations?) will help you.
But you can also do batch processing from the Desktop application. See in the menu at Tools --> Batch Processing.

It depends on you what you like most.

Related questions

Are there recommended graphs or example graphs available?

Recommended graphs can be found in the Graphs menu of the Graph Builder.

Related questions

A process related to digital elevation models is taking forever to finish

In January 2021 the source for SRTM 3Sec data which are automatically downloaded by SNAP has changed. Since then, SNAP tries to access the resources, but cannot find them any longer. This affects the following tools:

  • Range Doppler Terrain Correction

  • SAR Simulation and SAR Simulation Terrain Correction

  • S1 BackGeocoding

  • Topographic Phase Removal (also contained in Interferogram formation)

  • Orthorectification

  • Land/Sea Mask

  • Add Elevation Band

  • StaMPS export (should not require elevation data but still wants to establish a connection)

and potentially other operatos which try to acceess digital elevation data, for example like this

This will be fixed by an update soon which leads SNAP to the new location of these data. Until then, you can help yourself by the following solutions:

  1. Solution: Please update SNAP, the update from 03.02.2021 (v 8.0.3) fixes the problem.

  2. Alternative 1: Select SRTM 1Sec (AutoDownload) instead whenever possible. These should work regardless of the location of SRTM 3Sec data.

  3. Alternative 2 (no longer required, the update fixes it): You can tell SNAP the new location of the SRTM 3Sec data like this:

  • Go to your SNAP installation directory (e.g. C:\Program Files\snap) and go inside the ect folder where you find the file snap.auxdata.properties

  • Open it with a text editor (maybe needs administrator privilleges) and go to line 27 which defines the location of SRTM 3Sec data. Change it from
    DEM.srtm3GeoTiffDEM_HTTP = http://cgiar-csi-srtm.openterrain.org.s3.amazonaws.com/source/
    to
    DEM.srtm3GeoTiffDEM_HTTP = http://skywatch-auxdata.s3-us-west-2.amazonaws.com/dem/SRTM90/tiff/

  • Save the file and restart SNAP.

The processes should then work again. If you still encounter issues, it might be that SNAP has already downloaded parts of the elevation file but could not finish the download, leading to incomplete or corrupted files. You can solve this by manually deleting them. You find the automatically downloaded digital elevation models in your user directory (user\.snap\aux\dem\SRTM 3Sec) where zip files are stored (e.g. srtm_35_05.zip). Once you delete all of them, especially the ones which are only 1 KB large, SNAP will re-download all tiles required for the processing of an product, and the process should finish as usual.