[GRASS-user] Labels in GRASS 7 - Do I do wrong or is this a bug?

Philipp von Vangerow philipp.vonvangerow at gmail.com
Tue Nov 3 11:33:20 PST 2015


Hi people,

Helmut's advice to rebuild the fonts with the
g.mkfontcap -o
solved my problem.

Thank you very much, Helmut!!!



2015-11-03 19:59 GMT+01:00 Helmut Kudrnovsky <hellik at web.de>:

> Philipp von Vangerow wrote
> > Dear people,
> >
> > in GRASS GIS 6.4.4 I succesfully display labels in a vector map, in GRASS
> > 7.0.2 it fails. I am not sure whethere I do something wrong or if this is
> > a
> > bug in GRASS 7.x. See my documentation. I described every step and made
> > screenshots.
> >
> > And: I checked here (
> >
> https://trac.osgeo.org/grass/query?status=assigned&status=new&status=reopened&type=defect&desc=1&order=id
> )
> > for open issues related to labels, but I found nothing that describes my
> > problem.
> >
> > == Fehlersuche Labels ==
> > * Grass 6.4.4 - WinGRASS-6.4.4-1-Setup.exe
> > * Grass 7.0.2 - WinGRASS-7.0.2RC1-1-Setup.exe
> > * Grass 7.1   - WinGRASS-7.1.svn-r66704-108-Setup.exe
> > installed.
> >
> > === Grass 6 ===
> > Steps:
> >  evtl.: g.remove -f vect=test644
> >  v.edit tool=create map=test644 layer=1
> >  v.db.addtable map=test644 layer=1 columns="name VARCHAR(12),color
> > VARCHAR(11),info VARCHAR(128)"
> >  d.vect -a map=test644 display=shape,attr rgb_column=color
> > icon=basic/circle size=17 attrcol=name lcolor=black bgcolor=yellow
> > lsize=17
> >
> > Output:
> >  Using vector map name as table name: test644
> >  Creating new DB connection based on default mapset settings...
> >  Creating table with columns (cat integer, name VARCHAR(12), color
> > VARCHAR(11), info VARCHAR(128))
> >  Die Tabelle
> > <test644>
> >  ist jetzt Teil der Vektorkarte
> > <test644>
> >  und kann
> > mit GRASS Modulen gelöscht und überschrieben werden.
> >  Select-Privilegien wurden für die Tabelle gewährt.
> >  Lese Objekte...
> >  Aktualisiere die Datenbank...
> >  0 Datensätze aktualisiert/eingefügt (Layer 1).
> >  Layer <1> Tabelle
> > <test644>
> >  in der Datenbank <E:\Users\Philipp von
> >
> Vangerow.MIR\grassdata\KML_EPSG_4326_Location\playground\sqlite\sqlite.db>
> > mit dem Treiber
> > <sqlite>
> >  und der Schlüsselspalte
> > <cat>
> >  Current attribute table links:
> >  Vectorkarte <test644 at playground> ist verbunden durch:
> >
> > Start geodata creation via the GUI
> > Ebene 1/Kategorie 1
> > * name: Foo
> > * color: 249:247:166
> > * info: Hey there I am Foo!!!
> > Ebene 1/Kategorie 2
> > * name: Bar
> > * color: 65:134:240
> > * info: Hey there it is me, Bar!!!
> >
> > Result:
> > [[Bild:GRASS GIS Fehlerbeschreibung missing labels - Version 6.4.4.jpg]]
> >
> > === GRASS 7.0.2 ===
> >
> >  evtl.: g.remove -f type=vect name=test702
> >  v.edit tool=create map=test702 layer=1
> >  v.db.addtable --verbose map=test702 layer=1 columns=name
> > VARCHAR(12),color
> > VARCHAR(11),info VARCHAR(128)
> >  d.vect -i map=test702 layer=1 display=shape rgb_column=color
> > icon=basic/circle size=17 attribute_column=name label_color=black
> > label_bgcolor=yellow label_size=17
> >
> > Output:
> >  Creating table with columns (cat integer,name varchar(12),color
> > varchar(11),info varchar(128))...
> >
> > Start geodata creation via the GUI
> > Ebene 1/Kategorie 1
> > * name: Foo
> > * color: 249:247:166
> > * info: Hey there I am Foo!!!
> > Ebene 1/Kategorie 2
> > * name: Bar
> > * color: 65:134:240
> > * info: Hey there it is me, Bar!!!
> >
> > See there, got the background but not the text
> > [[Bild:GRASS GIS Fehlerbeschreibung missing labels - Version 7.0.2 Column
> > name.jpg]]
> >
> > I change to the Info, so I get a much longer background. So this means
> for
> > computing the size of the background the program succesfullky had access
> > to
> > the attributes. It can only know the larger field size from the longer
> > text!
> >  d.vect -i map=test702 layer=1 display=shape rgb_column=color
> > icon=basic/circle size=17 attribute_column=info label_color=black
> > label_bgcolor=yellow label_size=17
> > [[Bild:GRASS GIS Fehlerbeschreibung missing labels - Version 7.0.2 Column
> > info.jpg]]
> >
> > === GRASS 7.1svn ===
> >
> >  evtl.: g.remove -f type=vect name=test72svn
> >  v.edit tool=create map=test72svn layer=1
> >  v.db.addtable --verbose map=test72svn layer=1 columns="name
> > VARCHAR(12),color VARCHAR(11),info VARCHAR(128)"
> >  d.vect -i map=test72svn layer=1 display=shape rgb_column=color
> > icon=basic/circle size=17 attribute_column=name label_color=black
> > label_bgcolor=yellow label_size=17
> >
> >  v.db.addtable --verbose map=test72svn layer=1 columns=name
> > VARCHAR(12),color VARCHAR(11),info VARCHAR(128)
> >  Using vector map name as table name:
> > <test72svn>
> >  DB settings already defined, nothing to do
> >  Creating new DB connection based on default mapset settings...
> >  Creating table with columns (cat integer,name varchar(12),color
> > varchar(11),info varchar(128))...
> >  ERROR: Layerindex außerhalb des Wertebereichs.
> >  Traceback (most recent call last):
> >    File "C:\Program Files (x86)\GRASS GIS
> >  7.1.svn/scripts/v.db.addtable.py", line 150, in
> > <module>
> >      sys.exit(main())
> >    File "C:\Program Files (x86)\GRASS GIS
> >  7.1.svn/scripts/v.db.addtable.py", line 137, in main
> >      option = 'cat', column = key, qlayer = layer)
> >    File "C:\Program Files (x86)\GRASS GIS
> >  7.1.svn\etc\python\grass\script\core.py", line 409, in
> >  run_command
> >      return handle_errors(returncode, returncode, args,
> >  kwargs)
> >    File "C:\Program Files (x86)\GRASS GIS
> >  7.1.svn\etc\python\grass\script\core.py", line 328, in
> >  handle_errors
> >      returncode=returncode)
> >  grass.exceptions.CalledModuleError: Module run None
> >  ['v.to.db', 'column=cat', 'map=test72svn', 'layer=1',
> >  'qlayer=1', 'option=cat'] ended with error
> >   Process ended with non-zero return code 1. See errors in the
> >  (error) output.
> >
> > S...! OK, in the latest daily build I cannot check because of this error.
> >
> > _______________________________________________
> > grass-user mailing list
>
> > grass-user at .osgeo
>
> > http://lists.osgeo.org/mailman/listinfo/grass-user
> >
> > GRASS GIS 6.4.4 Foo-Bar.jpg (41K)
> > <
> http://osgeo-org.1560.x6.nabble.com/attachment/5234256/0/GRASS%20GIS%206.4.4%20Foo-Bar.jpg&gt
> ;
> > GRASS GIS 7.0.2 Foo-Bar info attr.jpg (35K)
> > <
> http://osgeo-org.1560.x6.nabble.com/attachment/5234256/1/GRASS%20GIS%207.0.2%20Foo-Bar%20info%20attr.jpg&gt
> ;
> > GRASS GIS 7.0.2 Foo-Bar name attr.jpg (30K)
> > <
> http://osgeo-org.1560.x6.nabble.com/attachment/5234256/2/GRASS%20GIS%207.0.2%20Foo-Bar%20name%20attr.jpg&gt
> ;
>
> Which Windows version are you using?
>
> Win XP, win 7, win 8, win 10?
>
> There is an issue (already a ticket in trac) with a not updated list of
> fonts in the standalone winGRASS installer, especially in newer Windows
> versions >7
>
> Do you have any special security levels in your Windows box setup?
>
> Try g.mkfontcap -o
>
>
>
> -----
> best regards
> Helmut
> --
> View this message in context:
> http://osgeo-org.1560.x6.nabble.com/Labels-in-GRASS-7-Do-I-do-wrong-or-is-this-a-bug-tp5234256p5234269.html
> Sent from the Grass - Users mailing list archive at Nabble.com.
> _______________________________________________
> grass-user mailing list
> grass-user at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/grass-user
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/grass-user/attachments/20151103/17a738ee/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: After g.mkfontcap -o - It works.jpg
Type: image/jpeg
Size: 52257 bytes
Desc: not available
URL: <http://lists.osgeo.org/pipermail/grass-user/attachments/20151103/17a738ee/attachment-0001.jpg>


More information about the grass-user mailing list