Welcome to the BEAM Forum!

We encourage you to sign in our forum and participate in the BEAM community. The forum is maintained by the BEAM project team who will most likely answer your questions within 24 hours (except during common holidays) - if not done by other community members. Collaborate, share your knowledge and learn from other users!

If you don't find what you are looking for, please also consider the following external forums:

Combination View Flat View Tree View
Threads [ Previous | Next ]
how to use Orthorectifier class and output as a ".tiff" file
Hi all,

I'm a beginner on GIS, I want to write a program to use Orthorectifier class to do orthorectify and output as a ".tiff" file.

What data format can I use when I load product?

Which classes can I use?

How to do orthorectify?

How to output as a "tiff" file?

Is there any example code or tutorial code?

thanks all, I've been think about this question for several weeks.
Flag Flag
RE: how to use Orthorectifier class and output as a ".tiff" file
7/21/14 8:52 AM as a reply to han chuan su.

please have a look at the following thread Orthorectification via Java API. It should give you a good starting point.
You can write your generated product by simply calling
1ProductIO.writeProduct(sourceProduct, targetFilePath, "GeoTIFF");

Flag Flag
RE: how to use Orthorectifier class and output as a ".tiff" file
7/26/14 10:39 AM as a reply to Marco Peters.

I've read another post http://www.brockmann-consult.de/cms/web/beam/forum/-/message_boards/message/107423

How do I edit this code to use DEM to do Orthorectify

Thanks !~
Flag Flag
RE: how to use Orthorectifier class and output as a ".tiff" file
7/28/14 11:34 AM as a reply to han chuan su.
The code would look like this:
 1public class OrthoExample {   
 2    public static void main(String a[]) throws Exception {
 3       OperatorSpiRegistry operatorSpiRegistry = GPF.getDefaultInstance().getOperatorSpiRegistry();
 4       operatorSpiRegistry.loadOperatorSpis();
 6       Product sourceProduct = ProductIO.readProduct("path/to/input/product");
 7       Map<String, Object> parameterMap = new HashMap<String, Object>();
 8       parameterMap.put("crs", "EPSG:4326");
 9       parameterMap.put("referencePixelX", 0.5);
10       parameterMap.put("referencePixelY", 0.5);
11       parameterMap.put("easting", 0.0);
12       parameterMap.put("northing", 0.0);
13       parameterMap.put("resampling", "Nearest");
14       parameterMap.put("orthorectify", true);
15       parameterMap.put("elevationModelName", "GETASSE30");
16       // ... parameters are just an example
18       Product    reprojectedProduct= GPF.createProduct("Reproject", parameterMap, sourceProduct);
19       ProductIO.writeProduct(orthoProduct, "path/to/output.tif", "Geotiff");               
20    }

With this code you would use the GETASSE30 elevation model. As already sad, the best way to get the parameters is to configure the orthorectification inf VISAT and save the parameters. However, you should do the orthorectification at least once in VISAT. This will trigger the installation of the GETASSE30 elevation model.

Please also not that not every data product can be orthorectified, because they do not provide a view angle.
In BEAM a PointingFactory must be set to the product. This factory implementation would create the Pointing which in turn provides the view direction.

Flag Flag