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 ]
gpt.sh crops at +180 deg lon
toggle
gpt.sh crops at +180 deg lon
aatsr
7/23/10 5:23 PM
Hi
I try to orthorectify AATSR data using gpt (see below) but it seems that the output is cropped at +180deg (see quicklook). So how can I get the full 360 degrees longitude?

I am also not sure about the referencePixelXY, is it correct this way, I want to have the top/left corner of the top/left pixel at -168lon, 84lat

thanks


$GPT_PATH/gpt.sh Reproject \
-Ssource=$path -Pcrs="EPSG:4326" \
-t $outdir/$filename \
-PpixelSizeY=0.01 -PpixelSizeX=0.01 \
-PelevationModelName="GETASSE30" -Porthorectify=true \
-PreferencePixelX=0.5 -PreferencePixelY=0.5 \
-Presampling=Bilinear \
-Peasting=-168 -Pnorthing=84 -PnoDataValue=-1 \
-PincludeTiePointGrids=false \
-Pheight=5900 -Pwidth=36000
Attachment

Attachments: btemp_nadir_1200.jpg (265.7k)
Flag Flag
RE: gpt.sh crops at +180 deg lon
7/27/10 2:09 PM as a reply to Andreas Wiesmann.
In addition I found strange effects at the swath boundary after orthorectification (see visat quicklook). there is a ramp in the altitude file (with large negative values), and speckled sun elevation and reflectivity. The gpt parameters are as given in the first post.
Attachment

Attachments: beamortho.png (45.1k)
Flag Flag
RE: gpt.sh crops at +180 deg lon
8/2/10 12:10 PM as a reply to Andreas Wiesmann.
What happens if you define the pixel sizes only, leaving easting, northing, height, width, and reference pixel position undefined? All parameters are already determined by defining pixel sizes and EPSG:4326.
Flag Flag
RE: gpt.sh crops at +180 deg lon
8/2/10 1:51 PM as a reply to Ralf Quast.
hm you meant you interpret the EPSG:4326 not only as the GCS but also bounds such as -180.0000, -90.0000, 180.0000, 90.0000 ?

