Re: [GRASS-dev] v.in.osm working?

2017-08-31 Thread Markus Metz
On Thu, Aug 24, 2017 at 3:37 PM, Even Rouault 
wrote:
>
> On jeudi 24 août 2017 15:34:11 CEST Markus Metz wrote:
>
> > On Thu, Aug 24, 2017 at 11:15 AM, Even Rouault <
even.roua...@spatialys.com>
>
> >
>
> > wrote:
>
> > > > You can use v.in.ogr directly for OSM PBF files (
>
> > > >
>
> > > > http://gdal.org/drv_osm.html).
>
> > > >
>
> > > >
>
> > > >
>
> > > > BTW, with GDAL 2.2.1, using OGR_INTERLEAVED_READING=YES does not
work
>
> >
>
> > for
>
> >
>
> > > > me (empty vector).
>
> > >
>
> > > Caution: you cannot just specify OGR_INTERLEAVED_READING=YES and loop
>
> >
>
> > over layers as usual. See the "Interleaved reading" section of
>
> > http://gdal.org/drv_osm.html
>
> >
>
> > I see, thanks for the hint. That means v.in.ogr must be changed to use
the
>
> > special reading mode, or OGR_INTERLEAVED_READING must be unset in
v.in.ogr,
>
> > together with a warning.
>
>
>
> If you unset OGR_INTERLEAVED_READING, the classical read pattern (loop
over layers, and for each layer, loop over its features) will work only for
small osm/pbf files where the number of features in each layer isn't larger
than 100K.
>
> For larger files, OGR_INTERLEAVED_READING=YES and the special reading
pattern described in drv_osm.html is needed.

OK, I have disabled OSM import for trunk and relbr72 (r71543,4), because it
results in empty vectors or incomplete imports.

I am not sure if v.in.ogr should be modified to use this special reading
mode for one single OGR supported format. The GDAL/OGR API is very
convenient because applications do not need to bother about particular
formats. If we start implementing code for particular formats in v.in.ogr,
we might open a Pandora's box...

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

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

2017-08-31 Thread Travis CI
Build Update for GRASS-GIS/grass-ci
-

Build: #2250
Status: Fixed

Duration: 5 minutes and 58 seconds
Commit: 8d1b06d (master)
Author: Markus Metz
Message: rasterlib: revert experimental code

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

View the changeset: 
https://github.com/GRASS-GIS/grass-ci/compare/c2507859c9b7...8d1b06d430e2

View the full build log and details: 
https://travis-ci.org/GRASS-GIS/grass-ci/builds/270429619?utm_source=email&utm_medium=notification

--

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

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

[GRASS-dev] Broken: GRASS-GIS/grass-ci#2249 (master - c250785)

2017-08-31 Thread Travis CI
Build Update for GRASS-GIS/grass-ci
-

Build: #2249
Status: Broken

Duration: 3 minutes and 38 seconds
Commit: c250785 (master)
Author: Markus Metz
Message: rasterlib: fix segfault if NULLS are compressed, but not data

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

View the changeset: 
https://github.com/GRASS-GIS/grass-ci/compare/f646f04fe54d...c2507859c9b7

View the full build log and details: 
https://travis-ci.org/GRASS-GIS/grass-ci/builds/270427400?utm_source=email&utm_medium=notification

--

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

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

Re: [GRASS-dev] [GRASS GIS] #3412: r.compress -u segfault

2017-08-31 Thread GRASS GIS
#3412: r.compress -u segfault
--+-
  Reporter:  neteler  |  Owner:  grass-dev@…
  Type:  defect   | Status:  new
  Priority:  normal   |  Milestone:  7.2.2
 Component:  Default  |Version:  svn-releasebranch72
Resolution:   |   Keywords:  r.compress
   CPU:  Unspecified  |   Platform:  Linux
--+-

Comment (by mmetz):

 Replying to [ticket:3412 neteler]:
 > When trying to uncompress a map, r.compress segfaults:

 Apparently a bug in the rasterlib when NULLs are compressed, but not data.
 Should be fixed in r71448,50 (trunk, relbr72).

--
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] #3412: r.compress -u segfault

2017-08-31 Thread GRASS GIS
#3412: r.compress -u segfault
+-
 Reporter:  neteler |  Owner:  grass-dev@…
 Type:  defect  | Status:  new
 Priority:  normal  |  Milestone:  7.2.2
Component:  Default |Version:  svn-releasebranch72
 Keywords:  r.compress  |CPU:  Unspecified
 Platform:  Linux   |
