[GRASS-user] Something wrong: Reprojection of raster maps in various platforms: projected coordinates are different

I have been trying for a long time. Something wrong is going on. I appreciate if you can correct me.

I have all my source images in sinusoidal projection in a location called “Landsat_sinu”.

My target locatoin is “Landsat_laea” I tried using the default option in GRASS GUI as follows:

1.) Select coordinate system parameters from a list

2.) Projection code: laea

3.) Datum with associated ellipsoid:

Central parallel: 30

Central Meridian: -96

False easting: 0

False northing: 0

4.) Datum code: nad83

5.) Select from the list of datum transformation: 1 used in whole nad83 region

+proj=laea

+lat_0=30

+lon_0=-96

+x_0=0

+y_0=0

+no_defs

+a=6378137

+rf=298.257222101

+towgs84=0.000,0.000,0.000

to_meter=1

+datum=nad83

Finish.

Is everything ok with this for the below (required) target definition?

PROJ.4 : '+proj=laea +lat_0=30 +lon_0=-96 +x_0=0 +y_0=0 +datum=NAD83
+units=m +no_defs '

Looks like at some point I am making a small mistake. I must get this as the projected coordinates.

north=1064601.38274499
south=830176.771464028
east=-1960125.15283348
west=-2265106.68066176

Any help is appreciated.

Uttam.

···

On Wed, Oct 14, 2015 at 4:52 PM, Moritz Lennert <mlennert@club.worldonline.be> wrote:

[Please keep conversations on the list]

On 14/10/15 23:19, Uttam Kumar wrote:

_

_
This information is for the original data (Source):

PROJ.4 : '+proj=sinu +lon_0=0 +x_0=0 +y_0=0 +a=6371007.181
+b=6371007.181 +units=m +no_defs ’

Coordinate System is:
PROJCS[“Sinusoidal”,
GEOGCS[“GCS_Unknown”,
DATUM[“Unknown”,
SPHEROID[“S_Unknown”,6371007.181,0.0]],
PRIMEM[“Greenwich”,0.0],
UNIT[“Degree”,0.0174532925199433]],
PROJECTION[“Sinusoidal”],
PARAMETER[“False_Easting”,0.0],
PARAMETER[“False_Northing”,0.0],
PARAMETER[“longitude_of_center”,0.0],
UNIT[“Meter”,1]]
Origin = (-10801805.197699999436736,4130102.079069999977946)
Pixel Size = (30.000000000000000,-30.000000000000000)

This information is for the destination data (Target):*

PROJ.4 : '+proj=laea +lat_0=30 +lon_0=-96 +x_0=0 +y_0=0 +datum=NAD83
+units=m +no_defs ’

In your first mail you said:

Lambert Azimuthal Equal Area, Datum: WGS84

but here the datum is NAD83.

Using your projection info, I get almost exactly the same results in GRASS as you report from ENVI:

On 08/10/15 21:36, Uttam Kumar wrote:> Reprojected in ENVI (Lambert Azimuthal Equal Area, Datum: WGS84)


Corner Coordinates:

Upper Left (-2265106.681W, 1064601.383N)
Lower Left (-2265106.681W, 830181.383N)
Upper Right (-1960126.681W, 1064601.383N)
Lower Right (-1960126.681W, 830181.383N)

GRASS 7.0.1 (test_LAEA):~ > v.info -g Image_Boundary_box
north=1064601.38274499
south=830176.771464028
east=-1960125.15283348
west=-2265106.68066176

Don’t have the time now to explore the exact differences, but either it’s a question of definition of the bounding box, or it possibly be a question of which specific NAD83 transformation parameters were used.

Moritz

On 20/10/15 19:08, Uttam Kumar wrote:

I have been trying for a long time. Something wrong is going on. I
appreciate if you can correct me.

I have all my source images in sinusoidal projection in a location
called "Landsat_sinu".

My target locatoin is "Landsat_laea" I tried using the default option in
GRASS GUI as follows:

1.) *Select coordinate system parameters from a list*

2.) Projection code: *laea*

