[GRASS-dev] [GRASS GIS] #2745: i.cluster: report file has wrong linebreaks on Windows

#2745: i.cluster: report file has wrong linebreaks on Windows
-------------------------+---------------------------------
Reporter: neteler | Owner: grass-dev@…
     Type: defect | Status: new
Priority: normal | Milestone: 7.0.2
Component: Imagery | Version: svn-releasebranch70
Keywords: i.cluster | CPU: Unspecified
Platform: MSWindows 7 |
-------------------------+---------------------------------
The reportfile in i.cluster (see manual page for example) is stored with
UNIX style newlines. At time unix2dos is needed.

What is the needed change to change i.cluster to write "new lines" chars
in a way that the resulting ASCII file is properly formatted also on
Windows?

We have done this elsewhere (v.out.ascii?), but I cannot find it.

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/2745&gt;
GRASS GIS <https://grass.osgeo.org>

#2745: i.cluster: report file has wrong linebreaks on Windows
--------------------------+---------------------------------
  Reporter: neteler | Owner: martinl
      Type: defect | Status: assigned
  Priority: normal | Milestone: 7.0.3
Component: Imagery | Version: svn-releasebranch70
Resolution: | Keywords: i.cluster
       CPU: Unspecified | Platform: MSWindows 7
--------------------------+---------------------------------
Changes (by martinl):

* owner: grass-dev@… => martinl
* status: new => assigned
* cc: grass-dev@… (added)

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/2745#comment:2&gt;
GRASS GIS <https://grass.osgeo.org>

#2745: i.cluster: report file has wrong linebreaks on Windows
--------------------------+---------------------------------
  Reporter: neteler | Owner: martinl
      Type: defect | Status: assigned
  Priority: normal | Milestone: 7.0.3
Component: Imagery | Version: svn-releasebranch70
Resolution: | Keywords: i.cluster
       CPU: Unspecified | Platform: MSWindows 7
--------------------------+---------------------------------

Comment (by martinl):

Replying to [ticket:2745 neteler]:
> The reportfile in i.cluster (see manual page for example) is stored with
UNIX style newlines. At time unix2dos is needed.
>
> What is the needed change to change i.cluster to write "new lines" chars
in a way that the resulting ASCII file is properly formatted also on
Windows?

Fixed in trunk (r67276:67277)

> We have done this elsewhere (v.out.ascii?), but I cannot find it.

No, now part of gislib (r67275). Also G7:v.out.ascii and related
subroutines from Vlib fixed (r67278).

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/2745#comment:3&gt;
GRASS GIS <https://grass.osgeo.org>

#2745: i.cluster: report file has wrong linebreaks on Windows
--------------------------+---------------------------------
  Reporter: neteler | Owner: martinl
      Type: defect | Status: assigned
  Priority: normal | Milestone: 7.0.3
Component: Imagery | Version: svn-releasebranch70
Resolution: | Keywords: i.cluster
       CPU: Unspecified | Platform: MSWindows 7
--------------------------+---------------------------------

Comment (by martinl):

You can test latest winGRASS daily builds (build no. 19 on x86_64 or 180
on x86). Then I will backport changes.

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/2745#comment:4&gt;
GRASS GIS <https://grass.osgeo.org>

#2745: i.cluster: report file has wrong linebreaks on Windows
--------------------------+---------------------------------
  Reporter: neteler | Owner: martinl
      Type: defect | Status: assigned
  Priority: normal | Milestone: 7.0.3
Component: Imagery | Version: svn-releasebranch70
Resolution: | Keywords: i.cluster
       CPU: Unspecified | Platform: MSWindows 7
--------------------------+---------------------------------

Comment (by martinl):

Replying to [comment:3 martinl]:

> Fixed in trunk (r67276:67277)
> No, now part of gislib (r67275). Also G7:v.out.ascii and related
subroutines from Vlib fixed (r67278).

I took liberty to backport these changes as bugfixes (r67364:67366). For
testing please use daily builds of 7.0.3svn standalone installer (1,2)

(1) https://wingrass.fsv.cvut.cz/x86_64/grass70/

(2) https://wingrass.fsv.cvut.cz/x86/grass70/

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/2745#comment:5&gt;
GRASS GIS <https://grass.osgeo.org>

#2745: i.cluster: report file has wrong linebreaks on Windows
--------------------------+---------------------------------
  Reporter: neteler | Owner: martinl
      Type: defect | Status: closed
  Priority: normal | Milestone: 7.0.3
Component: Imagery | Version: svn-releasebranch70
Resolution: fixed | Keywords: i.cluster
       CPU: Unspecified | Platform: MSWindows 7
--------------------------+---------------------------------
Changes (by martinl):

* status: assigned => closed
* resolution: => fixed

Comment:

I have tested fresh build of 7.0.3svn both G7:i.cluster and
G7:v.out.ascii. Seems to be OK. Closing the ticket, feel free to re-open
if needed.

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/2745#comment:6&gt;
GRASS GIS <https://grass.osgeo.org>