+-
 When trying to uncompress a map, r.compress segfaults:

 {{{
 ## GRASS 7.2.2svn (nc_spm_08_grass7):~ >
 r.compress -u elev_lid792_1m_viewshed
 Segmentation fault (core dumped)
 }}}

 Map info:
 {{{
 r.info  elev_lid792_1m_viewshed
 ++
  | Map:  elev_lid792_1m_viewshedDate: Fri Jul 29 13:45:27 2016
 |
  | Mapset:   user1  Login of Creator: mneteler
 |
  | Location: nc_spm_08_grass7
 |
  | DataBase: /home/mneteler/grassdata
 |
  | Title:
 |
  | Timestamp: none
 |
 ||
  |
 |
  |   Type of Map:  raster   Number of Categories: 0
 |
  |   Data Type:FCELL
 |
  |   Rows: 750
 |
  |   Columns:  700
 |
  |   Total Cells:  525000
 |
  |Projection: Lambert Conformal Conic
 |
  |N: 220750S: 22   Res: 1
 |
  |E: 639000W: 638300   Res: 1
 |
  |   Range of data:min = 11.29489  max = 180
 |
  |
 |
  |   Data Description:
 |
  |generated by r.viewshed
 |
  |
 |
  |   Comments:
 |
  |r.viewshed --overwrite input="elev_lid792_1m"
 output="elev_lid792_1m\   |
  |_viewshed" coordinates=638728.087167,220609.261501
 observer_elevatio\   |
  |n=5.0 target_elevation=0.0 max_distance=-1 refraction_coeff=0.14286
 \   |
  |memory=500
 |
  |
 |
 ++
 }}}

 And GDB debugging:
 {{{
 GRASS 7.2.2svn (nc_spm_08_grass7):~/software/grass72 > gdb r.compress
 GNU gdb (GDB) Fedora 8.0-24.fc26
 ...
 (gdb) r -u elev_lid792_1m_viewshed
 Starting program: /home/mneteler/software/grass72/dist.x86_64-pc-linux-
 gnu/bin/r.compress -u elev_lid792_1m_viewshed
 ...
 Program received signal SIGSEGV, Segmentation fault.
 0x773b1ddd in __memset_avx2_erms () from /lib64/libc.so.6
 Missing separate debuginfos, use: dnf debuginfo-install
 zlib-1.2.11-2.fc26.x86_64

 (gdb) bt
 #0  0x773b1ddd in __memset_avx2_erms () from /lib64/libc.so.6
 #1  0x7798da23 in G_zero (buf=0x0, i=6008) at zero.c:25
 #2  0x77bc2145 in open_raster_new (name=0x606a00
 "elev_lid792_1m_viewshed", open_mode=3, map_type=1) at open.c:714
 #3  0x77bc165b in Rast_open_fp_new_uncompressed (name=0x606a00
 "elev_lid792_1m_viewshed") at open.c:507
 #4  0x00402327 in doit (name=0x606a00 "elev_lid792_1m_viewshed",
 uncompress=1, map_type=1) at main.c:268
 #5  0x00401d2c in process (name=0x606a00
 "elev_lid792_1m_viewshed", uncompress=1) at main.c:164
 #6  0x0040198d in main (argc=3, argv=0x7fffd488) at main.c:99


 (gdb) bt full
 #0  0x773b1ddd in __memset_avx2_erms () from /lib64/libc.so.6
 No symbol table info available.
 #1  0x7798da23 in G_zero (buf=0x0, i=6008) at zero.c:25
 No locals.
 #2  0x77bc2145 in open_raster_new (name=0x606a00
 "elev_lid792_1m_viewshed", open_mode=3, map_type=1) at open.c:714
 xname =
 
"elev_lid792_1m_viewshed\000\035\343\224\367\377\177\000\000\b\354\230\367\377\177\000\000\350\t\272\367\377\177\000\000\020\313\377\377\377\177\000\000n\342\224\367\377\177\000\000\060\313\377\377\377\177\000\000\000\000\000\000\000\000\000\000\020\314\377\377\377\177\000\000\035\343\224\367\377\177\000\000\b\354\230\367\377\177\000\000\000\231\311`\001\000\000\000\240\275\274\367\377\177\000\000
 f`", '\000' ,
 
"\017\000\000\000\000\000\000\000\250\350\377\377\377\177\000\000\340P`\000\000\000\000\000\340\314\377\377\377\177\000\000,\n\272\367\377\177\000\000\240\275\274\367\377\177\000\000
 f`", '\000' ...
 xmapset =
 
"user1\000\000\000T\377\230\367\377\177\000\000\360\313\377\377\005\000\000\000\000\231\311`\220\021\241]\020\314\377\377\377\177\000\000l\026\225\367\377\177\000\000\220\314\377\377\377\177\000\000
 
