[GRASS-user] problem with grass 6.4.0

Dear all,

I was using GRASS version 6.3.0 and everything worked fine. Now I installed 6.4.1 on a brand new server and I am experiencing some problems.
I want to run the scripts and the locations I had on the old grass and when I execute the command on the new version

r.in.xyz i=input_file.txt o=output_file fs=' ' --o

this is what I get

Reading data ...
ERROR: Bad y-coordinate line 1 column 2. <>

the file I am trying to read from has the following structure

    -7.830 43.050 0.000
    -6.930 42.470 0.000
    -8.530 42.280 0.000
    -7.640 41.710 0.000
    -7.790 43.050 0.000
    -6.900 42.470 0.000

and if I run the same r.in.xyz command in the old server I can import the file correctly.

Why???
--

Alberto Pettazzi

MeteoGalicia - Departamento de Climatología y Observación

Consellería de Medio Ambiente, Territorio e Infraestruturas

Rúa de Roma, 6

15707 Santiago de Compostela. A Coruña

Teléfono: +34-881-999646

e-mail: alberto.pettazzi@meteogalicia.es <mailto:alberto.pettazzi@meteogalicia.es>

On Wed, Jul 11, 2012 at 11:17 AM, Alberto Pettazzi
<alberto.pettazzi@meteogalicia.es> wrote:

Dear all,

I was using GRASS version 6.3.0 and everything worked fine. Now I installed
6.4.1 on a brand new server and I am experiencing some problems.

We highly recommend to get 6.4.2. You don't want to miss the many
improvements :slight_smile:
http://grass.osgeo.org/announces/announce_grass642.html

I want to run the scripts and the locations I had on the old grass and when
I execute the command on the new version

Yes, in general this should work as expected due to the maintained
compatibility.

r.in.xyz i=input_file.txt o=output_file fs=' ' --o

this is what I get

Reading data ...
ERROR: Bad y-coordinate line 1 column 2. <>

the file I am trying to read from has the following structure

   -7.830 43.050 0.000

... is this the first line? In which language are you running GRASS?

But again, it would be much better to upgrade to GRASS 6.4.2 first.

Markus

Alberto,

Your field separator is set to empty string (fs=""), wouldn't that be
the problem?

Cheers,

P_

2012/7/11 Alberto Pettazzi <alberto.pettazzi@meteogalicia.es>:

Dear all,

I was using GRASS version 6.3.0 and everything worked fine. Now I installed
6.4.1 on a brand new server and I am experiencing some problems.
I want to run the scripts and the locations I had on the old grass and when
I execute the command on the new version

r.in.xyz i=input_file.txt o=output_file fs=' ' --o

this is what I get

Reading data ...
ERROR: Bad y-coordinate line 1 column 2. <>

the file I am trying to read from has the following structure

   -7.830 43.050 0.000
   -6.930 42.470 0.000
   -8.530 42.280 0.000
   -7.640 41.710 0.000
   -7.790 43.050 0.000
   -6.900 42.470 0.000

and if I run the same r.in.xyz command in the old server I can import the
file correctly.

Why???
--

Alberto Pettazzi

MeteoGalicia - Departamento de Climatología y Observación

Consellería de Medio Ambiente, Territorio e Infraestruturas

Rúa de Roma, 6

15707 Santiago de Compostela. A Coruña

Teléfono: +34-881-999646

e-mail: alberto.pettazzi@meteogalicia.es
<mailto:alberto.pettazzi@meteogalicia.es>

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

--
Scientist
Landcare Research, New Zealand

Hello Pierre,

the field separator is set to a blank space. Using the 6.3.0 version installed in the old server, r.in.xyz was able to read the file properly, but with the 6.4.1 version installed in the new server i am not able anymore...
I also have problems with gdal, that does not read correctly some files, ie it reads them upside-down...but I will be more specific about that later on....:slight_smile:
I wonder if all this mess is due to some fault in the installation process

regards,

El 12/07/12 05:45, Pierre Roudier escribió:

Alberto,

Your field separator is set to empty string (fs=""), wouldn't that be
the problem?

Cheers,

P_

2012/7/11 Alberto Pettazzi <alberto.pettazzi@meteogalicia.es>:

Dear all,

I was using GRASS version 6.3.0 and everything worked fine. Now I installed
6.4.1 on a brand new server and I am experiencing some problems.
I want to run the scripts and the locations I had on the old grass and when
I execute the command on the new version

