Hello everyone,
I’m trying to obtain pixel values from geographic coordinates. I found a operator called “Extract Pixel Values”, that should extract pixel values corresponding to precise geographic coordinates. I would like to run it with snappy, but to better understand it, I tried more and more times to run it in SNAP software. But, unluckly, even though the operator works and the window of successful performance appears, I cannot find my results! I checked every time if I put the right directory, and I did it, as with every parameter. I will show a picture to clarify:
at this point, I tried to run this operator from Python with snappy, but another problem occurred:
RuntimeError: org.esa.snap.core.gpf.OperatorException: Invalid placemark file format:
at least the columns ‘Name’, ‘Lon’ and ‘Lat’ must be given.
but my pin file (a .txt file) containts everything corrected, as you can see in the attached file:
placemarks.txt (116 Bytes)
the part of code that I wrote to run the operator is this:
path_file = <<path of the .txt file with placemarks>>
path_products_descending = --path of where I want to put my final product–
path_master_descending = --path of the product–
master_descending = ProductIO.readProduct(str(path_master_descending)
parameters_pixex = HashMap()
parameters_pixex.put(“aggregatorStrategyType”, “no aggregation”)
parameters_pixex.put(“coordinatesFile”, str(path_file))
parameters_pixex.put(“dateInterpretationPattern”, “yyyyMMdd”)
parameters_pixex.put(“exportBands”, “true”)
parameters_pixex.put(“exportExpressionResult”, “true”)
parameters_pixex.put(“exportKmz”, “false”)
parameters_pixex.put(“exportMasks”, “false”)
parameters_pixex.put(“exportSubScenes”, “false”)
parameters_pixex.put(“exportTiePoints”, “true”)
parameters_pixex.put(“extractTimeFromFilename”,‘false’)
parameters_pixex.put(“filenameInterpretationPattern”, ‘{startDate}*{endDate}’)
parameters_pixex.put(“includeOriginalInput”, “false”)
parameters_pixex.put(“outputDir”, str(path_products_descending))
parameters_pixex.put(“outputFilePrefix”, ‘pixEx’)
parameters_pixex.put(“sourceProductPaths”, str(path_master_descending))
parameters_pixex.put(“windowSize”, “1”)
pixex = GPF.createProduct(“PixEx”, parameters_pixex, master_descending)
Can anyone help me with this issue? Thank you in advance