[GRASS-user] d.mon start=cairo multi-layer PDF, PS, SVG output

2021-10-28 Thread Luigi Ponti
Dear all,

I am trying to get output image files in various formats using the Cairo
driver, following some very useful Python scripting examples:
https://baharmon.github.io/python-in-grass

When I try to map vector layers (e.g., point data) on top of raster layers
(say a digital elevation model);

if I use PNG output file extension, both vector and raster layers show up
with points having transparent background,

if I use PDF, PS, or SVG output file extension, only the vector layer
(drawn last) is shown in the output image with white background.

Maybe the PS driver is a better option?

Yet, I was reading this old grass-dev post that may be relevant:
https://marc.info/?l=grass-dev=146346954429631=2

Kind regards,

Luigi


Sample test function I am using follows:

def make_map(outfile_name,
fig_width,
fig_height,
bg_color: Optional[str] = None,
file_types: Optional[list] = None):
""" Test ouput map figure.
PLEASE CHECK as PDF and PS output does not get vectors displayed on
top of rasters. """
background_color = bg_color or [NO_BG_COLOR]
extensions = [PNG] if file_types is None else file_types
for extension in extensions:
outfile = pathlib.Path(OUT_DIR).joinpath(f"{outfile_name}.{extension}")
grass.run_command("d.mon", overwrite=True,
start="cairo",
width=fig_width,
height=fig_height,
bgcolor=background_color,
output=outfile)
grass.run_command("d.rast",
map="raster_layer")
grass.run_command("d.vect",
map="point_vector_layer",
type="point",
color="150:0:0",
size=20)
# all other display commands
grass.run_command("d.mon", stop="cairo")


Bundled GRASS app for Mac from here:
http://grassmac.wikidot.com/downloads

System Info:

GRASS version: 8.0.dev

Code revision: 32930185c

Build date: 2021-07-01

Build platform: x86_64-apple-darwin20.5.0

GDAL: 3.1.4

PROJ: 7.1.1

GEOS: 3.8.1

SQLite: 3.35.4

Python: 3.8.8

wxPython: 4.1.1

Platform: macOS-10.16-x86_64-i386-64bit


g.version -b
GRASS 8.0.dev (2021)

 ./configure
 --with-macosx-sdk=/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk
--enable-64bit --with-macosx-archs=x86_64 --with-opengl=aqua --with-openmp
--prefix=/Applications/GRASS-8.0.app/Contents/Resources --with-freetype
--with-freetype-includes=/Applications/GRASS-8.0.app/Contents/Resources/include/freetype2
--with-freetype-libs=/Applications/GRASS-8.0.app/Contents/Resources/lib
--with-gdal=/Applications/GRASS-8.0.app/Contents/Resources/bin/gdal-config
--with-gdal-libs=/Applications/GRASS-8.0.app/Contents/Resources/lib
--with-proj=/Applications/GRASS-8.0.app/Contents/Resources/bin/proj
--with-proj-includes=/Applications/GRASS-8.0.app/Contents/Resources/include
--with-proj-libs=/Applications/GRASS-8.0.app/Contents/Resources/lib
--with-proj-share=/Applications/GRASS-8.0.app/Contents/Resources/share/proj
--with-geos=/Applications/GRASS-8.0.app/Contents/Resources/bin/geos-config
--with-jpeg-includes=/Applications/GRASS-8.0.app/Contents/Resources/include
--with-jpeg-libs=//Applications/GRASS-8.0.app/Contents/Resources/lib
--with-png-includes=/Applications/GRASS-8.0.app/Contents/Resources/include
--with-png-libs=/Applications/GRASS-8.0.app/Contents/Resources/lib
--with-tiff-includes=/Applications/GRASS-8.0.app/Contents/Resources/include
--with-tiff-libs=/Applications/GRASS-8.0.app/Contents/Resources/lib
--with-postgres=yes
--with-postgres-includes=/Applications/GRASS-8.0.app/Contents/Resources/include
--with-postgres-libs=/Applications/GRASS-8.0.app/Contents/Resources/lib
--without-mysql --with-sqlite
--with-sqlite-libs=/Applications/GRASS-8.0.app/Contents/Resources/lib
--with-sqlite-includes=/Applications/GRASS-8.0.app/Contents/Resources/include
--with-fftw-includes=/Applications/GRASS-8.0.app/Contents/Resources/include
--with-fftw-libs=/Applications/GRASS-8.0.app/Contents/Resources/lib
--with-cxx --with-cairo
--with-cairo-includes=/Applications/GRASS-8.0.app/Contents/Resources/include/cairo
--with-cairo-libs=/Applications/GRASS-8.0.app/Contents/Resources/lib
--with-cairo-ldflags=-lcairo --with-zstd
--with-zstd-libs=/Applications/GRASS-8.0.app/Contents/Resources/lib
--with-zstd-includes=/Applications/GRASS-8.0.app/Contents/Resources/include
--with-bzlib
--with-bzlib-libs=/Applications/GRASS-8.0.app/Contents/Resources/lib
--with-bzlib-includes=/Applications/GRASS-8.0.app/Contents/Resources/include
--with-netcdf=/Applications/GRASS-8.0.app/Contents/Resources/bin/nc-config
--with-blas
--with-blas-libs=/Applications/GRASS-8.0.app/Contents/Resources/lib
--with-blas-includes=/Applications/GRASS-8.0.app/Contents/Resources/include
--with-lapack
--with-lapack-includes=/Applications/GRASS-8.0.app/Contents/Resources/include
--with-lapack-libs=/Applications/GRASS-8.0.app/Contents/Resources/lib
--with-netcdf=/Applications/GRASS-8.0.app/Contents/Resources/bin/nc-config
--with-nls --with-libs=/Applications/GRASS-8.0.app/Contents/Resources/lib
--with-includes=/Applications/GRASS-8.0.app/Contents/Resources/include
--with-pdal=/Applications/GRASS-8.0.app/Contents/Resources/bin/pdal-config

