Re: [GRASS-dev] [gdal-dev] Setting NODATA to -nan

2015-07-21 Thread Glynn Clements

Even Rouault wrote:

 - I've had a look at https://trac.osgeo.org/grass/changeset/65602 and my 
 understanding is that now a pixel value at NaN will be considered as null, 
 even if null_val is not NaN (but this is perhaps intended, if so, ignore 
 this). 
 
 - This is just for the sake of my curiosity: do you know how -nan pixel 
 values 
 can be generated by GRASS in practice ? (This was what triggered all this: 
 the 
 GDAL reporter was surprised to see pixels at -nan and nodata at nan, and 
 thought that something was wrong)

Rast_set_d_null_value() and Rast_set_f_null_value() use the all-ones
bit pattern. This is one of the many NaN values (anything with an
all-ones exponent and a non-zero mantissa is NaN). As the topmost bit
(i.e. the sign bit) is set, it's possible that some code would
consider that to be -NaN. E.g. code which writes a leading - based
upon the sign bit before considering the other components would do so.

Rast_is_d_null_value() and Rast_is_f_null_value() treat any NaN as
null (specifically, they test whether the value is unequal to itself).

At one time, these functions (or rather, their predecessors) checked
explicitly for the all-ones pattern, but this was changed (in r33717
and r33752) to improve robustness. Apart from code explicitly setting
a value to null, NaNs can arise from calculations (0.0/0.0, sqrt(x)
or log(x) for x0, asin(x) or acos(x) for abs(x)1, etc), and there's
no guarantee as to exactly which NaN representation will result.

-- 
Glynn Clements gl...@gclements.plus.com
___
grass-dev mailing list
grass-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-dev


Re: [GRASS-dev] [GRASS GIS] #2712: WARNING: Unable to rename null file

2015-07-21 Thread GRASS GIS
#2712: WARNING: Unable to rename null file
+-
  Reporter:  hellik |  Owner:  grass-dev@…
  Type:  defect | Status:  new
  Priority:  blocker|  Milestone:  7.1.0
 Component:  LibRaster  |Version:  svn-trunk
Resolution: |   Keywords:  raster
   CPU:  x86-32 |   Platform:  MSWindows Vista
+-

Comment (by martinl):

 The bug seems to be related to the recent changes in null data support
 done in trunk.

--
Ticket URL: https://trac.osgeo.org/grass/ticket/2712#comment:9
GRASS GIS http://grass.osgeo.org

___
grass-dev mailing list
grass-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-dev

Re: [GRASS-dev] chrcat

2015-07-21 Thread Glynn Clements

Martin Landa wrote:

 recently I needed to append char to string [1], I locally added a new
 static function to file_name.c. This function will be needed on other
 places too, would make sense to added it to GRASS API (string.c) as
 G_chrcat(), what do you think?

If it's needed, lib/gis/string.c is the logical place for it to go.

-- 
Glynn Clements gl...@gclements.plus.com
___
grass-dev mailing list
grass-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-dev


Re: [GRASS-dev] [GRASS GIS] #2708: Run GRASS with Python3

2015-07-21 Thread GRASS GIS
#2708: Run GRASS with Python3
--+-
  Reporter:  zarch|  Owner:  grass-dev@…
  Type:  defect   | Status:  new
  Priority:  normal   |  Milestone:  7.0.1
 Component:  Default  |Version:  unspecified
Resolution:   |   Keywords:
   CPU:  Unspecified  |   Platform:  Unspecified
--+-