r.in.xyz i=input_file.txt o=output_file fs=' ' --o

this is what I get

Reading data ...
ERROR: Bad y-coordinate line 1 column 2. <>

the file I am trying to read from has the following structure

    -7.830 43.050 0.000
    -6.930 42.470 0.000
    -8.530 42.280 0.000
    -7.640 41.710 0.000
    -7.790 43.050 0.000
    -6.900 42.470 0.000

and if I run the same r.in.xyz command in the old server I can import the
file correctly.

Why???
--

Alberto Pettazzi

MeteoGalicia - Departamento de Climatología y Observación

Consellería de Medio Ambiente, Territorio e Infraestruturas

Rúa de Roma, 6

15707 Santiago de Compostela. A Coruña

Teléfono: +34-881-999646

e-mail: alberto.pettazzi@meteogalicia.es
<mailto:alberto.pettazzi@meteogalicia.es>

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

--

Alberto Pettazzi

MeteoGalicia - Departamento de Climatología y Observación

Consellería de Medio Ambiente, Territorio e Infraestruturas

Rúa de Roma, 6

15707 Santiago de Compostela. A Coruña

Teléfono: +34-881-999646

e-mail: alberto.pettazzi@meteogalicia.es <mailto:alberto.pettazzi@meteogalicia.es>

Hi,

I copy/paste your sample data in your email and what I see is the following structure. I’m snot sure if it is the original structure or if it as been modified byt various email software…

   -7.830    43.050     0.000
  • 3 white space
  • your X data
  • 4 white space
  • your Y data
  • 5 white space
  • your Z data
Reading data ...
ERROR: Bad y-coordinate line 1 column 2. <>

the file I am trying to read from has the following structure

   -7.830    43.050     0.000
   -6.930    42.470     0.000
   -8.530    42.280     0.000
   -7.640    41.710     0.000
   -7.790    43.050     0.000
   -6.900    42.470     0.000

and if I run the same r.in.xyz command in the old server I can import the
file correctly.

I don’t know why grass 6.3.0 was able to read it and not grass 6.4.1, but the error message seems to say that the script found only blanck columns …

You can try to sanitize your file, ie not initial space and only 1 space between each column, and tray again to import your file :wink:
I already get some cases like that on “tabulated” ascii files from ArcGis and always needed to sanitise them first !

cheers,
Sylvain

Hi Sylvain,

I copied and pasted the data. You are right, there is some variable space between the comuns due to the fact that the input file is generated by fortran fixed format. Anyway, as I said before, the previous version of GRASS (6.3.0), installed in a different server, was able to read it without any problem.

thank you

El 12/07/12 09:29, Sylvain Maillard escribió:

Hi,

I copy/paste your sample data in your email and what I see is the following structure. I'm snot sure if it is the original structure or if it as been modified byt various email software...

    -7.830 43.050 0.000
- 3 white space
- your X data
- 4 white space
- your Y data
- 5 white space
- your Z data

    Reading data ...
    ERROR: Bad y-coordinate line 1 column 2. <>

    the file I am trying to read from has the following structure

        -7.830 43.050 0.000
        -6.930 42.470 0.000
        -8.530 42.280 0.000
        -7.640 41.710 0.000
        -7.790 43.050 0.000
        -6.900 42.470 0.000

    and if I run the same r.in.xyz command in the old server I can import the
    file correctly.

I don't know why grass 6.3.0 was able to read it and not grass 6.4.1, but the error message seems to say that the script found only blanck columns ...

You can try to sanitize your file, ie not initial space and only 1 space between each column, and tray again to import your file :wink:
I already get some cases like that on "tabulated" ascii files from ArcGis and always needed to sanitise them first !

cheers,
Sylvain

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

--

Alberto Pettazzi

MeteoGalicia - Departamento de Climatología y Observación

Consellería de Medio Ambiente, Territorio e Infraestruturas

Rúa de Roma, 6

15707 Santiago de Compostela. A Coruña

Teléfono: +34-881-999646

e-mail: alberto.pettazzi@meteogalicia.es <mailto:alberto.pettazzi@meteogalicia.es>

Hello Markus,

I have updated the version to 6.4.2 but the problem still persists.

the line

    -7.830 43.050 0.000

is the first line.

The input file was generated by a fortran program. I modified the program in order to separate the fields by comma

    -7.830, 43.050, 0.000,
    -6.930, 42.470, 0.000,
    -8.530, 42.280, 0.000,
    -7.640, 41.710, 0.000,
    -7.790, 43.050, 0.000,
    -6.900, 42.470, 0.000,