3.) Datum with associated ellipsoid:
Central parallel: *30*
Central Meridian: *-96*
False easting: *0*
False northing: *0*

4.) Datum code: *nad83*
5.) Select from the list of datum transformation: *1 used in whole nad83
region*

+proj=laea
+lat_0=30
+lon_0=-96
+x_0=0
+y_0=0
+no_defs
+a=6378137
+rf=298.257222101
+towgs84=0.000,0.000,0.000
to_meter=1
+datum=nad83

Finish.

Is everything ok with this for the below (required) target definition?

**PROJ.4 : '+proj=laea +lat_0=30 +lon_0=-96 +x_0=0 +y_0=0 +datum=NAD83
+units=m +no_defs '**

Looks like at some point I am making a small mistake. I must get this as
the projected coordinates.

*north=1064601.38274499
south=830176.771464028
east=-1960125.15283348
west=-2265106.68066176*

And what is wrong with these coordinates ? Those are exactly the ones I get and they are very close to the ones you got from ENVI:

> > Upper Left (-2265106.681W, 1064601.383N)
> > Lower Left (-2265106.681W, 830181.383N)
> > Upper Right (-1960126.681W, 1064601.383N)
> > Lower Right (-1960126.681W, 830181.383N)

i.e. 4.6m difference for South and 1.5m difference for East. You would have to check how the NAD83 conversion is done exactly to see if the difference could come from there.

Moritz

Any help is appreciated.

Uttam.

On Wed, Oct 14, 2015 at 4:52 PM, Moritz Lennert
<mlennert@club.worldonline.be <mailto:mlennert@club.worldonline.be>> wrote:

    [Please keep conversations on the list]

    On 14/10/15 23:19, Uttam Kumar wrote:

        _

        _
        _*This information is for the original data (Source):*_

        *PROJ.4 : '+proj=sinu +lon_0=0 +x_0=0 +y_0=0 +a=6371007.181
        +b=6371007.181 +units=m +no_defs '*

        Coordinate System is:
        PROJCS["Sinusoidal",
              GEOGCS["GCS_Unknown",
                  DATUM["Unknown",
                      SPHEROID["S_Unknown",6371007.181,0.0]],
                  PRIMEM["Greenwich",0.0],
                  UNIT["Degree",0.0174532925199433]],
              PROJECTION["Sinusoidal"],
              PARAMETER["False_Easting",0.0],
              PARAMETER["False_Northing",0.0],
              PARAMETER["longitude_of_center",0.0],
              UNIT["Meter",1]]
        Origin = (-10801805.197699999436736,4130102.079069999977946)
        Pixel Size = (30.000000000000000,-30.000000000000000)

        *
        _This information is for the destination data (Target):_*

        *PROJ.4 : '+proj=laea +lat_0=30 +lon_0=-96 +x_0=0 +y_0=0
        +datum=NAD83
        +units=m +no_defs '*

    In your first mail you said:

    Lambert Azimuthal Equal Area, Datum: WGS84

    but here the datum is NAD83.

    Using your projection info, I get almost exactly the same results in
    GRASS as you report from ENVI:

    On 08/10/15 21:36, Uttam Kumar wrote:> Reprojected in ENVI (Lambert
    Azimuthal Equal Area, Datum: WGS84)
    > -------------------------------------------------------------------------
    > Corner Coordinates:
    >
    > Upper Left (-2265106.681W, 1064601.383N)
    > Lower Left (-2265106.681W, 830181.383N)
    > Upper Right (-1960126.681W, 1064601.383N)
    > Lower Right (-1960126.681W, 830181.383N)

    GRASS 7.0.1 (test_LAEA):~ > v.info <http://v.info> -g Image_Boundary_box
    north=1064601.38274499
    south=830176.771464028
    east=-1960125.15283348
    west=-2265106.68066176

    Don't have the time now to explore the exact differences, but either
    it's a question of definition of the bounding box, or it possibly be
    a question of which specific NAD83 transformation parameters were used.

    Moritz

