Problem in reading .grd file using raster package

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Problem in reading .grd file using raster package

soumendey
Hi all,

I have a .grd file on rainfall data (sharing the file link below). It
is a Geosoft
grid format file. The following error I encountered when I tried to read
that using 'raster' package.


> require(raster)
Loading required package: raster
Loading required package: sp

> x<-raster("rf_1984.grd") Error in .local(.Object, ...) : `C:\Users\Soumen
Dey\Desktop\rf_1984.grd' not recognised as a supported file format. Error
in .rasterObjectFromFile(x, band = band, objecttype = "RasterLayer", :
Cannot create a RasterLayer object from this file.


Can anybody can give any suggestions regarding this and help me reading
this file ?

https://drive.google.com/file/d/0B3Mnscd1GGfkd2JkNzk4ODE0ZEE/view?usp=sharing

Thanks for your time.

Soumen

        [[alternative HTML version deleted]]

_______________________________________________
R-sig-Geo mailing list
[hidden email]
https://stat.ethz.ch/mailman/listinfo/r-sig-geo
Reply | Threaded
Open this post in threaded view
|

Re: Problem in reading .grd file using raster package

Tim Appelhans
Morning,
a quick google search "geosoft read in r" returns this mailing list
conversation from 2.5 years ago

http://r-sig-geo.2731867.n2.nabble.com/reading-grd-files-td7583427.html


Tim

On 07.11.2015 04:11, Soumen Dey wrote:

> Hi all,
>
> I have a .grd file on rainfall data (sharing the file link below). It
> is a Geosoft
> grid format file. The following error I encountered when I tried to read
> that using 'raster' package.
>
>
>> require(raster)
> Loading required package: raster
> Loading required package: sp
>
>> x<-raster("rf_1984.grd") Error in .local(.Object, ...) : `C:\Users\Soumen
> Dey\Desktop\rf_1984.grd' not recognised as a supported file format. Error
> in .rasterObjectFromFile(x, band = band, objecttype = "RasterLayer", :
> Cannot create a RasterLayer object from this file.
>
>
> Can anybody can give any suggestions regarding this and help me reading
> this file ?
>
> https://drive.google.com/file/d/0B3Mnscd1GGfkd2JkNzk4ODE0ZEE/view?usp=sharing
>
> Thanks for your time.
>
> Soumen
>
> [[alternative HTML version deleted]]
>
> _______________________________________________
> R-sig-Geo mailing list
> [hidden email]
> https://stat.ethz.ch/mailman/listinfo/r-sig-geo

--
#####################################
Tim Appelhans
Department of Geography
Environmental Informatics
Philipps Universität Marburg
Deutschhausstraße 12
Raum 00A08
35032 Marburg (Paketpost: 35037 Marburg)
Germany

Tel +49 (0) 6421 28-25957

http://environmentalinformatics-marburg.de/

_______________________________________________
R-sig-Geo mailing list
[hidden email]
https://stat.ethz.ch/mailman/listinfo/r-sig-geo
Reply | Threaded
Open this post in threaded view
|

Re: Problem in reading .grd file using raster package

soumendey
Hi Tim,

I saw that conversation. Using montage viewer (as suggested by Barry) I
couldn't convert into an .flt file. Some error occurred. The montage viewer
does not specify what error initiated it. But in anyway raster should read
a .grd file. But in this case it isn't.

Soumen

On Sat, Nov 7, 2015 at 2:39 PM, Tim Appelhans <[hidden email]>
wrote:

> Morning,
> a quick google search "geosoft read in r" returns this mailing list
> conversation from 2.5 years ago
>
> http://r-sig-geo.2731867.n2.nabble.com/reading-grd-files-td7583427.html
>
>
> Tim
>
>
> On 07.11.2015 04:11, Soumen Dey wrote:
>
>> Hi all,
>>
>> I have a .grd file on rainfall data (sharing the file link below). It
>> is a Geosoft
>> grid format file. The following error I encountered when I tried to read
>> that using 'raster' package.
>>
>>
>> require(raster)
>>>
>> Loading required package: raster
>> Loading required package: sp
>>
>> x<-raster("rf_1984.grd") Error in .local(.Object, ...) : `C:\Users\Soumen
>>>
>> Dey\Desktop\rf_1984.grd' not recognised as a supported file format. Error
>> in .rasterObjectFromFile(x, band = band, objecttype = "RasterLayer", :
>> Cannot create a RasterLayer object from this file.
>>
>>
>> Can anybody can give any suggestions regarding this and help me reading
>> this file ?
>>
>>
>> https://drive.google.com/file/d/0B3Mnscd1GGfkd2JkNzk4ODE0ZEE/view?usp=sharing
>>
>> Thanks for your time.
>>
>> Soumen
>>
>>         [[alternative HTML version deleted]]
>>
>> _______________________________________________
>> R-sig-Geo mailing list
>> [hidden email]
>> https://stat.ethz.ch/mailman/listinfo/r-sig-geo
>>
>
> --
> #####################################
> Tim Appelhans
> Department of Geography
> Environmental Informatics
> Philipps Universität Marburg
> Deutschhausstraße 12
> Raum 00A08
> 35032 Marburg (Paketpost: 35037 Marburg)
> Germany
>
> Tel +49 (0) 6421 28-25957
>
> http://environmentalinformatics-marburg.de/
>
> _______________________________________________
> R-sig-Geo mailing list
> [hidden email]
> https://stat.ethz.ch/mailman/listinfo/r-sig-geo
>

        [[alternative HTML version deleted]]

_______________________________________________
R-sig-Geo mailing list
[hidden email]
https://stat.ethz.ch/mailman/listinfo/r-sig-geo
Reply | Threaded
Open this post in threaded view
|

Re: Problem in reading .grd file using raster package

Tim Appelhans
Soumen,
ratser uses .grd (+.gri) file endings for it's own file format. That has
nothing to do with Geosoft .grd files, apart from the fact that the file
endings are identical. My guess is if gdal is not able to read it, you
will still need to convert it somehow before getting it into R.

Tim

On 07.11.2015 10:17, Soumen Dey wrote:

> Hi Tim,
>
> I saw that conversation. Using montage viewer (as suggested by Barry)
> I couldn't convert into an .flt file. Some error occurred. The montage
> viewer does not specify what error initiated it. But in anyway raster
> should read a .grd file. But in this case it isn't.
>
> Soumen
>
> On Sat, Nov 7, 2015 at 2:39 PM, Tim Appelhans <[hidden email]
> <mailto:[hidden email]>> wrote:
>
>     Morning,
>     a quick google search "geosoft read in r" returns this mailing
>     list conversation from 2.5 years ago
>
>     http://r-sig-geo.2731867.n2.nabble.com/reading-grd-files-td7583427.html
>
>
>     Tim
>
>
>     On 07.11.2015 04:11, Soumen Dey wrote:
>
>         Hi all,
>
>         I have a .grd file on rainfall data (sharing the file link
>         below). It
>         is a Geosoft
>         grid format file. The following error I encountered when I
>         tried to read
>         that using 'raster' package.
>
>
>             require(raster)
>
>         Loading required package: raster
>         Loading required package: sp
>
>             x<-raster("rf_1984.grd") Error in .local(.Object, ...) :
>             `C:\Users\Soumen
>
>         Dey\Desktop\rf_1984.grd' not recognised as a supported file
>         format. Error
>         in .rasterObjectFromFile(x, band = band, objecttype =
>         "RasterLayer", :
>         Cannot create a RasterLayer object from this file.
>
>
>         Can anybody can give any suggestions regarding this and help
>         me reading
>         this file ?
>
>         https://drive.google.com/file/d/0B3Mnscd1GGfkd2JkNzk4ODE0ZEE/view?usp=sharing
>
>         Thanks for your time.
>
>         Soumen
>
>                 [[alternative HTML version deleted]]
>
>         _______________________________________________
>         R-sig-Geo mailing list
>         [hidden email] <mailto:[hidden email]>
>         https://stat.ethz.ch/mailman/listinfo/r-sig-geo
>
>
>     --
>     #####################################
>     Tim Appelhans
>     Department of Geography
>     Environmental Informatics
>     Philipps Universität Marburg
>     Deutschhausstraße 12
>     Raum 00A08
>     35032 Marburg (Paketpost: 35037 Marburg)
>     Germany
>
>     Tel +49 (0) 6421 28-25957
>
>     http://environmentalinformatics-marburg.de/
>
>     _______________________________________________
>     R-sig-Geo mailing list
>     [hidden email] <mailto:[hidden email]>
>     https://stat.ethz.ch/mailman/listinfo/r-sig-geo
>
>

--
#####################################
Tim Appelhans
Department of Geography
Environmental Informatics
Philipps Universität Marburg
Deutschhausstraße 12
Raum 00A08
35032 Marburg (Paketpost: 35037 Marburg)
Germany

Tel +49 (0) 6421 28-25957

http://environmentalinformatics-marburg.de/


        [[alternative HTML version deleted]]

_______________________________________________
R-sig-Geo mailing list
[hidden email]
https://stat.ethz.ch/mailman/listinfo/r-sig-geo
Reply | Threaded
Open this post in threaded view
|

Re: Problem in reading .grd file using raster package

soumendey
Tim,
I really appreciate for the clarification about the .grd file encoding. I
will try to convert it somehow to .flt or something else. If you find
anything useful kindly pass through.

Soumen

On Sat, Nov 7, 2015 at 2:51 PM, Tim Appelhans <[hidden email]>
wrote:

> Soumen,
> ratser uses .grd (+.gri) file endings for it's own file format. That has
> nothing to do with Geosoft .grd files, apart from the fact that the file
> endings are identical. My guess is if gdal is not able to read it, you will
> still need to convert it somehow before getting it into R.
>
> Tim
>
>
> On 07.11.2015 10:17, Soumen Dey wrote:
>
> Hi Tim,
>
> I saw that conversation. Using montage viewer (as suggested by Barry) I
> couldn't convert into an .flt file. Some error occurred. The montage viewer
> does not specify what error initiated it. But in anyway raster should read
> a .grd file. But in this case it isn't.
>
> Soumen
>
> On Sat, Nov 7, 2015 at 2:39 PM, Tim Appelhans <[hidden email]>
> wrote:
>
>> Morning,
>> a quick google search "geosoft read in r" returns this mailing list
>> conversation from 2.5 years ago
>>
>> http://r-sig-geo.2731867.n2.nabble.com/reading-grd-files-td7583427.html
>>
>>
>> Tim
>>
>>
>> On 07.11.2015 04:11, Soumen Dey wrote:
>>
>>> Hi all,
>>>
>>> I have a .grd file on rainfall data (sharing the file link below). It
>>> is a Geosoft
>>> grid format file. The following error I encountered when I tried to read
>>> that using 'raster' package.
>>>
>>>
>>> require(raster)
>>>>
>>> Loading required package: raster
>>> Loading required package: sp
>>>
>>> x<-raster("rf_1984.grd") Error in .local(.Object, ...) : `C:\Users\Soumen
>>>>
>>> Dey\Desktop\rf_1984.grd' not recognised as a supported file format. Error
>>> in .rasterObjectFromFile(x, band = band, objecttype = "RasterLayer", :
>>> Cannot create a RasterLayer object from this file.
>>>
>>>
>>> Can anybody can give any suggestions regarding this and help me reading
>>> this file ?
>>>
>>>
>>> https://drive.google.com/file/d/0B3Mnscd1GGfkd2JkNzk4ODE0ZEE/view?usp=sharing
>>>
>>> Thanks for your time.
>>>
>>> Soumen
>>>
>>>         [[alternative HTML version deleted]]
>>>
>>> _______________________________________________
>>> R-sig-Geo mailing list
>>> [hidden email]
>>> https://stat.ethz.ch/mailman/listinfo/r-sig-geo
>>>
>>
>> --
>> #####################################
>> Tim Appelhans
>> Department of Geography
>> Environmental Informatics
>> Philipps Universität Marburg
>> Deutschhausstraße 12
>> Raum 00A08
>> 35032 Marburg (Paketpost: 35037 Marburg)
>> Germany
>>
>> Tel +49 (0) 6421 28-25957
>>
>> http://environmentalinformatics-marburg.de/
>>
>> _______________________________________________
>> R-sig-Geo mailing list
>> [hidden email]
>> https://stat.ethz.ch/mailman/listinfo/r-sig-geo
>>
>
>
> --
> #####################################
> Tim Appelhans
> Department of Geography
> Environmental Informatics
> Philipps Universität Marburg
> Deutschhausstraße 12
> Raum 00A08
> 35032 Marburg (Paketpost: 35037 Marburg)
> Germany
>
> Tel +49 (0) 6421 28-25957
> http://environmentalinformatics-marburg.de/
>
>

        [[alternative HTML version deleted]]

_______________________________________________
R-sig-Geo mailing list
[hidden email]
https://stat.ethz.ch/mailman/listinfo/r-sig-geo