[GRASS5] raster filename length problem
vincent at ecovla.nl
vincent at ecovla.nl
Tue Jul 12 11:02:04 EDT 2005
Hi Markus, list,
Markus Neteler wrote:
>Hi,
>
>there is a problem with long filenames somewhere:
>
>r.reclass.area modis_evi_class_forest out=modis_evi_class_forest_nosmall greater=100
>d.rast modis_evi_class_forest_nosmall
>WARNING: unable to open [modis_evi_class_forest_nosmall] in [bluetongue]
> since it is a reclass of
> [modis_evi_class_forest.clump.modis_evi_class_foresbluetongue] in
> ^-PROBLEM
> [bluetongue] which does not exist
>WARNING: unable to open raster map [modis_evi_class_forest_nosmall in
> bluetongue]
>ERROR: Not able to open cellfile for [modis_evi_class_forest_nosmall]
>
>I searched around in r.stats, r.clump, r.reclass, d.rast but didn't
>find the problem. The desired filename interally created by r.reclass.area
>will be of around 60 chars.
>
>In the source code different name/mapset string length are scattered
>around. What about changing the hardcoded ones to a single definition in
>include/gis.h?
>
>So far there is
> imagery.h:
> #define INAME_LEN 30
> char name[30]; /* length is not in sync with other definitions */
> char mapset[30];
>
>which is definitly too short.
>
>Opinions?
>
>
I encountered more or less the same problem, concerning names of
imaginary groups in grass (cvs version). first I thought setting
INAME_LEN in imagery.h to 256 or something like that would do the trick,
but things appeared a lot more complex than that. Sometimes other
lengths are used (something like 128 if I recall correctly) and often
buffers are allocated not using INAME_LEN but just a fixed integer number.
To sum things up, I started to look at it with the goal to make a simple
patch, but because of the complexity and of other (personal) reasons, I
did never make it, and probably (alas) will not (soon) do so too.
However, when this will get fixed by someone else, I will be most
grateful of course ;-)
Vincent.
>Markus
>
>_______________________________________________
>grass5 mailing list
>grass5 at grass.itc.it
>http://grass.itc.it/mailman/listinfo/grass5
>
>
More information about the grass-dev
mailing list