I could not reach the solution till now even after following the steps told in previous posts. I know I am making a silly mistake.

This is the projection information of the target location:

+proj=laea +lat_0=30 +lon_0=-96 +x_0=0 +y_0=0 +datum=NAD83 +units=m +no_defs

GRASS 7.1.svn (SanLuis_Reservoir_LAEA):~ >g.proj -p

-PROJ_INFO-------------------------------------------------
name : Lambert Azimuthal Equal Area
proj : laea
datum : nad83
ellps : grs80
lat_0 : 30
lon_0 : -96
x_0 : 0
y_0 : 0
no_defs : defined
-PROJ_UNITS------------------------------------------------
unit : Meter
units : Meters
meters : 1

GRASS 7.1.svn (SanLuis_Reservoir_LAEA):~ > g.proj -w

PROJCS[“Lambert Azimuthal Equal Area”,
GEOGCS[“grs80”,
DATUM[“North_American_Datum_1983”,
SPHEROID[“Geodetic_Reference_System_1980”,6378137,298.257222101]],
PRIMEM[“Greenwich”,0],
UNIT[“degree”,0.0174532925199433]],
PROJECTION[“Lambert_Azimuthal_Equal_Area”],
PARAMETER[“latitude_of_center”,30],
PARAMETER[“longitude_of_center”,-96],
PARAMETER[“false_easting”,0],
PARAMETER[“false_northing”,0],
UNIT[“Meter”,1]]

GRASS 7.1.svn (SanLuis_Reservoir_LAEA):~ > v.info -g Image_boundary_box

north=823262.924419209
south=652223.643294404
east=-167210.022680164
west=-518209.054236328
top=0.000000
bottom=0.000000

I should have got this (This is correct):

north:1638674.575
south:1481984.575

east:1157941.598
west:817651.598

Any clue, where am I wrong?

···

On Tue, Oct 20, 2015 at 4:45 PM, Moritz Lennert <mlennert@club.worldonline.be> wrote:

On 20/10/15 19:08, Uttam Kumar wrote:

I have been trying for a long time. Something wrong is going on. I
appreciate if you can correct me.

I have all my source images in sinusoidal projection in a location
called “Landsat_sinu”.

My target locatoin is “Landsat_laea” I tried using the default option in
GRASS GUI as follows:

1.) Select coordinate system parameters from a list

2.) Projection code: laea

3.) Datum with associated ellipsoid:
Central parallel: 30
Central Meridian: -96
False easting: 0
False northing: 0

4.) Datum code: nad83
5.) Select from the list of datum transformation: 1 used in whole nad83
region

+proj=laea
+lat_0=30
+lon_0=-96
+x_0=0
+y_0=0
+no_defs
+a=6378137
+rf=298.257222101
+towgs84=0.000,0.000,0.000
to_meter=1
+datum=nad83

Finish.

Is everything ok with this for the below (required) target definition?

PROJ.4 : '+proj=laea +lat_0=30 +lon_0=-96 +x_0=0 +y_0=0 +datum=NAD83
+units=m +no_defs ’

Looks like at some point I am making a small mistake. I must get this as
the projected coordinates.

north=1064601.38274499
south=830176.771464028
east=-1960125.15283348
west=-2265106.68066176

And what is wrong with these coordinates ? Those are exactly the ones I get and they are very close to the ones you got from ENVI:

Upper Left (-2265106.681W, 1064601.383N)
Lower Left (-2265106.681W, 830181.383N)
Upper Right (-1960126.681W, 1064601.383N)
Lower Right (-1960126.681W, 830181.383N)

i.e. 4.6m difference for South and 1.5m difference for East. You would have to check how the NAD83 conversion is done exactly to see if the difference could come from there.

Moritz

Any help is appreciated.

Uttam.

On Wed, Oct 14, 2015 at 4:52 PM, Moritz Lennert

<mlennert@club.worldonline.be mailto:[mlennert@club.worldonline.be](mailto:mlennert@club.worldonline.be)> wrote:

[Please keep conversations on the list]

On 14/10/15 23:19, Uttam Kumar wrote:

