[GRASS-user] grass map names rules

Hi all,
where can I find a doc with the rules for the names I can give to a grass
map object.
I know I ca not use "space" and accented character, but I'm looking for the
complete rules set.

Thank you,

Andrea

-----
Andrea Borruso

----------------------------------------------------
email: aborruso@tin.it
blog: http://blog.spaziogis.it
----------------------------------------------------
--
View this message in context: http://www.nabble.com/grass-map-names-rules-tp20438237p20438237.html
Sent from the Grass - Users mailing list archive at Nabble.com.

Maybe some information in
http://grass.itc.it/grass54/manual/html/r.mapcalc.html, section "Raster Map
Layer Names"... Is it that what you mean?

Regards,
Christian.

Zitat von iomeneandrei <aborruso@tin.it>:

Hi all,
where can I find a doc with the rules for the names I can give to a grass
map object.
I know I ca not use "space" and accented character, but I'm looking for the
complete rules set.

Thank you,

Andrea

-----
Andrea Borruso

----------------------------------------------------
email: aborruso@tin.it
blog: http://blog.spaziogis.it
----------------------------------------------------
--
View this message in context:
http://www.nabble.com/grass-map-names-rules-tp20438237p20438237.html
Sent from the Grass - Users mailing list archive at Nabble.com.

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

----------------------------------------------------------------
This mail was sent through http://webmail.uni-jena.de

iomeneandrei wrote:

where can I find a doc with the rules for the names I can give to a grass
map object.
I know I ca not use "space" and accented character, but I'm looking for the
complete rules set.

Raster maps (as well as 3D rasters, imagery groups and regions) are
all checked using G_legal_filename() in lib/gis/legal_name.c:

  int G_legal_filename(const char *s)
  {
      if (*s == '.' || *s == 0) {
    fprintf(stderr, _("Illegal filename. Cannot be '.' or 'NULL'\n"));
    return -1;
      }
  
      for (; *s; s++)
    if (*s == '/' || *s == '"' || *s == '\'' || *s <= ' ' ||
        *s == '@' || *s == ',' || *s == '=' || *s == '*' || *s > 0176) {
        fprintf(stderr,
          _("Illegal filename. Character <%c> not allowed.\n"), *s);
        return -1;
    }
  
      return 1;
  }

Such names cannot contain control characters (<32), 8-bit characters
(>=128), space, DEL (127), or any of /"'@,=* (slash, double quote,
single quote, at, comma, equals, asterisk).

If you want the map to be usable on Windows, you also cannot use any
of \:?<>| (backslash, colon, question mark, less-than, greater-than,
vertical bar), as those aren't allowed in filenames on Windows.

If a map name contains any of #()+-%><!&|?:;~ (hash, parentheses,
square brackets, plus, minus, percent, greater-than, less-than,
exclamation mark, ampersand, vertical bar, question mark, colon,
semicolon, tilde), it must be quoted within r.mapcalc, as must any
name which is a valid integer or floating-point literal.

Finally, vector map names are limited to valid SQL table names, which
means that they must begin with a letter, can only contain letters,
digits and underscores, and must not be an SQL keyword.

--
Glynn Clements <glynn@gclements.plus.com>

On Tue, Nov 11, 2008 at 3:12 PM, Glynn Clements
<glynn@gclements.plus.com> wrote:

iomeneandrei wrote:

where can I find a doc with the rules for the names I can give to a grass
map object.

now available as FAQ:
http://grass.osgeo.org/wiki/Map_Names

Markus

Thank you very much to all you!!

-----
Andrea Borruso

----------------------------------------------------
email: aborruso@tin.it
blog: http://blog.spaziogis.it
----------------------------------------------------
--
View this message in context: http://www.nabble.com/grass-map-names-rules-tp20438237p20444565.html
Sent from the Grass - Users mailing list archive at Nabble.com.