Re: [GRASS-dev] [GRASS GIS] #4016: i.modis.download Attribute Error (was: i.modis.import Attribute Error)

2020-01-08 Thread GRASS GIS
#4016: i.modis.download Attribute Error
+-
  Reporter:  gabrieldeluca  |  Owner:  grass-dev@…
  Type:  defect | Status:  new
  Priority:  normal |  Milestone:
 Component:  Addons |Version:  unspecified
Resolution: |   Keywords:
   CPU:  Unspecified|   Platform:  Linux
+-

-- 
Ticket URL: 
GRASS GIS 

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

[GRASS-dev] [GRASS GIS] #4016: i.modis.import Attribute Error

2020-01-08 Thread GRASS GIS
#4016: i.modis.import Attribute Error
---+-
 Reporter:  gabrieldeluca  |  Owner:  grass-dev@…
 Type:  defect | Status:  new
 Priority:  normal |  Milestone:
Component:  Addons |Version:  unspecified
 Keywords: |CPU:  Unspecified
 Platform:  Linux  |
---+-
 Running GRASS GIS 7.8.2, in Ubuntu 18.04 (bionic).

 I have installed `pymodis` library via `pip3` succesfully. Also, I have
 installed `i.modis` add-on.

 I have created an executable bash file, named `import_modis.sh`, to
 download MODIS Land Surface Temperature products:

 {{{
 #!/bin/bash

 i.modis.download settings=$HOME/settings \
  product=lst_terra_monthly_5600 \
  tile=h11v05 \
  startday=2015-01-01 endday=2017-12-31 \
  folder=/tmp
 }}}

 Where `settings` is the name of a text file in my home folder, with one
 line for my user and one line for my password at earthexplorer site.

 When I run: `grass78 /home/ga/grassdata/nc_basic_spm_grass7/modis_lst
 --exec sh import_modis.sh`, it returns:

 {{{
 Starting GRASS GIS...
 Cleaning up temporary files...
 Executing  ...
 WxPython missing, no GUI enabled
 Traceback (most recent call last):
   File "/home/ga/.grass7/addons/scripts/i.modis.download", line 274, in
 
 sys.exit(main())
   File "/home/ga/.grass7/addons/scripts/i.modis.download", line 246, in
 main
 prod = product(produ).returned()
   File "/home/ga/.grass7/addons/etc/i.modis/rmodislib.py", line 302, in
 returned
 if self.products.keys().count(self.prod) == 1:
 AttributeError: 'dict_keys' object has no attribute 'count'
 Execution of  finished.
 Cleaning up default sqlite database ...
 Cleaning up temporary files...
 }}}

 I could not find information to help me solve if it is a problem in my
 implementation. Nor did I find a similar previous report here.

 Any detail or clarification that is necessary do not hesitate to ask me.

-- 
Ticket URL: 
GRASS GIS 

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

Re: [GRASS-dev] [GRASS GIS] #2499: v.in.ogr in does not handle "nan" in attribute tables properly

2020-01-08 Thread GRASS GIS
#2499: v.in.ogr in does not handle "nan" in attribute tables properly
--+-
  Reporter:  sbl  |  Owner:  grass-dev@…
  Type:  defect   | Status:  new
  Priority:  normal   |  Milestone:  7.8.3
 Component:  Vector   |Version:  unspecified
Resolution:   |   Keywords:  v.in.ogr, DBMI, SQLite, nan
   CPU:  Unspecified  |   Platform:  Unspecified
--+-

Comment (by mmetz):

 Replying to [comment:13 sbl]:
 > In addition, the different DMBS behave differently with regards to
 nan/inf...
 >
 > This is how PostgreSQL handles NaN / Inf in double columns:
 [...]
 >
 > {{{
 > SELECT * FROM test_insert_nan WHERE double_column > 0;
 > }}}
 >
 > {{{
 > double_column
 > double precision
 > "NaN"
 > "NaN"
 > "Infinity"
 > }}}

 this is wrong because nan is not > 0. nan is also not < 0 and not equal 0.
 nan is also not equal nan. Apparently a bug in how PostgreSQL handles NaN.

 Regarding v.in.ogr, I guess that setting nan/inf to NULL is the safest
 option.

 GRASS modules that create attribute tables should not insert nan/inf if
 these values should not occur according to the logic of the module, as
 e.g. v.net.centrality. If nan/inf does occur, the respective module needs
 to be fixed.

-- 
Ticket URL: 
GRASS GIS 

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

Re: [GRASS-dev] [GRASS GIS] #2499: v.in.ogr in does not handle "nan" in attribute tables properly