Comment (by glynn):

 Replying to [comment:2 zarch]:

 
 {{{
 In [5]: %s=%s % (b'raster'.decode(), b'elevation'.decode())
 Out[5]: 'raster=elevation'
 }}}
 
  Do you have an idea on how we could/should fix this?

 Just avoid using string formatting for such trivial cases, e.g.:

 {{{
 args.append(opt.encode('ascii') + b'=' + _make_val(val)
 }}}

 To be honest, converting grass.script to Python 3 isn't going to be much
 fun, as a scripting library fundamentally revolves around dealing with
 byte strings (command-line arguments, environment variables,
 stdin/stdout), while Python 3 tries to pretend that byte strings are some
 kind of low-level implementation detail in a world where everything is
 Unicode.

--
Ticket URL: https://trac.osgeo.org/grass/ticket/2708#comment:3
GRASS GIS http://grass.osgeo.org

___
grass-dev mailing list
grass-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-dev

Re: [GRASS-dev] what is the meaning of: Error reading raster data for row 239 of MASK

2015-07-21 Thread Glynn Clements

Moritz Lennert wrote:

 Ok. In any case, this probably a candidate for backporting to 
 grass70release before the upcoming release. Can it be backported as such ?

Yes.

-- 
Glynn Clements gl...@gclements.plus.com
___
grass-dev mailing list
grass-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-dev


Re: [GRASS-dev] [GRASS GIS] #2713: GUI hangs when adding vector map from cli

2015-07-21 Thread GRASS GIS
#2713: GUI hangs when adding vector map from cli
+-
  Reporter:  lfurtkevicova  |  Owner:  grass-dev@…
  Type:  defect | Status:  new
  Priority:  critical   |  Milestone:  7.1.0
 Component:  wxGUI  |Version:  svn-trunk
Resolution: |   Keywords:  rendering
   CPU:  Unspecified|   Platform:  Linux
+-

Comment (by martinl):

 Should be fixed in r65765.

--
Ticket URL: https://trac.osgeo.org/grass/ticket/2713#comment:1
GRASS GIS http://grass.osgeo.org

___
grass-dev mailing list
grass-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-dev

Re: [GRASS-dev] what is the meaning of: Error reading raster data for row 239 of MASK

2015-07-21 Thread Martin Landa
2015-07-21 20:36 GMT+02:00 Glynn Clements gl...@gclements.plus.com:
 Ok. In any case, this probably a candidate for backporting to
 grass70release before the upcoming release. Can it be backported as such ?

 Yes.

I backported r65591 to relbr70 as r65764. Martin

-- 
Martin Landa
http://geo.fsv.cvut.cz/gwiki/Landa
http://gismentors.cz/mentors/landa
___
grass-dev mailing list
grass-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-dev


[GRASS-dev] Travis CI

2015-07-21 Thread Ivan Minčík
Hi all,
we have just integrated Travis Continuous Integration system [1] to the
GRASS source code. Every commit is now build in Travis [2] using gcc and
clang. In case the build fails, error message should go to GRASS-dev list.


1 - https://trac.osgeo.org/grass/browser/grass/trunk/.travis.yml
2 - https://travis-ci.org/GRASS-GIS/grass-ci

-- 
Ivan Minčík
ivan.min...@gmail.com  GPG: 0x79529A1E
http://imincik.github.io/0x79529A1E.key
ivan.min...@gista.sk GPG: 0xD714B02C
http://imincik.github.io/0xD714B02C.key
___
grass-dev mailing list
grass-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-dev

Re: [GRASS-dev] Travis CI

2015-07-21 Thread Martin Landa
Dear Ivan,

2015-07-21 11:52 GMT+02:00 Ivan Minčík ivan.min...@gmail.com:

 we have just integrated Travis Continuous Integration system [1] to the
 GRASS source code. Every commit is now build in Travis [2] using gcc and
 clang. In case the build fails, error message should go to GRASS-dev list.

thanks for your great contribution! Martin

-- 
Martin Landa
http://geo.fsv.cvut.cz/gwiki/Landa
http://gismentors.cz/mentors/landa
___
grass-dev mailing list
grass-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-dev

[GRASS-dev] Fixed: GRASS-GIS/grass-ci#51 (master - 8e676b2)

2015-07-21 Thread Travis CI
Build Update for GRASS-GIS/grass-ci
-

Build: #51
Status: Fixed

Duration: 6 minutes and 9 seconds
Commit: 8e676b2 (master)
Author: Martin Landa
Message: This is a test commit for Travis CI builds which should run again.


git-svn-id: https://svn.osgeo.org/grass/grass/trunk@65744 
15284696-431f-4ddb-bdfa-cd5b030d7da7

View the changeset: 
https://github.com/GRASS-GIS/grass-ci/compare/1ccc285f4826...8e676b208f7c

View the full build log and details: 
https://travis-ci.org/GRASS-GIS/grass-ci/builds/71915263

--

You can configure recipients for build notifications in your .travis.yml file. 
See http://docs.travis-ci.com/user/notifications


___
grass-dev mailing list
grass-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-dev

[GRASS-dev] Broken: GRASS-GIS/grass-ci#50 (master - 1ccc285)

2015-07-21 Thread Travis CI
Build Update for GRASS-GIS/grass-ci
-

Build: #50
Status: Broken

Duration: 10 minutes and 52 seconds
Commit: 1ccc285 (master)
Author: Martin Landa
Message: This is a test commit for Travis CI builds which should not run.


git-svn-id: https://svn.osgeo.org/grass/grass/trunk@65743 
15284696-431f-4ddb-bdfa-cd5b030d7da7

View the changeset: 
https://github.com/GRASS-GIS/grass-ci/compare/a3b53e5af6f2...1ccc285f4826

View the full build log and details: 
https://travis-ci.org/GRASS-GIS/grass-ci/builds/71912545

--

You can configure recipients for build notifications in your .travis.yml file. 
See http://docs.travis-ci.com/user/notifications


___
grass-dev mailing list
grass-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-dev

Re: [GRASS-dev] [GRASS-user] cannot re-open thematic mapsd

2015-07-21 Thread Anna Petrášová
On Tue, Jul 21, 2015 at 11:03 AM, henk witte henk.wi...@groenholland.nl
wrote:

  Hello All,



 If I create a thematic map (d.vect.thematic) I can re open and edit it in
 the GUI fine during a session. However, if I re-open the workspace and try
 to reopen the properties of the thematic map I get an error (I can render
 the map without problems). This means I have to recreate all thematic maps
 if I need to make some change.



 The traceback shows:



 Traceback (most recent call last):

   File C:\Program Files (x86)\GRASS GIS

 7.0.0\gui\wxpython\lmgr\layertree.py, line 1276, in

 OnActivateLayer



 self.PropertiesDialog(layer)

   File C:\Program Files (x86)\GRASS GIS

 7.0.0\gui\wxpython\lmgr\layertree.py, line 1244, in

 PropertiesDialog



 completed = (self.GetOptData,layer,params))

   File C:\Program Files (x86)\GRASS GIS

 7.0.0\gui\wxpython\gui_core\forms.py, line 2413, in

 ParseCommand



 get_dcmd = get_dcmd, layer = layer)

   File C:\Program Files (x86)\GRASS GIS

 7.0.0\gui\wxpython\gui_core\forms.py, line 466, in __init__



 frame = self)

   File C:\Program Files (x86)\GRASS GIS

 7.0.0\gui\wxpython\gui_core\forms.py, line 1463, in

 __init__



 default_color, label_color = utils.color_resolve(p['value'])

   File C:\Program Files (x86)\GRASS GIS

 7.0.0\gui\wxpython\core\utils.py, line 989, in

 color_resolve



 rgb = tuple(map(int, color.split(':')))

 ValueError

 :

 invalid literal for int() with base 10: '20,254'