Re: [GRASS-user] v.in.csv available?

2021-10-28 Thread Stefan Blumentrath
Hei Johannes,

Sounds like v.in.csv is the right tool.

The manual is build 
(https://grass.osgeo.org/grass78/manuals/addons/v.in.csv.html), also on MS 
Windows: https://wingrass.fsv.cvut.cz/grass78/x86_64/addons/latest/logs/
It should be available via g.extension. You would need GRASS 7.8.6 (or 8.0) 
though du to recent restructuring of the addons repository...
Alternatively, you can clone the repo and install from local file-URL (on 
non-Windows systems).

Cheers
Stefan

-Original Message-
From: grass-user  On Behalf Of Johannes 
Radinger
Sent: torsdag 28. oktober 2021 10:42
To: GRASS user list 
Subject: [GRASS-user] v.in.csv available?

Hi all,

I was wondering if the addon v.in.csv is available or not? I want to import a 
simple point file (*.csv) which is unfortunately in another projection then my 
location. So the tool v.in.csv looks handy.

This tool is listed here 
https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgrass.osgeo.org%2Fgrass78%2Fmanuals%2Faddons%2Fdata=04%7C01%7CStefan.Blumentrath%40nina.no%7C1983499eb4f1445533b608d999eedfff%7C6cef373021314901831055b3abf02c73%7C0%7C0%7C637710074397800843%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000sdata=nE7Wfm6iA%2FSiLSkHq9bXa09PYDeNxb2wHYCIrQOWS0k%3Dreserved=0

but not here 
https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgrasswiki.osgeo.org%2Fwiki%2FAddOns%2FGRASS7%2Fvectordata=04%7C01%7CStefan.Blumentrath%40nina.no%7C1983499eb4f1445533b608d999eedfff%7C6cef373021314901831055b3abf02c73%7C0%7C0%7C637710074397810835%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000sdata=IAZc5CpQDMKkiPqlXSIIUX3G0T4IhtRYNvJGfHIeGXQ%3Dreserved=0
 and seems not be available via g.extension(?)

Any suggestion? What would be the most convenient way to do such an import with 
coordinate transformation to match my current location?

Cheers,

Johannes

___
grass-user mailing list
grass-user@lists.osgeo.org
https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.osgeo.org%2Fmailman%2Flistinfo%2Fgrass-userdata=04%7C01%7CStefan.Blumentrath%40nina.no%7C1983499eb4f1445533b608d999eedfff%7C6cef373021314901831055b3abf02c73%7C0%7C0%7C637710074397810835%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000sdata=Sn%2FJqpmJUDP80ygS%2FT5BF2S3s7EHjFdl66Spqryu%2FpA%3Dreserved=0
___
grass-user mailing list
grass-user@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/grass-user


[GRASS-user] v.in.csv available?

2021-10-28 Thread Johannes Radinger

Hi all,

I was wondering if the addon v.in.csv is available or not? I want to 
import a simple point file (*.csv) which is unfortunately in another 
projection then my location. So the tool v.in.csv looks handy.


This tool is listed here https://grass.osgeo.org/grass78/manuals/addons/

but not here https://grasswiki.osgeo.org/wiki/AddOns/GRASS7/vector and 
seems not be available via g.extension(?)


Any suggestion? What would be the most convenient way to do such an 
import with coordinate transformation to match my current location?


Cheers,

Johannes

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