Hello,
is it possible to mask a Raster tile to the dimensions of a vector file. If i use the Land-Sea-Mask in snappy it returns a raster with values for the input multi polygon . But the file has still the dimensions of the input file. The area not included in the vector is filled with zeros. I want a file without any zeros. Just the dimension of the input vector file.
def land_sea_mask(input_product, vectorfile, shp_name):
separateShapes = False
HashMap = jpy.get_type('java.util.HashMap')
parameters = HashMap()
parameters.put('vectorFile', vectorfile)
parameters.put('separateShapes', separateShapes)
#####################
band_with_vector_1 = GPF.createProduct('Import-Vector', parameters, input_product)
#####################
# Landseamask with imported vector
HashMap = jpy.get_type('java.util.HashMap')
parameters = HashMap()
parameters.put('geometry', shp_name)
parameters.put('invertGeometry', False)
parameters.put('byPass', False)
result = GPF.createProduct('Land-Sea-Mask', parameters, band_with_vector_1)
return result`