Snaphu plugin for SNAP

Hello
I am also facing problem regarding Snaphu.
I export the data and its generate 6 file.
after that i run the command in terminal but it doesn’t read the commnd given in configuration file.
Screen Shot 2020-09-09 at 8.13.46 PM
please help me.

in Linux you have to compile snaphu first. Was snaphu created successfully?

1 Like

my issue solved with this, my snaphu on Linux(ubuntu) was not okay.

thank you for the reference, big help. is there any other nice tutorial on finding displacement on ground surface, I work on earthquake

I made some more:

Also these are great references:

1 Like

Thanks for replying,
I am using Mac OS X and install snaphu completely.
Yes, I created snaphu successfully. But it didn’t read the configuration file command.

I have found that using the operation that calls snaphu inside SNAP to not always work. I prefer to call snaphu from the command line. The configuration file that you generated will have the proper command line operation to call (it should be something like "snaphu.exe -f configfile imageFile lineCount. Therefore, my process is:

snaphu Export -> run command line -> snaphu import.

In addition to being able to avoid the issues with calling it from SNAP, you get two other advantages:

  1. You can use SNAPHU v2.0, which adds the -S command line parameter. Calling this parameter will run snaphu normally, then run the unwrapped file back through snaphu with only a single tile. This will fix the visible striping where tiles overlap, and does not add much time to the processing.

  2. You can then run the snaphu command on every band. Running it through SNAP does not apply if you have a couple different interferometric pairs in the same product (i.e. a pair for day1-day2, a pair for day1-day3, and a pair for day2-day3)

2 Likes

That is great, thank you for mentioning it!

When I run snaphu in command line, it doesn’t work properly. Can you tell me what is the reason?

Screen Shot 2020-09-13 at 10.42.59 PM

as I suggested in the other topic, try the MST solver instead the MCF. You can simply modify the config file and run snaphu again. Deleting temporary files is recommended.

I tried it but it show this

Screen Shot 2020-09-15 at 6.40.04 PM

from last two hours.

please don’t distribute your questions over multiple topics.
I recommended multi-looking in the other topic (because of the file size) and asked for a screenshot of the interferogram:

Hello @ABraun,

I’m familiar with the PS analysis method. It seems that in your work InSAR Displacement mapping with ERS data, the process was carried out on the whole pixels.
Am I getting it right?
If so, what are the adventages and disadventages of this approach?

Thank you,
Oded Horowits

Differential InSAR (like in the tutorial) is suitable if you have movement between two images and high coherence to measure it. But whenever you want to detect changes over a longer period and vegetation cover decreases phase quality. You get more accurate results (at least you get a better feeling of random phase contributions), but you need excessively more data and the processing is more complex.

1 Like

Hi, all. (not sure if this is the right place or I should start a new conversation.)
I was following the interferometry tutorial and successfully installed snaphu. But when trying to run Snaphu Export, the following prompt appears at the bottom left and if I ignore it and go ahead, the same message appears in a new window. Error: [NodeId: Read] The ‘file’ parameter is not set. If I understood correctly, the selected folder must be the same as where the previous outputs are saved? Any help is welcome! Thanks.

In the Read tab you select the last interferogram you produced in SNAP, not a folder. The directory doesn’t matter at this stage.

Thanks! Actually I think the problem was more me not restarting the computer after installing the plugin or something of the sort because today I did the same as Friday and didn’t get the same error.

Hi, all.
Not sure if i should ask this in new conversation.
I am trying to perform snaphu unwrapping on snappy and getting following error in last step-

Error on transforming template for parameter 'copyFilesTemplate

The part of code that i am running on python-

Hi, can you also share what is above

There should be a point where the stack trace starts.
It would be also good if you could copy the text instead of sharing the image. This way, the problem can be traced more easily.

(snap) C:\Users\Harshit\Desktop>python “till tc.py”
INFO: org.esa.s2tbx.dataio.gdal.GDALVersion: GDAL 2.2.2 found on system. JNI driver will be used.
INFO: org.esa.s2tbx.dataio.gdal.GDALVersion: Installed GDAL 2.2.2 set to be used by SNAP.
INFO: org.esa.snap.core.gpf.operators.tooladapter.ToolAdapterIO: Initializing external tool adapters
INFO: org.esa.snap.core.util.EngineVersionCheckActivator: Please check regularly for new updates for the best SNAP experience.
INFO: org.esa.s2tbx.dataio.gdal.GDALVersion: Installed GDAL 2.2.2 set to be used by SNAP.
a
20221013T125546
('folder is this ', ‘S1A_IW_SLC__1SDV_20221013T125546_20221013T125614_045424_056E94_7E77.SAFE’)
72
a
20221025T125547
('folder is this ', ‘S1A_IW_SLC__1SDV_20221025T125547_20221025T125615_045599_0573C6_D74C.SAFE’)
72
Reading…
INFO: org.hsqldb.persist.Logger: dataFileCache open start
SEVERE: org.esa.snap.core.gpf.operators.tooladapter.ToolAdapterOp: Error processing template before execution for parameter [copyFilesTemplate]
SEVERE: com.sun.xml.bind.v2.util.XmlFactory: null
org.xml.sax.SAXNotRecognizedException: Feature ‘http://javax.xml.XMLConstants/feature/secure-processing’ is not recognized.
at org.apache.xerces.parsers.AbstractSAXParser.setFeature(Unknown Source)
at org.apache.xerces.jaxp.SAXParserImpl.setFeatures(Unknown Source)
at org.apache.xerces.jaxp.SAXParserImpl.(Unknown Source)
at org.apache.xerces.jaxp.SAXParserFactoryImpl.newSAXParserImpl(Unknown Source)
at org.apache.xerces.jaxp.SAXParserFactoryImpl.setFeature(Unknown Source)
at com.sun.xml.bind.v2.util.XmlFactory.createParserFactory(XmlFactory.java:106)
at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.getXMLReader(UnmarshallerImpl.java:124)
at javax.xml.bind.helpers.AbstractUnmarshallerImpl.unmarshal(AbstractUnmarshallerImpl.java:157)
at javax.xml.bind.helpers.AbstractUnmarshallerImpl.unmarshal(AbstractUnmarshallerImpl.java:214)
at it.geosolutions.imageioimpl.plugins.tiff.gdal.GDALMetadataParser.parse(GDALMetadataParser.java:60)
at it.geosolutions.imageioimpl.plugins.tiff.TIFFImageReader.initializeFromMetadata(TIFFImageReader.java:1337)
at it.geosolutions.imageioimpl.plugins.tiff.TIFFImageReader.seekToImage(TIFFImageReader.java:865)
at it.geosolutions.imageioimpl.plugins.tiff.TIFFImageReader.seekToImage(TIFFImageReader.java:822)
at it.geosolutions.imageioimpl.plugins.tiff.TIFFImageReader.getWidth(TIFFImageReader.java:1080)
at org.esa.snap.dataio.geotiff.GeoTiffImageReader.getImageWidth(GeoTiffImageReader.java:160)
at org.esa.snap.dataio.geotiff.GeoTiffProductReader.readProduct(GeoTiffProductReader.java:230)
at org.esa.snap.dataio.geotiff.GeoTiffProductReader.readProductNodesImpl(GeoTiffProductReader.java:136)
at org.esa.snap.core.dataio.AbstractProductReader.readProductNodes(AbstractProductReader.java:178)
at org.esa.snap.core.dataio.ProductIO.readProductImpl(ProductIO.java:257)
at org.esa.snap.core.dataio.ProductIO.readProduct(ProductIO.java:227)
at org.esa.snap.core.gpf.operators.tooladapter.ToolAdapterOp.postExecute(ToolAdapterOp.java:402)
at org.esa.snap.core.gpf.operators.tooladapter.ToolAdapterOp.initialize(ToolAdapterOp.java:224)
at org.esa.snap.core.gpf.internal.OperatorContext.initializeOperator(OperatorContext.java:528)
at org.esa.snap.core.gpf.internal.OperatorContext.getTargetProduct(OperatorContext.java:298)
at org.esa.snap.core.gpf.Operator.getTargetProduct(Operator.java:385)
at org.esa.snap.core.gpf.GPF.createProductNS(GPF.java:333)
at org.esa.snap.core.gpf.GPF.createProduct(GPF.java:268)
at org.esa.snap.core.gpf.GPF.createProduct(GPF.java:201)
at org.esa.snap.core.gpf.GPF.createProduct(GPF.java:180)

Traceback (most recent call last):
File “till tc.py”, line 236, in
GPF.createProduct(‘snaphu-unwrapping’, parameters, product)
RuntimeError: org.esa.snap.core.gpf.OperatorException: Error on transforming template for parameter 'copyFilesTemplate

(snap) C:\Users\Harshit\Desktop>