[GRASS-user] d.vect output a black PNG

Hello all

Continuing my process of making a series of maps for a paper using python loops and d.mon with PNG outputs, now d.vect is giving me a hard time.

using a loop like this one:

for dem in dems:
out_shade = dem + area + ‘_shade_315_20’
vect_contour = dem + area + ‘_contours_zoom’
grass.run_command(‘g.region’,n=n,s=s,w=w,e=e, flags=‘pa’)
grass.run_command(‘d.mon’, start=‘png’, output=dem+area+‘_shade_contours.png’,
resolution=‘3’, height=500, width=500, overwrite=True)
grass.run_command(‘d.rast’, map=out_shade)
grass.run_command(‘d.vect’, map=vect_contour, type=‘line’)
grass.run_command(‘d.grid’, size=‘0.025’, text_color=‘black’, fontsize=16, flags=‘c’)
grass.run_command(‘d.mon’, stop=‘png’)

I get maps that are ok, some that are partially blacked out and some that are completely black!

Any hints on this? The area in the images below is quite small, and the contour lines were calculated only in this small region, to keep the filesize small.

I tried this on MacOS (homebrew and Michael’s new binary) and on Linux, with the same results.

many thanks

Carlos

Inline image 1Inline image 2Inline image 4Inline image 5Inline image 3

···

Prof. Carlos Henrique Grohmann
Institute of Energy and Environment - Univ. of São Paulo, Brazil

  • Digital Terrain Analysis | GIS | Remote Sensing -

http://carlosgrohmann.com
http://orcid.org/0000-0001-5073-5572


Can’t stop the signal.

Have you tried cairo driver? I feel like I’ve seen something like this before with PNG driver.

Anna

(attachments)

srtm30_SantaCatarina_shade_contours.png
tdx12_SantaCatarina_shade_contours.png
tdx30_SantaCatarina_shade_contours.png
aster30_SantaCatarina_shade_contours.png
aw3d30_SantaCatarina_shade_contours.png

···

On Thu, Jan 18, 2018 at 5:46 PM, Carlos Grohmann <carlos.grohmann@gmail.com> wrote:

Hello all

Continuing my process of making a series of maps for a paper using python loops and d.mon with PNG outputs, now d.vect is giving me a hard time.

using a loop like this one:

for dem in dems:
out_shade = dem + area + ‘_shade_315_20’
vect_contour = dem + area + ‘_contours_zoom’
grass.run_command(‘g.region’,n=n,s=s,w=w,e=e, flags=‘pa’)
grass.run_command(‘d.mon’, start=‘png’, output=dem+area+‘_shade_contours.png’,
resolution=‘3’, height=500, width=500, overwrite=True)
grass.run_command(‘d.rast’, map=out_shade)
grass.run_command(‘d.vect’, map=vect_contour, type=‘line’)
grass.run_command(‘d.grid’, size=‘0.025’, text_color=‘black’, fontsize=16, flags=‘c’)
grass.run_command(‘d.mon’, stop=‘png’)

I get maps that are ok, some that are partially blacked out and some that are completely black!

Any hints on this? The area in the images below is quite small, and the contour lines were calculated only in this small region, to keep the filesize small.

I tried this on MacOS (homebrew and Michael’s new binary) and on Linux, with the same results.

many thanks

Carlos

Inline image 1Inline image 2Inline image 4Inline image 5Inline image 3

Prof. Carlos Henrique Grohmann
Institute of Energy and Environment - Univ. of São Paulo, Brazil

  • Digital Terrain Analysis | GIS | Remote Sensing -

http://carlosgrohmann.com
http://orcid.org/0000-0001-5073-5572


Can’t stop the signal.


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

It works! Thanks for the tip Anna!

Carlos

(attachments)

tdx30_SantaCatarina_shade_contours.png
srtm30_SantaCatarina_shade_contours.png
tdx12_SantaCatarina_shade_contours.png
aster30_SantaCatarina_shade_contours.png
aw3d30_SantaCatarina_shade_contours.png

···

On Thu, Jan 18, 2018 at 9:59 PM, Anna Petrášová <kratochanna@gmail.com> wrote:

Have you tried cairo driver? I feel like I’ve seen something like this before with PNG driver.

Anna

On Thu, Jan 18, 2018 at 5:46 PM, Carlos Grohmann <carlos.grohmann@gmail.com> wrote:

Hello all

Continuing my process of making a series of maps for a paper using python loops and d.mon with PNG outputs, now d.vect is giving me a hard time.

using a loop like this one:

for dem in dems:
out_shade = dem + area + ‘_shade_315_20’
vect_contour = dem + area + ‘_contours_zoom’
grass.run_command(‘g.region’,n=n,s=s,w=w,e=e, flags=‘pa’)
grass.run_command(‘d.mon’, start=‘png’, output=dem+area+‘_shade_contours.png’,
resolution=‘3’, height=500, width=500, overwrite=True)
grass.run_command(‘d.rast’, map=out_shade)
grass.run_command(‘d.vect’, map=vect_contour, type=‘line’)
grass.run_command(‘d.grid’, size=‘0.025’, text_color=‘black’, fontsize=16, flags=‘c’)
grass.run_command(‘d.mon’, stop=‘png’)

I get maps that are ok, some that are partially blacked out and some that are completely black!

Any hints on this? The area in the images below is quite small, and the contour lines were calculated only in this small region, to keep the filesize small.

I tried this on MacOS (homebrew and Michael’s new binary) and on Linux, with the same results.

many thanks

Carlos

Inline image 1Inline image 2Inline image 4Inline image 5Inline image 3

Prof. Carlos Henrique Grohmann
Institute of Energy and Environment - Univ. of São Paulo, Brazil

  • Digital Terrain Analysis | GIS | Remote Sensing -

http://carlosgrohmann.com
http://orcid.org/0000-0001-5073-5572


Can’t stop the signal.


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

Prof. Carlos Henrique Grohmann
Institute of Energy and Environment - Univ. of São Paulo, Brazil

  • Digital Terrain Analysis | GIS | Remote Sensing -

http://carlosgrohmann.com
http://orcid.org/0000-0001-5073-5572


Can’t stop the signal.