Re: [GRASS-user] Need help in reprojecting raster images
On Sep 26, 2015 1:00 AM, "Uttam Kumar"wrote: > > Thank you all. It worked. > > However I noticed that the projected boundary values of N, S, W and E in GRASS are not same as the values obtained from projecting the same image in ENVI image processing software and in gdalwarp. > > Projection of the scene in Lambert Azimuthal Equal Area is similar (but not exactly equal) in GRASS and gdal, but in ENVI it is totally different. I just did the comparison to see if things are similar from different softwares in case they have to be ported to other platforms. Can you print the projection information in both GRASS (g.proj -p or -w) and ENVI? Are they really the same? Markus ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
Re: [GRASS-user] Need help in reprojecting raster images
Thank you all. It worked. However I noticed that the projected boundary values of N, S, W and E in GRASS are not same as the values obtained from projecting the same image in ENVI image processing software and in gdalwarp. Projection of the scene in Lambert Azimuthal Equal Area is similar (but not exactly equal) in GRASS and gdal, but in ENVI it is totally different. I just did the comparison to see if things are similar from different softwares in case they have to be ported to other platforms. Any comments is appreciated. Uttam. On Wed, Sep 23, 2015 at 12:35 PM, Veronica Andreowrote: > Hi Uttam, > > you may want to first do v.in.region in your input location, this creates > a vector with the limits of your input location (set g.region to your > raster of interest first), then v.proj the output of v.in.region in your > target location, set region there with the imported vector and just then > try to reproject the raster image. > > so, steps would be: > > # in input_location > g.region raster=your_raster > > v.in.region output=vector_region_of_interest > > # in target location > v.proj location=input_location mapset=input_mapset > input=vector_region_of_interest output=projected_boundaries > > g.region vector=projected_boundaries > > r.proj location=input_location mapset=input_mapset input=input_raster > output=output_raster > > You may also wanna check r.import if you use grass7.1 ( > https://grass.osgeo.org/grass71/manuals/r.import.html) or as an add-on in > grass 7.0 (https://grass.osgeo.org/grass70/manuals/addons/r.import.html). > You can install it with g.extension r.import > > HTH, > Vero > > 2015-09-23 15:21 GMT-03:00 Uttam Sinha : > >> >> >> Hi, >> >> I tried the way you told. I created a new location in laea without >> setting the default boundary. Then from this mapset I used >> >> r.proj location*=input_location* mapset=*input_mapset* input=*input_raster >> name* output= >> >> *output_raster* >> I get an error: >> >> >> ERROR: Input raster map is outside current region >> >> Any suggestions. >> >> Uttam. >> >> >> On Tue, Sep 22, 2015 at 11:59 PM, sajid pareeth >> wrote: >> >>> Hi Uttam >>> >>> If I understand you correctly you want to reproject a landsat image from >>> sinusoidal to laea projection!! >>> You dont have to manually set the bounding box while reprojecting a >>> raster, as GRASS will take care of it. >>> >>> First you create a new location and mapset with desired output >>> projection , which in this case is Lamberts Azimuthal Equal Area. >>> Then get into this mapset, use the following r.proj command. >>> r.proj location*=input_location* mapset=*input_mapset* input=*input_raster >>> name* output= >>> *output_raster* >>> >>> More details here: https://grass.osgeo.org/grass70/manuals/r.proj.html >>> >>> If you then need to set your working area to a particular bounding box, >>> use g.region >>> >>> g.region raster=*output_raster* >>> >>> regards >>> >>> Sajid >>> >>> On Tue, Sep 22, 2015 at 11:07 PM, Uttam Sinha >>> wrote: >>> Hi All, I have a set of Landsat images in Sinusoidal Projection, WGS84 Datum. I know the north, south, east and west extent of the boundary of the image. I want to reproject the image to Lamberts Azimuthal Equal Area, WGS84 Datum. I do not know what will be the coordinates of the north, south, east and west bounds in this projection. 1.) How do I convert upper left coordinates and bottom right coordinates of Sinusoidal Projection to Lamberts Azimuthal Equal Area to create a new destination Location? 2.) How do I reproject the images from Sinusoidal to Lamberts without georeferencing the image at source location (in sinusoidal projection) Appreciate any reply. Uttam. ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user >>> >>> >> >> ___ >> grass-user mailing list >> grass-user@lists.osgeo.org >> http://lists.osgeo.org/mailman/listinfo/grass-user >> > > ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
Re: [GRASS-user] Need help in reprojecting raster images
Hi, I tried the way you told. I created a new location in laea without setting the default boundary. Then from this mapset I used r.proj location*=input_location* mapset=*input_mapset* input=*input_raster name* output= *output_raster* I get an error: ERROR: Input raster map is outside current region Any suggestions. Uttam. On Tue, Sep 22, 2015 at 11:59 PM, sajid pareethwrote: > Hi Uttam > > If I understand you correctly you want to reproject a landsat image from > sinusoidal to laea projection!! > You dont have to manually set the bounding box while reprojecting a > raster, as GRASS will take care of it. > > First you create a new location and mapset with desired output projection > , which in this case is Lamberts Azimuthal Equal Area. > Then get into this mapset, use the following r.proj command. > r.proj location*=input_location* mapset=*input_mapset* input=*input_raster > name* output= > *output_raster* > > More details here: https://grass.osgeo.org/grass70/manuals/r.proj.html > > If you then need to set your working area to a particular bounding box, > use g.region > > g.region raster=*output_raster* > > regards > > Sajid > > On Tue, Sep 22, 2015 at 11:07 PM, Uttam Sinha > wrote: > >> >> >> Hi All, >> >> I have a set of Landsat images in Sinusoidal Projection, WGS84 Datum. I >> know the north, south, east and west extent of the boundary of the image. >> >> I want to reproject the image to Lamberts Azimuthal Equal Area, WGS84 >> Datum. I do not know what will be the coordinates of the north, south, east >> and west bounds in this projection. >> >> 1.) How do I convert upper left coordinates and bottom right coordinates >> of Sinusoidal Projection to Lamberts Azimuthal Equal Area to create a new >> destination Location? >> >> 2.) How do I reproject the images from Sinusoidal to Lamberts without >> georeferencing the image at source location (in sinusoidal projection) >> >> Appreciate any reply. >> >> Uttam. >> >> ___ >> grass-user mailing list >> grass-user@lists.osgeo.org >> http://lists.osgeo.org/mailman/listinfo/grass-user >> > > ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
Re: [GRASS-user] Need help in reprojecting raster images
Hi Uttam, if I understand your problem correctly, you can use the -p flag of r.proj to print input map's bounds in the current projection. With this information you can set the region boundaries appropriately using g.region. Afterwards you can 'import' your raster into your laea-projection location using the r.proj as mentioned before. best, Johannes On Wed, Sep 23, 2015 at 8:21 PM, Uttam Sinhawrote: > > > Hi, > > I tried the way you told. I created a new location in laea without setting > the default boundary. Then from this mapset I used > > r.proj location*=input_location* mapset=*input_mapset* input=*input_raster > name* output= > > *output_raster* > I get an error: > > > ERROR: Input raster map is outside current region > > Any suggestions. > > Uttam. > > > On Tue, Sep 22, 2015 at 11:59 PM, sajid pareeth > wrote: > >> Hi Uttam >> >> If I understand you correctly you want to reproject a landsat image from >> sinusoidal to laea projection!! >> You dont have to manually set the bounding box while reprojecting a >> raster, as GRASS will take care of it. >> >> First you create a new location and mapset with desired output projection >> , which in this case is Lamberts Azimuthal Equal Area. >> Then get into this mapset, use the following r.proj command. >> r.proj location*=input_location* mapset=*input_mapset* input=*input_raster >> name* output= >> *output_raster* >> >> More details here: https://grass.osgeo.org/grass70/manuals/r.proj.html >> >> If you then need to set your working area to a particular bounding box, >> use g.region >> >> g.region raster=*output_raster* >> >> regards >> >> Sajid >> >> On Tue, Sep 22, 2015 at 11:07 PM, Uttam Sinha >> wrote: >> >>> >>> >>> Hi All, >>> >>> I have a set of Landsat images in Sinusoidal Projection, WGS84 Datum. I >>> know the north, south, east and west extent of the boundary of the image. >>> >>> I want to reproject the image to Lamberts Azimuthal Equal Area, WGS84 >>> Datum. I do not know what will be the coordinates of the north, south, east >>> and west bounds in this projection. >>> >>> 1.) How do I convert upper left coordinates and bottom right coordinates >>> of Sinusoidal Projection to Lamberts Azimuthal Equal Area to create a new >>> destination Location? >>> >>> 2.) How do I reproject the images from Sinusoidal to Lamberts without >>> georeferencing the image at source location (in sinusoidal projection) >>> >>> Appreciate any reply. >>> >>> Uttam. >>> >>> ___ >>> grass-user mailing list >>> grass-user@lists.osgeo.org >>> http://lists.osgeo.org/mailman/listinfo/grass-user >>> >> >> > > ___ > grass-user mailing list > grass-user@lists.osgeo.org > http://lists.osgeo.org/mailman/listinfo/grass-user > ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
Re: [GRASS-user] Need help in reprojecting raster images
Hi Uttam, you may want to first do v.in.region in your input location, this creates a vector with the limits of your input location (set g.region to your raster of interest first), then v.proj the output of v.in.region in your target location, set region there with the imported vector and just then try to reproject the raster image. so, steps would be: # in input_location g.region raster=your_raster v.in.region output=vector_region_of_interest # in target location v.proj location=input_location mapset=input_mapset input=vector_region_of_interest output=projected_boundaries g.region vector=projected_boundaries r.proj location=input_location mapset=input_mapset input=input_raster output=output_raster You may also wanna check r.import if you use grass7.1 ( https://grass.osgeo.org/grass71/manuals/r.import.html) or as an add-on in grass 7.0 (https://grass.osgeo.org/grass70/manuals/addons/r.import.html). You can install it with g.extension r.import HTH, Vero 2015-09-23 15:21 GMT-03:00 Uttam Sinha: > > > Hi, > > I tried the way you told. I created a new location in laea without setting > the default boundary. Then from this mapset I used > > r.proj location*=input_location* mapset=*input_mapset* input=*input_raster > name* output= > > *output_raster* > I get an error: > > > ERROR: Input raster map is outside current region > > Any suggestions. > > Uttam. > > > On Tue, Sep 22, 2015 at 11:59 PM, sajid pareeth > wrote: > >> Hi Uttam >> >> If I understand you correctly you want to reproject a landsat image from >> sinusoidal to laea projection!! >> You dont have to manually set the bounding box while reprojecting a >> raster, as GRASS will take care of it. >> >> First you create a new location and mapset with desired output projection >> , which in this case is Lamberts Azimuthal Equal Area. >> Then get into this mapset, use the following r.proj command. >> r.proj location*=input_location* mapset=*input_mapset* input=*input_raster >> name* output= >> *output_raster* >> >> More details here: https://grass.osgeo.org/grass70/manuals/r.proj.html >> >> If you then need to set your working area to a particular bounding box, >> use g.region >> >> g.region raster=*output_raster* >> >> regards >> >> Sajid >> >> On Tue, Sep 22, 2015 at 11:07 PM, Uttam Sinha >> wrote: >> >>> >>> >>> Hi All, >>> >>> I have a set of Landsat images in Sinusoidal Projection, WGS84 Datum. I >>> know the north, south, east and west extent of the boundary of the image. >>> >>> I want to reproject the image to Lamberts Azimuthal Equal Area, WGS84 >>> Datum. I do not know what will be the coordinates of the north, south, east >>> and west bounds in this projection. >>> >>> 1.) How do I convert upper left coordinates and bottom right coordinates >>> of Sinusoidal Projection to Lamberts Azimuthal Equal Area to create a new >>> destination Location? >>> >>> 2.) How do I reproject the images from Sinusoidal to Lamberts without >>> georeferencing the image at source location (in sinusoidal projection) >>> >>> Appreciate any reply. >>> >>> Uttam. >>> >>> ___ >>> grass-user mailing list >>> grass-user@lists.osgeo.org >>> http://lists.osgeo.org/mailman/listinfo/grass-user >>> >> >> > > ___ > grass-user mailing list > grass-user@lists.osgeo.org > http://lists.osgeo.org/mailman/listinfo/grass-user > ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
Re: [GRASS-user] Need help in reprojecting raster images
Hi Uttam If I understand you correctly you want to reproject a landsat image from sinusoidal to laea projection!! You dont have to manually set the bounding box while reprojecting a raster, as GRASS will take care of it. First you create a new location and mapset with desired output projection , which in this case is Lamberts Azimuthal Equal Area. Then get into this mapset, use the following r.proj command. r.proj location*=input_location* mapset=*input_mapset* input=*input_raster name* output= *output_raster* More details here: https://grass.osgeo.org/grass70/manuals/r.proj.html If you then need to set your working area to a particular bounding box, use g.region g.region raster=*output_raster* regards Sajid On Tue, Sep 22, 2015 at 11:07 PM, Uttam Sinhawrote: > > > Hi All, > > I have a set of Landsat images in Sinusoidal Projection, WGS84 Datum. I > know the north, south, east and west extent of the boundary of the image. > > I want to reproject the image to Lamberts Azimuthal Equal Area, WGS84 > Datum. I do not know what will be the coordinates of the north, south, east > and west bounds in this projection. > > 1.) How do I convert upper left coordinates and bottom right coordinates > of Sinusoidal Projection to Lamberts Azimuthal Equal Area to create a new > destination Location? > > 2.) How do I reproject the images from Sinusoidal to Lamberts without > georeferencing the image at source location (in sinusoidal projection) > > Appreciate any reply. > > Uttam. > > ___ > grass-user mailing list > grass-user@lists.osgeo.org > http://lists.osgeo.org/mailman/listinfo/grass-user > ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user