f`\000\000\000\000\000\240\275\274\367\377\177\000\000+\354\230\367\377\177\000\000\060\314\377\377\377\177\000\000g\027\225\367\377\177\000\000
 
f`\000\000\000\000\000\240\275\274\367\377\177\000\000\320\314\377\377\377\177\000\000\006ĺ\367\377\177\000\000\360``\000\000\000\000\000\000j`\000\000\000\000\000k-@",
 '\000' ,
 
"X\314\377\377\377\177\000\000\000\000\000\000\000\000\000\000\300\313\377\377\377\177\000\000,\n\272\367\377\177\000\000\260\314\377\377\377\177\000\000\231"...
 fcb = 0x60e728
 fd = 1
 cell_fd = 5
 tempname = 0x609630
 "/home/mneteler/grassdata/nc_spm_08_grass7/user1/.tmp/oboe.mundialis/11666.1"
 map = 0x6088f0 

Re: [GRASS-dev] [GRASS GIS] #2875: Python testsuite failing with UnicodeDecodeError

2017-08-31 Thread GRASS GIS
#2875: Python testsuite failing with UnicodeDecodeError
--+-
  Reporter:  marisn   |  Owner:  grass-dev@…
  Type:  defect   | Status:  new
  Priority:  normal   |  Milestone:  7.2.2
 Component:  Tests|Version:  svn-trunk
Resolution:   |   Keywords:
   CPU:  Unspecified  |   Platform:  Linux
--+-

Comment (by mlennert):

 Another illustration running the entire testsuite in the 7.2.2RC2 code
 tree:


 {{{
 LANGUAGE=fr_BE;python -m grass.gunittest.main --location nc_spm_08
 --location-type nc
 ...
 Executed 156 test files in 0:16:00.337352.
 From them 81 files (52%) were successful and 75 files (48%) failed.
 }}}

 and


 {{{
 LANGUAGE=C;python -m grass.gunittest.main --location nc_spm_08 --location-
 type nc
 Executed 156 test files in 0:22:05.879940.
 From them 131 files (84%) were successful and 25 files (16%) failed.
 }}}

 (of those 16% some failed because I used the full nc_spm data set, not the
 basic data set, and tests seem to be for the latter. I couldn't find any
 documentation on that)

--
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] #2875: Python testsuite failing with UnicodeDecodeError

2017-08-31 Thread GRASS GIS
#2875: Python testsuite failing with UnicodeDecodeError
--+-
  Reporter:  marisn   |  Owner:  grass-dev@…
  Type:  defect   | Status:  new
  Priority:  normal   |  Milestone:  7.2.2
 Component:  Tests|Version:  svn-trunk
Resolution:   |   Keywords:
   CPU:  Unspecified  |   Platform:  Linux
--+-

Comment (by mlennert):

 Sorry, had forgotten about this ticket. Thanks Maris for closing the
 other.

 Coming back to the debate concerning localization of the testing suite. I
 don't think that the output of the testing suite has to be localized, but
 I actually notice that a series of tests fail because the messages from
 the tested modules, but others because the testing is based on C-locale
 output of the module (e.g. g.remove).

 I think it would be great to be able to run the entire test suite in any
 locale. This would allow more systematic testing of locale related issues
 in modules. I don't think that the outputs of the testsuite have to be
 localized, but errors arise because of the handling of module error
 messages by the testsuite:


 {{{
 python test_r_mapcalc.py


 .

 .

 .

 .



 .

 .

 .

 .

 .E
 ==
 ERROR: test_seed_required (__main__.TestRandFunction)
 Test that seed is required when rand() is used
 --
 Traceback (most recent call last):
   File "test_r_mapcalc.py", line 99, in test_seed_required
 self.assertModuleFail('r.mapcalc', expression='rand_x = rand(1, 200)')
   File "/data/home/mlennert/SRC/GRASS/grass-7.2.2RC2/dist.x86_64-pc-linux-
 gnu/etc/python/grass/gunittest/case.py", line 1180, in assertModuleFail
 module.run()
   File "/data/home/mlennert/SRC/GRASS/grass-7.2.2RC2/dist.x86_64-pc-linux-
 gnu/etc/python/grass/pygrass/modules/interface/module.py", line 716, in
 run
 module=self.name, errors=stderr)
   File "/data/home/mlennert/SRC/GRASS/grass-7.2.2RC2/dist.x86_64-pc-linux-
 gnu/etc/python/grass/exceptions/__init__.py", line 71, in __init__
 msg += _(". See the following errors:\n%s") % errors
 UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 37:
 ordinal not in range(128)

 --
 Ran 10 tests in 0.983s
 FAILED (errors=1)
 }}}

 Running the same test with LANGUAGE=C gives me:


 {{{
 LANGUAGE=C;python test_r_mapcalc.py


 .

 .

 .

 .



 .

 .

 .

 .

 .
 ERROR: Pseudo-random number generator not seeded

 .
 --
 Ran 10 tests in 1.014s
 OK
 }}}

 IIUC, the difference comes from this:


 {{{
 LANGUAGE=fr_BE;r.mapcalc expression='rand_x = rand(1, 200)'
 ERREUR :Générateur de nombres pseudo-aléatoires sans graine
 GRASS 7.2.2RC2
 
(nc_spm_08):/data/home/mlennert/SRC/GRASS/grass-7.2.2RC2/raster/r.mapcalc/testsuite
 > LANGUAGE=C;r.mapcalc expression='rand_x = rand(1, 200)'
 ERROR: Pseudo-random number generator not seeded
 }}}

--
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] #2875: Python testsuite failing with UnicodeDecodeError

2017-08-31 Thread GRASS GIS
#2875: Python testsuite failing with UnicodeDecodeError
--+-
  Reporter:  marisn   |  Owner:  grass-dev@…
  Type:  defect   | Status:  new
  Priority:  normal   |  Milestone:  7.2.2
 Component:  Tests|Version:  svn-trunk
Resolution:   |   Keywords:
   CPU:  Unspecified  |   Platform:  Linux
--+-

Comment (by marisn):

 Also reported as #3411

--
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] #3411: testsuite: encoding error

2017-08-31 Thread GRASS GIS
#3411: testsuite: encoding error
--+-
  Reporter:  mlennert |  Owner:  grass-dev@…
  Type:  defect   | Status:  closed
  Priority:  normal   |  Milestone:  7.2.2
 Component:  Tests|Version:  svn-releasebranch72
Resolution:  duplicate|   Keywords:  testsuite encoding
   CPU:  Unspecified  |   Platform:  Unspecified
--+-
Changes (by marisn):

 * status:  new => closed
 * resolution:   => duplicate


Comment:

 Duplicate of #2875

--
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] #3411: testsuite: encoding error

2017-08-31 Thread GRASS GIS
#3411: testsuite: encoding error
+-
 Reporter:  mlennert|  Owner:  grass-dev@…
 Type:  defect  | Status:  new
 Priority:  normal  |  Milestone:  7.2.2
Component:  Tests   |Version:  svn-releasebranch72
 Keywords:  testsuite encoding  |CPU:  Unspecified
 Platform:  Unspecified |
+-
 Whenever a test fails in the testsuite, and the LANGUAGE is fr_BE, I get
 the following error message

 {{{
 Traceback (most recent call last):
   File "test_r_mapcalc.py", line 99, in test_seed_required
 self.assertModuleFail('r.mapcalc', expression='rand_x = rand(1, 200)')
   File "/data/home/mlennert/SRC/GRASS/grass_trunk/dist.x86_64-pc-linux-
 gnu/etc/python/grass/gunittest/case.py", line 1180, in assertModuleFail
 module.run()
   File "/data/home/mlennert/SRC/GRASS/grass_trunk/dist.x86_64-pc-linux-
 gnu/etc/python/grass/pygrass/modules/interface/module.py", line 769, in
 run
 self.wait()
   File "/data/home/mlennert/SRC/GRASS/grass_trunk/dist.x86_64-pc-linux-
 gnu/etc/python/grass/pygrass/modules/interface/module.py", line 790, in
 wait
 module=self.name, errors=stderr)
   File "/data/home/mlennert/SRC/GRASS/grass_trunk/dist.x86_64-pc-linux-
 gnu/etc/python/grass/exceptions/__init__.py", line 71, in __init__
 msg += _(". See the following errors:\n%s") % errors
 UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 37:
 ordinal not in range(128)
 }}}

--
Ticket URL: 
GRASS GIS 

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