[GRASS-user] r.in.gdal/HF2/HFZ problem

Duffy, Garret garret.duffy at nuigalway.ie
Tue Nov 1 12:22:20 EDT 2011


Hi,

Thanks for the useful suggestions especially the M. Metz's "ERROR 4" info

The double 's were due to my typing.

I still get the "ERROR: 4..." message when I copy the file to the working directory.

However, when I **changed the file extension from HF2 to HFZ**, gdal_translate successfully converts it to a TIF.  r.in.gdal *also* works to import it, had to run r.null and r.colors on it to recover the NULL values then everything was fine.

I take the M. Neteler's point about the version of PROJ... I will now try installing GRASS 6.4 with my RPM installer and DE-selecting the latest version of PROJ to be installed (since I already have 4.5.1 installed)... does this make sense/is this possible?

Garret


-----Original Message-----
From: Markus Metz [mailto:markus.metz.giswork at googlemail.com] 
Sent: 31-Oct-11 8:33 AM
To: Markus Neteler
Cc: Duffy, Garret; grass-user at lists.osgeo.org
Subject: Re: [GRASS-user] r.in.gdal/HF2/HFZ problem

On Sun, Oct 30, 2011 at 4:23 PM, Markus Neteler <neteler at osgeo.org> wrote:
> On Fri, Oct 28, 2011 at 5:21 PM, Duffy, Garret 
> <garret.duffy at nuigalway.ie> wrote:
>> Hi,
>>
>> I'm running grass 6.2 and I've updated gdal to version 1.8.1 in order 
>> to import HF2/HFz files into grass
>>
>> %r.in.gdal -f
>> Supported Formats:
>>  ...
>>   XYZ (rw): ASCII Gridded XYZ
>>   HF2 (rw): HF2/HFZ heightfield raster
>>   OZI (ro): OZI
>>
>> So it should work... but:
>>
>> %r.in.gdal 'input=/path/to/HFZ/5m_irish_sea.HF2' output=test 
>> title=test
>>
>> ERROR 4: `/path/to/HFZ/5m_irish_sea.HF2' not recognised as a 
>> supported file format.
>
> Is it really "/path/to" ? I guess not - if the real path contains 
> white space it may cause troubles in GRASS 6.2. We have fixed such cases in GRASS 6.4.
> Please post the real path you have to better understand the problem.
>
>> I really don't want to update grass as version 4.7 of proj that grass 
>> 6.4 requires doesn't support general RSO projections and I am trying 
>> the reproject the HF2 file into that projection.
>
> grass 6.4 requires proj 4.7? The test in configure is:
>
>    if test `expr "$proj_ver" \< 446` = 1 ; then
>        AC_MSG_ERROR([*** PROJ.4.4.6 or later is required.])
>    fi
>
> which is way older than Proj 4.7.
>
>> Any help would be greatly appreciated.
>>
>> **Could I use "gdal_translate" to change the HF2 to a TIF and then 
>> use
>> r.in.gdal??**
>
> Yes, this would be an alternative.

I'm afraid not, because the above error starting with "ERROR 4:" is issued by gdal, not grass. Therefore any gdal program will report the same error.

I noted some strange single quotes in the above r.in.gdal command.

Can you try
r.in.gdal input="/path/to/HFZ/5m_irish_sea.HF2" output=test title=test instead of r.in.gdal 'input=/path/to/HFZ/5m_irish_sea.HF2' output=test title=test ?
Although I don't think this really helps...

Markus M


More information about the grass-user mailing list