Snappy: Apply Orbit File Operator Alias


Looking to create python scripts to process Sentinel-1 data (Apply Orbit File, Calibration, Speckle Filtering, Terrain Correction).

I’ve followed these instructions, and the 1st contact worked perfectly. I’m also able to view all of the Operators using the ‘gpt -h’ command.

However I’ve come across an issue with my attempt to apply the orbit files using the following code (created with the use of these topics [1,2,3]):

from snappy import ProductIO, GPF, HashMap

data = ProductIO.readProduct('E:/Snappy/')

params = HashMap()
orbit = GPF.createProduct("Apply-Orbit-File", params, data)

outfile = 'E:/Snappy/S1_Orbit'

ProductIO.writeProduct(orbit, outfile, 'BEAM-DIMAP')

It returns the error “RuntimeError: org.esa.snap.core.gpf.OperatorException: Unknown operator ‘Apply-Orbit-File’. Note that operator aliases are case sensitive.”

Not sure if this is an installation issue or something wrong in my code, but the operator alias in the script is the same shown in the ‘gpt -h’ list, and can’t seem to find anything else amiss. Any advice people have on how to sort this (and my code in general) will be greatly appreciated. Also sorry if this has been covered elsewhere and I haven’t spotted it!



Good afternoon Miles,

most probably the problem is this missing code part:

# HashMap
#           Key-Value pairs.
self.HashMap = jpy.get_type('java.util.HashMap')
# Get snappy Operators


1 Like