_

_
This information is for the original data (Source):

PROJ.4 : '+proj=sinu +lon_0=0 +x_0=0 +y_0=0 +a=6371007.181
+b=6371007.181 +units=m +no_defs ’

Coordinate System is:
PROJCS[“Sinusoidal”,
GEOGCS[“GCS_Unknown”,
DATUM[“Unknown”,
SPHEROID[“S_Unknown”,6371007.181,0.0]],
PRIMEM[“Greenwich”,0.0],
UNIT[“Degree”,0.0174532925199433]],
PROJECTION[“Sinusoidal”],
PARAMETER[“False_Easting”,0.0],
PARAMETER[“False_Northing”,0.0],
PARAMETER[“longitude_of_center”,0.0],
UNIT[“Meter”,1]]
Origin = (-10801805.197699999436736,4130102.079069999977946)
Pixel Size = (30.000000000000000,-30.000000000000000)

This information is for the destination data (Target):*

PROJ.4 : '+proj=laea +lat_0=30 +lon_0=-96 +x_0=0 +y_0=0
+datum=NAD83
+units=m +no_defs ’

In your first mail you said:

Lambert Azimuthal Equal Area, Datum: WGS84

but here the datum is NAD83.

Using your projection info, I get almost exactly the same results in
GRASS as you report from ENVI:

On 08/10/15 21:36, Uttam Kumar wrote:> Reprojected in ENVI (Lambert
Azimuthal Equal Area, Datum: WGS84)


Corner Coordinates:

Upper Left (-2265106.681W, 1064601.383N)
Lower Left (-2265106.681W, 830181.383N)
Upper Right (-1960126.681W, 1064601.383N)
Lower Right (-1960126.681W, 830181.383N)

GRASS 7.0.1 (test_LAEA):~ > v.info <http://v.info> -g Image_Boundary_box
north=1064601.38274499
south=830176.771464028
east=-1960125.15283348
west=-2265106.68066176

Don’t have the time now to explore the exact differences, but either
it’s a question of definition of the bounding box, or it possibly be
a question of which specific NAD83 transformation parameters were used.

Moritz

On Oct 23, 2015 2:22 AM, “Uttam Kumar” <uttamsinha09@gmail.com> wrote:

GRASS 7.1.svn (SanLuis_Reservoir_LAEA):~ > v.info -g Image_boundary_box

north=823262.924419209
south=652223.643294404
east=-167210.022680164
west=-518209.054236328
top=0.000000
bottom=0.000000

I should have got this (This is correct):

north:1638674.575
south:1481984.575

east:1157941.598
west:817651.598

Any clue, where am I wrong?

You appear to compare the vector bounding box which easily leads to misleading results in case of a rotated image.
The only correct way is to compare point wise (eg true corner points of the image scene).

Or generate a binary data/no data raster from a channel using r.mapcalc and then r.to.vect to make it a vector polygon truly circumscribing the image which can then be reprojected.

Best
Markus

Thank you all for the suggestions.

I could resolve the problem.

GRASS gives me same projected coordinates as ENVI.

···

On Fri, Oct 23, 2015 at 12:46 AM, Markus Neteler <neteler@osgeo.org> wrote:

On Oct 23, 2015 2:22 AM, “Uttam Kumar” <uttamsinha09@gmail.com> wrote:

GRASS 7.1.svn (SanLuis_Reservoir_LAEA):~ > v.info -g Image_boundary_box

north=823262.924419209
south=652223.643294404
east=-167210.022680164
west=-518209.054236328
top=0.000000
bottom=0.000000

I should have got this (This is correct):

north:1638674.575
south:1481984.575

east:1157941.598
west:817651.598

Any clue, where am I wrong?

You appear to compare the vector bounding box which easily leads to misleading results in case of a rotated image.
The only correct way is to compare point wise (eg true corner points of the image scene).

Or generate a binary data/no data raster from a channel using r.mapcalc and then r.to.vect to make it a vector polygon truly circumscribing the image which can then be reprojected.

Best
Markus