[GRASS-user] Projection errors

Hi Users,

I’m having the problem of projecting a source map (landsat 8 image) into a target location (Ordnance Survey UK) in Grass 7.

I have tried the r.pack/unpack method but i get the following error:-

‘WARNING: Projection information does not match. Proceeding…’

The resulting view shows both images but the landsat image is many kilometres to the north of where it should overlap.
Have also made ‘PROJ2’(see below) with the same n,s,e,w as ‘PROJ1’(see below) but still the same result as above.

As i understand it the underlying Landsat images are in the WGS84/lon-lat format.
I’m wondering should i use m.proj to first convert the co-ordinates to OrdSurvey?

I seem to recall just using ‘r.proj’ in the past with no problems at all but now i get error:-

‘WARNING: pj_transform() failed: latitude or longitude exceeded limits’

I’m a little confused as to which module to use to get around this problem.

g.region -b
north latitude: 89:59:47.524206N
south latitude: 49:45:56.915978N
west longitude: 18:03:37.69897W
east longitude: 0:02:23.60354W
center longitude: 9:03:00.651255W
center latitude: 69:52:52.220092N

‘PROJ1’ - DEFAULT_WIND

proj: 99
zone: 0
north: 5848507.5
south: 5605492.5
east: 540907.5
west: 300892.5
cols: 540915
rows: 5848815
e-w resol: 1
n-s resol: 1
top: 1.000000000000000
bottom: 0.000000000000000
cols3: 1
rows3: 1
depths: 1
e-w resol3: 1
n-s resol3: 1
t-b resol: 1

‘PROJ2’ - DEFAULT_WIND

proj: 99
zone: 0
north: 1230000
south: -123
east: 660000
west: -66
cols: 108220
rows: 1169781
e-w resol: 5
n-s resol: 5
top: 1.000000000000000
bottom: 0.000000000000000
cols3: 10000
rows3: 10000
depths: 1
e-w resol3: 5
n-s resol3: 5
t-b resol: 1

Thanks,

···

Paul J. Shapley

On 26.03.2015 14:34, Paul Shapley wrote:

I'm having the problem of projecting a source map (landsat 8 image) into a
target location (Ordnance Survey UK) in Grass 7.

Is it this one: <EPSG:27700> ?

Nikos

[..]

Paul, I hope I understand what you are asking. So, this is what works for me:

1) import the Landsat(8 or any) imagery in a Location defined by their "native" spatial reference system. In GRASS7, you can do something quickly from the command line:

# create location
grass7 -c /path/to/georeferenced.image /path/to/grass-data-base/NameForNewLocation

# import
r.in.gdal ...

# set your region, for example
g.region raster=Imported_Band_1

# create a vector out of the current region
v.in.region out=Working_Region

2) create another location based on the espg in question and reproject in it the stuff from the "source" Location. Again, quickly from the command line:

# create location based on given epsg
grass7 -c epsg:27700 /path/to/grass-data-base/NameForEPSG27700Location

# reproject the "region" vector map...
v.proj in=Working_Region dbase=/path/to/grass-data-base location=NameForNewLocation mapset=PERMANENT #or other Mapset!

# set region usig it
g.region vect=Working_Region

# reproject your rasters -- example below for one image
r.proj input=Imported_Band_1 dbase=/path/to/grass-data-base location=NameForNewLocation mapset=PERMANENT #or other Mapset!

In general, this is the best way (I know of) to reproject raster data from one Location to another one (with different reference systems of course).

Nikos

ps- please, let us not forget to keep discussion in the public mailing list

On 26.03.2015 17:40, Paul Shapley wrote:

Yes...that's correct
On 26 Mar 2015 15:29, "Nikos Alexandris" <nik@nikosalexandris.net> wrote:

On 26.03.2015 14:34, Paul Shapley wrote:

I'm having the problem of projecting a source map (landsat 8 image) into a

target location (Ordnance Survey UK) in Grass 7.

Is it this one: <EPSG:27700> ?

Nikos

[..]
_______________________________________________
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user

--
Nikos