I hopefully fixed the problem in r65750, so it will be available in the
next release. You can test daily builds here:
 http://wingrass.fsv.cvut.cz/grass70/

Anna







 Henk Witte

 Groenholland Geo-energysystems

 Valschermkade 26

 1059CD Amsterdam



 T: +31 (0)20 6159050

 M: +31 (0)628176535

 E: henk.wi...@groenholland.nl



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

___
grass-dev mailing list
grass-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-dev

[GRASS-dev] v.patch process error: Process ended with non-zero return code -9.

2015-07-21 Thread Gra
I'm running v.patch on a large data set.

I'm connected to postgresql.

here is the error:

grass.exceptions.CalledModuleError: Module run None ['v.patch', '--o',
'-e',
'input=fraf10___nw,fraf11___nw,fraf12___nw,fraf13___nw,fraf14___nw,fraf15___nw,fraf16___nw,fraf17___nw,fraf18___nw,fraf19___nw,fraf20___nw,fraf21___nw,fraf22___nw,fraf23___nw,fraf24___nw',
'output=fraf_patch']

ended with error
Process ended with non-zero return code -9. See errors in the (error)
output.

could you tell me how to solve the problem or which error is -9

many thanks

Grazia
___
grass-dev mailing list
grass-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-dev

Re: [GRASS-dev] v.patch process error: Process ended with non-zero return code -9.

2015-07-21 Thread Martin Landa
Hi,

2015-07-21 10:49 GMT+02:00 Gra graz...@gmail.com:
 grass.exceptions.CalledModuleError: Module run None ['v.patch', '--o', '-e',
 'input=fraf10___nw,fraf11___nw,fraf12___nw,fraf13___nw,fraf14___nw,fraf15___nw,fraf16___nw,fraf17___nw,fraf18___nw,fraf19___nw,fraf20___nw,fraf21___nw,fraf22___nw,fraf23___nw,fraf24___nw',
 'output=fraf_patch']

 ended with error
 Process ended with non-zero return code -9. See errors in the (error)
 output.

could be probably related to [1]. I will try to take a look at it
during GRASS Community Sprint in Como (today).

Martin

[1] https://trac.osgeo.org/grass/ticket/2711

-- 
Martin Landa
http://geo.fsv.cvut.cz/gwiki/Landa
http://gismentors.cz/mentors/landa
___
grass-dev mailing list
grass-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-dev


Re: [GRASS-dev] [GRASS GIS] #2711: v.patch -e crashes

2015-07-21 Thread GRASS GIS
#2711: v.patch -e crashes
-+-
  Reporter:  hellik  |  Owner:  grass-dev@…
  Type:  defect  | Status:  new
  Priority:  normal  |  Milestone:  7.0.1
 Component:  Vector  |Version:  svn-releasebranch70
Resolution:  |   Keywords:  v.patch, wingrass
   CPU:  x86-32  |   Platform:  MSWindows Vista
-+-

Comment (by martinl):

 Segfault should be fixed in r65741. Please could you test it in trunk?

 BTW, the command doesn't work for me

 {{{
 v.patch -e --verbose input=geology@PERMANENT,streams@PERMANENT
 output=testvpatchwithattributes
 ERROR: Number of columns differ
 }}}

--
Ticket URL: https://trac.osgeo.org/grass/ticket/2711#comment:1
GRASS GIS http://grass.osgeo.org

___
grass-dev mailing list
grass-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-dev