and r.in.xyz succeed in reading the input file...

I am running grass through a script in bash, the same that worked in the previous version installed in the previous server

El 11/07/12 18:02, Markus Neteler escribió:

On Wed, Jul 11, 2012 at 11:17 AM, Alberto Pettazzi
<alberto.pettazzi@meteogalicia.es> wrote:

Dear all,

I was using GRASS version 6.3.0 and everything worked fine. Now I installed
6.4.1 on a brand new server and I am experiencing some problems.

We highly recommend to get 6.4.2. You don't want to miss the many
improvements :slight_smile:
http://grass.osgeo.org/announces/announce_grass642.html

I want to run the scripts and the locations I had on the old grass and when
I execute the command on the new version

Yes, in general this should work as expected due to the maintained
compatibility.

r.in.xyz i=input_file.txt o=output_file fs=' ' --o

this is what I get

Reading data ...
ERROR: Bad y-coordinate line 1 column 2. <>

the file I am trying to read from has the following structure

    -7.830 43.050 0.000

... is this the first line? In which language are you running GRASS?

But again, it would be much better to upgrade to GRASS 6.4.2 first.

Markus

--

Alberto Pettazzi

MeteoGalicia - Departamento de Climatología y Observación

Consellería de Medio Ambiente, Territorio e Infraestruturas

Rúa de Roma, 6

15707 Santiago de Compostela. A Coruña

Teléfono: +34-881-999646

e-mail: alberto.pettazzi@meteogalicia.es <mailto:alberto.pettazzi@meteogalicia.es>

It's not surprising that it works with commas.
A numeric field that contains leading whitespace
is easy to parse correctly into a number. But
if the field separator is set to be one space and
the fields are in fact separated by more than one,
r.in.xyz will assume that the column data is missing.

Apparently, the old version of r.in.xyz in GRASS 6.3
was able to tolerate successive field separators,
but the new one is not. Maybe a flag should be added
to r.in.xyz to allow this behavior again.

Ben

--
Benjamin Ducke
{*} Geospatial Consultant
{*} GIS Developer
  
  benducke AT fastmail.fm

On Thu, Jul 12, 2012, at 09:57, Alberto Pettazzi wrote:

Hello Markus,

I have updated the version to 6.4.2 but the problem still persists.

the line

    -7.830 43.050 0.000

is the first line.

The input file was generated by a fortran program. I modified the
program in order to separate the fields by comma

    -7.830, 43.050, 0.000,
    -6.930, 42.470, 0.000,
    -8.530, 42.280, 0.000,
    -7.640, 41.710, 0.000,
    -7.790, 43.050, 0.000,
    -6.900, 42.470, 0.000,

and r.in.xyz succeed in reading the input file...

I am running grass through a script in bash, the same that worked in the
previous version installed in the previous server

El 11/07/12 18:02, Markus Neteler escribió:
> On Wed, Jul 11, 2012 at 11:17 AM, Alberto Pettazzi
> <alberto.pettazzi@meteogalicia.es> wrote:
>> Dear all,
>>
>> I was using GRASS version 6.3.0 and everything worked fine. Now I installed
>> 6.4.1 on a brand new server and I am experiencing some problems.
> We highly recommend to get 6.4.2. You don't want to miss the many
> improvements :slight_smile:
> http://grass.osgeo.org/announces/announce_grass642.html
>
>> I want to run the scripts and the locations I had on the old grass and when
>> I execute the command on the new version
> Yes, in general this should work as expected due to the maintained
> compatibility.
>
>> r.in.xyz i=input_file.txt o=output_file fs=' ' --o
>>
>> this is what I get
>>
>> Reading data ...
>> ERROR: Bad y-coordinate line 1 column 2. <>
>>
>> the file I am trying to read from has the following structure
>>
>> -7.830 43.050 0.000
> ... is this the first line? In which language are you running GRASS?
>
> But again, it would be much better to upgrade to GRASS 6.4.2 first.
>
> Markus

--

Alberto Pettazzi

MeteoGalicia - Departamento de Climatología y Observación

Consellería de Medio Ambiente, Territorio e Infraestruturas

Rúa de Roma, 6

15707 Santiago de Compostela. A Coruña

Teléfono: +34-881-999646

e-mail: alberto.pettazzi@meteogalicia.es
<mailto:alberto.pettazzi@meteogalicia.es>

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