Hi,

2013/12/12 Markus Metz <[email protected]>:

> I have fully reverted r58417 because with strtok, "A sequence of two
> or more contiguous delimiter characters in the parsed string is
> considered to  be  a single  delimiter" (man strtok), whereas the
> GRASS routine does not merge delimiters.

why? It was useful, for example national DEM/DSM in Czech Republic
(sample data [1]) is provided in the format where coordinates are
separated with *two* or more spaces. In other words, with the native
tokenize function `r.in.xyz sep=space` or `r.in.xyz sep="  "`
(double-space as user could expect that it will work) fails bacouse
G_tokenize("x  y", " "); returns {'x', '', 'y'} and not  {'x', 'y'}.
With strtok-based tokenizing such string works perfectly.

BTW, `separator` parameter can be string with more than one character,
but native tokenize subroutine fails to tokenize such string with
multiple-character delimiter, eg. G_tokenize("firstSElast", "SE");
returns {'first', '', 'last'} and not {'first', 'last'} as someone
could expect.

Martin

[1] http://geoportal.cuzk.cz/UKAZKOVA_DATA/VYSKOPIS.zip

-- 
Martin Landa <landa.martin gmail.com> * http://geo.fsv.cvut.cz/~landa
_______________________________________________
grass-user mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/grass-user

Reply via email to