Then how do I manage to get the section I need? by providing a WKT styring such as:
GEOGCS["WGS 84",DATUM["WGS_1984",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],AUTHORITY["EPSG","6326"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4326"]]
?

btw concerning the border effects mentioned in the second post, they differ with the interpolation chosen but give nonsense for all methods(nn, bilinear, bicubic).

Andreas
Flag Flag
RE: gpt.sh crops at +180 deg lon
8/3/10 8:27 AM as a reply to Ralf Quast.
OK I did the following tests:
1. run the same but using WKT info
2. run with only the posting

Here what I found
1.
beam-4.7.1/bin/gpt.sh Reproject -Ssource=/data/f/litdb.fmi.fi/atsr_20031201/ATS_TOA_1PRUPA20031201_045104_000065272022_00090_09162_8509.N1 -Pcrs="GEOGCS[\"WGS 84\",DATUM[\"WGS_1984\",SPHEROID[\"WGS 84\",6378137,298.257223563,AUTHORITY[\"EPSG\",\"7030\"]],AUTHORITY[\"EPSG\",\"6326\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251994328,AUTHORITY[\"EPSG\",\"9122\"]],AUTHORITY[\"EPSG\",\"4326\"]]" -t /data/d/test/bilinwkt_ATS_TOA_1PRUPA20031201_045104_000065272022_00090_09162_8509 -PpixelSizeY=0.01 -PpixelSizeX=0.01 -Porthorectify=true -PreferencePixelX=0.5 -PreferencePixelY=0.5 -Presampling=Bilinear -Peasting=-168 -Pnorthing=84.00 -PnoDataValue=-1 -PincludeTiePointGrids=false -Pheight=5900 -Pwidth=36000

Output as before, cropping at +180 deg

2.
beam-4.7.1/bin/gpt.sh Reproject -Ssource=/data/f/litdb.fmi.fi/atsr_20031201/ATS_TOA_1PRUPA20031201_045104_000065272022_00090_09162_8509.N1 -Pcrs="EPSG:4326" -t /data/d/test/bilinop_ATS_TOA_1PRUPA20031201_045104_000065272022_00090_09162_8509 -PpixelSizeY=0.01 -PpixelSizeX=0.01 -Porthorectify=true -Presampling=Bilinear -PnoDataValue=-1 -PincludeTiePointGrids=false

Again the border effects on the sides of the swath

it takes very long to geocode full orbit and data is limited by about -158 and + 173 long, image is also to small in width:
samples = 33284
lines = 16716

<Coordinate_Reference_System>
<WKT>
GEOGCS["WGS 84",
DATUM["World Geodetic System 1984",
SPHEROID["WGS 84", 6378137.0, 298.257223563, AUTHORITY["EPSG","7030"]],
AUTHORITY["EPSG","6326"]],
PRIMEM["Greenwich", 0.0, AUTHORITY["EPSG","8901"]],
UNIT["degree", 0.017453292519943295],
AXIS["Geodetic longitude", EAST],
AXIS["Geodetic latitude", NORTH],
AUTHORITY["EPSG","4326"]]
</WKT>
</Coordinate_Reference_System>
<Geoposition>
<IMAGE_TO_MODEL_TRANSFORM>0.01,0.0,0.0,-0.01,-158.97378540039062,83.61327362060547</IMAGE_TO_MODEL_TRANSFORM>
</Geoposition>
Flag Flag
RE: gpt.sh crops at +180 deg lon
8/3/10 12:17 PM as a reply to Andreas Wiesmann.
I have found that the 'border effects' in the altitude data are already present in the AATSR source products.
Flag Flag
RE: gpt.sh crops at +180 deg lon
8/3/10 1:08 PM as a reply to Ralf Quast.
Yes, you are right, I can confirm that.

Do you have more info on the cropping at 180 degW, can that be avoided?

And I know the definition of the pixel coordinate is given somewhere, I just cannot find it again... is it pixel center or top/left with -PreferencePixelX=0 -PreferencePixelY=0

thanks
Flag Flag
RE: gpt.sh crops at +180 deg lon
Answer Answer (Unmark)
8/4/10 9:49 AM as a reply to Andreas Wiesmann.
The pixel center for pixel (x, y) is defined by (x.5, y.5). The cropping problem does not appear in BEAM 4.8, at least for my test case, see below.
Flag Flag
RE: gpt.sh crops at +180 deg lon
8/3/10 2:13 PM as a reply to Ralf Quast.
I've found in the BEAM Issue tracker a bug entry related to the "border effect" of the altitude data:
ATSR altitude data is wrong at the edges of orbits
It is not yet solved (obviously) and I don't know any work around.

best wishes
Marco
Flag Flag
RE: gpt.sh crops at +180 deg lon
8/4/10 9:48 AM as a reply to Andreas Wiesmann.
With BEAM 4.8, I executed

gpt.command Reproject -Ssource=ATS_TOA_1_FullOrbit.N1 -t test -Pcrs="EPSG:4326" -PpixelSizeY=0.01 -PpixelSizeX=0.01 -Porthorectify=false -Presampling=Bilinear -PnoDataValue=-1 -PincludeTiePointGrids=true

and have obtained the expected result, without cropping. The bounds of the projected image are indicated in the screen shot below.
Attachment

Attachments: test_btemp_nadir_1200.jpg (168.5k)
Flag Flag
RE: gpt.sh crops at +180 deg lon
8/4/10 5:10 PM as a reply to Ralf Quast.
unfortunately I cannot confirm that, using
beam-4.8/bin/gpt.sh Reproject -Ssource=ATS_TOA_1PRUPA20031201_045104_000065272022_00090_09162_8509.N1 -Pcrs="EPSG:4326" -t /data/d/test/48_ATS_TOA_1PRUPA20031201_045104_000065272022_00090_09162_8509 -PpixelSizeY=0.01 -PpixelSizeX=0.01 -Porthorectify=true -PreferencePixelX=0.5 -PreferencePixelY=0.5 -Presampling=Nearest -Peasting=-168 -Pnorthing=84.00 -PnoDataValue=-1 -PincludeTiePointGrids=false

I still see the cropping at +180

btw, the world map overlay map crops to.

tnx
andreas
Flag Flag
RE: gpt.sh crops at +180 deg lon
8/4/10 5:27 PM as a reply to Andreas Wiesmann.
I tested what I have suggested above, using the pixel size parameters only. Is it still cropped when you omit the other parameters? Why do you need them BTW? The easting, northing etc. are chosen automatically when you do not define them.
Flag Flag
RE: gpt.sh crops at +180 deg lon
8/5/10 9:47 AM as a reply to Ralf Quast.
thats exactly the point, I want to have the output exactly according to my specifications, from longitude -168 to + 192 and lat 84N to 25N and that seems not to work. So for now I use the workaround that I shift the longitude range to -180 to 180 and shift it to -168 to 192 in my chain.

cheers
andreas
Flag Flag
RE: gpt.sh crops at +180 deg lon
8/5/10 1:25 PM as a reply to Andreas Wiesmann.
Understood. I have created an issue for your problem at http://www.brockmann-consult.de/beam-jira/browse/BEAM-1173.

Would you try out the attached jar (remove the txt suffix and replace the beam-core.jar in the BEAM modules folder with the attached version) and let me know if it solves your problem?
Attachments: beam-core-4.8.1-SNAPSHOT.jar.txt (1,248.5k)
Flag Flag
RE: gpt.sh crops at +180 deg lon
8/5/10 3:06 PM as a reply to Ralf Quast.
unfortunately it did not change the cropping.
Flag Flag
RE: gpt.sh crops at +180 deg lon
8/6/10 10:25 AM as a reply to Andreas Wiesmann.
Yes, bad luck emoticon. The problem is that due to the easting for the leftmost edge being greater than -180°, the maximum easting in the map exceeds 180°, which results in invalid easting (for EPSG:4326). The mapping between image pixels and map coordinates is affine by definition, so it is not possible to wrap the easting at 180° to -180, since this kind of transformation is not affine. This is not a bug, but a principal limitation.

To tackle the problem you could try to use a CRS different from EPSG:4326, where the central meridian is e.g. 180° instead of 0°. You could try to modify the EPSG:4326 WKT (e.g. set the prime meridian to 180° or 90°) and supply this as an argument to gpt.
Flag Flag