Snap2stamps package: a free tool to automate the SNAP-StaMPS Workflow

Hallo @mdelgado thank for snap2stamps.
I already run splitting_slaves.py and slaves_prep.py it’s going well no have problem. But when I try coreg_ifg_topsar.py I found some problem:
Error: [NodeId: Subset(2)] Operator ‘SubsetOp’: Could not parse geometry.

can you tell me what’s wrong with my step?
I already try various name format for master.

error:

master name format:
image

Thank for everything…

It could be related to the coordinates defined in the config file. Can you please share it here as well?

1 Like

Thanks @ABraun. In fact I suspect that the error should come from there.
Let us know

Thank you @ABraun and @mdelgado for your reply.
I just fix my config file, but found another error I think it come from my memory not enough.

image

The Master image should not contain IW3…
I think this is creating the issue.
I hope this helps
Best regards

Hi,

Do you have the Docker image available somewhere on Docker Hub? @andretheronsa I am trying to achieve exactly the same.

First of all, thanks for your work on snap2stamps @mdelgado ! When I try to run the scripts with 2 sample S-1 images, the scripts run without error, but they do not produce any output. When trying coreg_if_topsar.py script, I get the following error:

 Error: [NodeId: Subset(2)] Operator 'SubsetOp': Could not parse geometry.

Here is my config file:

Could the problem originate in not specifying a BBOX? Or is it not necessary?

Thanks

Exactly. You should either defined the BBOX in the project.conf or change the graphxml template from the coreg_ifg_computation.py to use the xml without subset in the name.

Let me know

Works great! Thank you. I also used the scripts in Python 3, after some simple adjustments, which works fine.

2 Likes

Do you feel like contributing on the next package version for supporting also python 3?
Feel free to share with us your code. Now I am just developing new improvements but always only for the version 2.7.

Thanks

@mdelgado Yes I would love to! I will send you the python 3 code for the current version and would not mind contributing for the next package version. Just tell me how to get in touch.

Thanks

hello~~Thank for snap2StaMPS again.
I wanna ask a question about “SNAP2StaMPS_CONFIG.bash”
Should I add it to ~/.bashrc before the python process?

Is it not strictly necessary to use the SNAP2StaMPS_CONFIG.bash, you could directly add to the PATH variable the bin folder containing the python scripts of the package.

But once modified the SNAP2StaMPS_CONFIG.bash file (if you want to use it), yes, you can add it into the .bashrc for avoiding to load it every time.

I hope I have answered your question

1 Like

Thank a lot !!!
I just occur some error

[3] Folder: 20170421
/Users/ray303/Desktop/2017landslide/PROJECT/slaves/20170421
['/Users/ray303/Desktop/2017landslide/PROJECT/slaves/20170421/S1A_IW_SLC__1SDV_20170421T100023_20170421T100053_016241_01ADB3_11F3.zip']
FILE(s) :     /Users/ray303/Desktop/2017landslide/PROJECT/slaves/20170421/S1A_IW_SLC__1SDV_20170421T100023_20170421T100053_016241_01ADB3_11F3.zip
['/Applications/snap/bin/gpt', '/Users/ray303/Desktop/2017landslide/PROJECT/graphs/splitgraph2run.xml', '-c', '16G', '-q', '8']
SNAP STDOUT:INFO: org.esa.snap.core.gpf.operators.tooladapter.ToolAdapterIO: Initializing external tool adapters
INFO: org.esa.s2tbx.dataio.gdal.activator.GDALDistributionInstaller: No distribution folder found on Macintosh.
Executing processing graph
SEVERE: org.esa.snap.core.dataop.downloadable.XMLSupport: Path to xml is not valid: invalid LOC header (bad signature)
SEVERE: org.esa.s1tbx.commons.io.SARReader: org.esa.s1tbx.io.sentinel1.Sentinel1ProductReader
[input=/Users/ray303/Desktop/2017landslide/PROJECT/slaves/20170421/S1A_IW_SLC__1SDV_20170421T100023_20170421T100053_016241_01ADB3_11F3.zip]:
invalid LOC header (bad signature)
 done.

Error: [NodeId: Read] org.esa.s1tbx.io.sentinel1.Sentinel1ProductReader
[input=/Users/ray303/Desktop/2017landslide/PROJECT/slaves/20170421/S1A_IW_SLC__1SDV_20170421T100023_20170421T100053_016241_01ADB3_11F3.zip]:
invalid LOC header (bad signature)

[3] Finished process in 3.54374599457 seconds.

#####################################################################

[4] Folder: 20170503
/Users/ray303/Desktop/2017landslide/PROJECT/slaves/20170503
 ['/Users/ray303/Desktop/2017landslide/PROJECT/slaves/20170503/S1A_IW_SLC__1SDV_20170503T100024_20170503T100054_016416_01B302_4330.zip']
FILE(s) :      /Users/ray303/Desktop/2017landslide/PROJECT/slaves/20170503/S1A_IW_SLC__1SDV_20170503T100024_20170503T100054_016416_01B302_4330.zip
['/Applications/snap/bin/gpt', '/Users/ray303/Desktop/2017landslide/PROJECT/graphs/splitgraph2run.xml', '-c', '16G', '-q', '8']
SNAP STDOUT:INFO: org.esa.snap.core.gpf.operators.tooladapter.ToolAdapterIO: Initializing external tool adapters
INFO: org.esa.s2tbx.dataio.gdal.activator.GDALDistributionInstaller: No distribution folder found on Macintosh.
Executing processing graph
INFO: org.hsqldb.persist.Logger: dataFileCache open start
....10%....20%....30%....40%....50%....60%....70%....80%....90% done.

[4] Finished process in 21.3632209301 seconds.
Split slave    
['/Users/ray303/Desktop/2017landslide/PROJECT/slaves/20170503/S1A_IW_SLC__1SDV_20170503T100024_20170503T100054_016416_01B302_4330.zip'] successfully completed.

I run 14 images for the process of splitting_slaves.
However, some images are fine, but some images are happening ERROR: invalid LOC header (bad signature).
I don’t know how to solve the error.
All the images are splitting well when running TOPS-split method in SNAP.

could it be that image #3 from 21.07.2017 wasn’t correctly downloaded?
Check and compare the fize sizes and try to open this one in SNAP.

1 Like

In fact, that could be the reason.
The error log comes from SNAP and not from the scripts.

Let us know

Hello @ABraun @mdelgado Thanks~~You are right!!
The problem come from image format that SNAP cannot read either.
The images of 2017 were all unzip, so I zipped the file for slaves.


renaming: S1A_IW_SLC__1SDV_20170421T100023_20170421T100053_016241_01ADB3_11F3.zip
But it failed, SNAP cannot read this kind of zip.
And I try to put all the upzip data in each slave folder also failed.

So I run the process of split and orbit in SNAP for each image and save the right format(include name) into ‘split’ folder.
It seem workable for next step(core_ifg_topsar.py)!!

THANK AGAIN!! I am going to try next step!

1 Like

very good!

Dear all,
hope you can give me an advice what can be the problem. The first script (slaves_prep.py) was running fine, but when I try to start the second script I got the following error message (subprocess.py). Attached are the *.conf file and the error message. Thanks for your help!
OS: Windows 10


project_test.conf (598 Bytes)

You should define in the project_test.conf the full path to the GPT executable (should be something like C:/Program FIles/snap/bin/gpt.exe )

I hope this helps
Please check and let me know.
Cheers

1 Like

Thanks a lot ! Your hint solved the problem.
best regards

1 Like