2020-01-08 Thread GRASS GIS
#2499: v.in.ogr in does not handle "nan" in attribute tables properly
--+-
  Reporter:  sbl  |  Owner:  grass-dev@…
  Type:  defect   | Status:  new
  Priority:  normal   |  Milestone:  7.8.3
 Component:  Vector   |Version:  unspecified
Resolution:   |   Keywords:  v.in.ogr, DBMI, SQLite, nan
   CPU:  Unspecified  |   Platform:  Unspecified
--+-

Comment (by sbl):

 In addition, the different DMBS behave differently with regards to
 nan/inf...

 This is how PostgreSQL handles NaN / Inf in double columns:
 {{{
 CREATE TEMPORARY TABLE test_insert_nan (double_column double precision);
 INSERT INTO test_insert_nan VALUES ('nan');
 INSERT INTO test_insert_nan VALUES ('-nan');
 INSERT INTO test_insert_nan VALUES ('inf');
 INSERT INTO test_insert_nan VALUES ('-inf');
 SELECT * FROM test_insert_nan;
 }}}


 {{{
 double_column
 double precision
 "NaN"
 "NaN"
 "Infinity"
 "-Infinity"
 }}}

 {{{
 SELECT * FROM test_insert_nan WHERE double_column > 0;
 }}}

 {{{
 double_column
 double precision
 "NaN"
 "NaN"
 "Infinity"
 }}}

 {{{
 SELECT * FROM test_insert_nan WHERE double_column < 0;
 }}}

 {{{
 double_column
 double precision
 "-Infinity"
 }}}

 However, in PostgreSQL does not insert nan / inf strings columns of type
 numeric...

-- 
Ticket URL: 
GRASS GIS 

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

[GRASS-dev] [GRASS GIS] #4015: ctypes: TypeError: item 1 in _argtypes_ passes a union by value, which is unsupported

2020-01-08 Thread GRASS GIS
#4015: ctypes: TypeError: item 1 in _argtypes_ passes a union by value, which is
unsupported
-+-
 Reporter:  neteler  |  Owner:  grass-dev@…
 Type:  defect   | Status:  new
 Priority:  normal   |  Milestone:  7.8.3
Component:  Python ctypes|Version:  git-releasebranch78
 Keywords:  ctypes, python3  |CPU:  Unspecified
 Platform:  Unspecified  |
-+-
 Alpine edge ships Python 3.8.1. When compiling GRASS 7.8 addons like
 i.cutlines (and other) addons, following error occurs:

 {{{
 Default locale settings are missing. GRASS running with C locale.
 Starting GRASS GIS...
 Creating new GRASS GIS location ...
 Cleaning up temporary files...
 Executing  ...
 Fetching  from GRASS GIS Addons repository (be patient)...
 Compiling...
 Traceback (most recent call last):
   File "/usr/lib/python3.8/ctypes/__init__.py", line 99, in CFUNCTYPE
 return _c_functype_cache[(restype, argtypes, flags)]
 KeyError: (, (,), 1)

 During handling of the above exception, another exception occurred:

 Traceback (most recent call last):
   File "/tmp/grass7-root-73/tmpumv5zbxd/i.cutlines/scripts/i.cutlines",
 line 171, in 
 from grass.pygrass.modules.grid.grid import GridModule
   File
 "/usr/local/grass78/etc/python/grass/pygrass/modules/grid/__init__.py",
 line 2, in 
 from grass.pygrass.modules.grid.grid import GridModule
   File "/usr/local/grass78/etc/python/grass/pygrass/modules/grid/grid.py",
 line 12, in 
 from grass.pygrass.gis import Mapset, Location
   File "/usr/local/grass78/etc/python/grass/pygrass/gis/__init__.py", line
 13, in 
 import grass.lib.gis as libgis
   File "/usr/local/grass78/etc/python/grass/lib/gis.py", line 451, in
 
 ('checker', CFUNCTYPE(UNCHECKED(c_int), String)),
   File "/usr/lib/python3.8/ctypes/__init__.py", line 101, in CFUNCTYPE
 class CFunctionType(_CFuncPtr):
 TypeError: item 1 in _argtypes_ passes a union by value, which is
 unsupported.
 make: *** [/usr/local/grass78/include/Make/Html.make:14:
 i.cutlines.tmp.html] Error 1
 ERROR: Compilation failed, sorry. Please check above error messages.
 Execution of  finished.
 Cleaning up temporary files...
 }}}

 We used this docker image:

 https://hub.docker.com/r/mundialis/grass-py3-pdal/tags

 -> `docker pull mundialis/grass-py3-pdal:stable-alpine`

-- 
Ticket URL: 
GRASS GIS 

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