[GRASS-dev] display/drivers/HTMLMAP status

Moritz Lennert mlennert at club.worldonline.be
Mon Feb 19 10:16:31 EST 2007


On 15/02/07 04:25, Glynn Clements wrote:
> 
> I've added a render= option to d.vect; valid values are:
> 
> 	g	G_plot_polygon	(default)
> 	r	R_polygon_abs
> 	d	D_polygon
> 	c	D_polygon_clip
> 
> The descriptions simply says "Rendering method for filled polygons",
> with no explanation. I considered adding "(developer use only)", but
> figured that will only encourage people to try it.
> 
> g or c will clip to the current frame, while r and d won't. r, d, and
> c should all work with the HTMLMAP driver (which is now working).
> 
> My earlier patch essentially hard-codes the r behaviour, so that's
> redundant now.
> 
> The relative speed of various options in actual use would be
> interesting, although the actual results will vary substantially
> depending upon the data, the "screen" (window/image) size, the driver,
> etc.
> 

Here's a first run on two data files, varying x-mon size and zoom. Tell 
me if you need more info, and what other tests might be helpful.

The images show that what is drawn on the screen is different according 
to the render options: g and c clip the area fill, d and r do not.


Moritz
-------------- next part --------------
A non-text attachment was scrubbed...
Name: d.vect.test.dr.png
Type: image/png
Size: 32716 bytes
Desc: not available
Url : http://lists.osgeo.org/pipermail/grass-dev/attachments/20070219/c348c81c/d.vect.test.dr.png
-------------- next part --------------
A non-text attachment was scrubbed...
Name: d.vect.test.gc.png
Type: image/png
Size: 31513 bytes
Desc: not available
Url : http://lists.osgeo.org/pipermail/grass-dev/attachments/20070219/c348c81c/d.vect.test.gc.png
-------------- next part --------------
v.info:
 +----------------------------------------------------------------------------+
 | Layer:    ssbel01                        Organization:                     |
 | Mapset:   mlennert                       Source Date:                      |
 | Location: BELGIQUE                       Name of creator:                  |
 | Database: /home/mlennert/GRASS/DATA                                        |
 | Title:                                                                     |
 | Map Scale:  1:1                                                            |
 | Map format: native                                                         |
 |----------------------------------------------------------------------------|
 |   Type of Map:  Vector (level: 2)                                          |
 |                                                                            |
 |   Number of points:       0               Number of areas:      20464      |
 |   Number of lines:        0               Number of islands:    1464       |
 |   Number of boundaries:   65961           Number of faces:      0          |
 |   Number of centroids:    20464           Number of kernels:    0          |
 |                                                                            |
 |   Map is 3D:              0                                                |
 |   Number of dblinks:      1                                                |
 |                                                                            |
 |   Projection: Lambert Conformal Conic (zone 0)                             |
 |            N: 244027.906    S: 21162.990                                   |
 |            E: 295157.406    W: 22265.449                                   |
 |            B: 0.000         T: 0.000                                       |
 |                                                                            |
 |   Digitize threshold: 0.00000                                              |
 |   Comments:                                                                |
 |                                                                            |
 +----------------------------------------------------------------------------+


g.region -p:
projection: 99 (Lambert Conformal Conic)
zone:       0
datum:      bel72
ellipsoid:  a=6378388 es=0.00672267
north:      244027.906254
south:      21162.99023438
west:       10288.9421751
east:       307133.913305
nsres:      462.37534444
ewres:      462.37534444
rows:       482
cols:       642
cells:      309444

screen resolution= 1280x1024


command: for i in g r d c; do echo "render=$i" >> d.vect.test; d.erase; /usr/bin/time -p -a -o d.vect.test d.vect ssbel01 render=$i type=area; done

x-mon at default size:
render=g
real 6.92
user 3.48
sys 0.87
render=r
real 7.70
user 3.65
sys 1.03
render=d
real 7.62
user 3.81
sys 1.00
render=c
real 7.92
user 5.15
sys 1.02


x-mon at max size
render=g
real 6.95
user 3.62
sys 0.98
render=r
real 7.45
user 3.83
sys 1.01
render=d
real 7.52
user 3.75
sys 0.96
render=c
real 8.06
user 5.21
sys 0.99

g.region -p:
projection: 99 (Lambert Conformal Conic)
zone:       0
datum:      bel72
ellipsoid:  a=6378388 es=0.00672267
north:      197896.64741991
south:      136400.72660952
west:       130852.22247626
east:       184950.13777564
nsres:      462.37534444
ewres:      462.37534444
rows:       133
cols:       117
cells:      15561

maximised x-mon:
render=g
real 1.61
user 1.07
sys 0.25
render=r
real 1.55
user 1.01
sys 0.20
render=d
real 1.60
user 0.95
sys 0.22
render=c
real 1.72
user 1.10
sys 0.24

x-mon default size:
render=g
real 1.55
user 0.90
sys 0.25
render=r
real 1.55
user 0.96
sys 0.22
render=d
real 1.52
user 0.99
sys 0.21
render=c
real 1.62
user 1.14
sys 0.29



GRASS 6.3.cvs (BELGIQUE):~ > d.mon PNG PNG: GRASS_TRUECOLOR status: FALSE PNG: collecting to file: map.png,
GRASS_WIDTH=640, GRASS_HEIGHT=480
Graphics driver [PNG] started

render=g
real 1.11
user 0.93
sys 0.17
render=r
real 1.15
user 0.95
sys 0.19
render=d
real 1.16
user 0.94
sys 0.22
render=c
real 1.29
user 1.08
sys 0.20


g.region -p:
projection: 99 (Lambert Conformal Conic)
zone:       0
datum:      bel72
ellipsoid:  a=6378388 es=0.00672267
north:      254048.15463081
south:      13947.74182287
west:       -996.26727306
east:       317809.26010678
nsres:      498.13363653
ewres:      498.13363653
rows:       482
cols:       640
cells:      308480

render=g
real 4.01
user 3.29
sys 0.70
render=r
real 4.55
user 3.60
sys 0.95
render=d
real 4.54
user 3.69
sys 0.84
render=c
real 5.54
user 4.62
sys 0.90



with centroids:
for i in g r d c; do echo "render=$i" >> d.vect.test; d.erase; /usr/bin/time -p -a -o d.vect.test d.vect ssbel01 render=$i; done


projection: 99 (Lambert Conformal Conic)
zone:       0
datum:      bel72
ellipsoid:  a=6378388 es=0.00672267
north:      201744.12279505
south:      124035.27549622
west:       131507.28004418
east:       189788.91551831
nsres:      498.13363653
ewres:      498.13363653
rows:       156
cols:       117
cells:      18252

default x-mon:
render=g
real 2.54
user 1.57
sys 0.33
render=r
real 2.74
user 1.57
sys 0.30
render=d
real 2.64
user 1.66
sys 0.28
render=c
real 2.77
user 1.87
sys 0.32

maximised x-mon:
render=g
real 2.67
user 1.66
sys 0.37
render=r
real 2.63
user 1.53
sys 0.35
render=d
real 2.63
user 1.64
sys 0.33
render=c
real 2.71
user 1.88
sys 0.39


projection: 99 (Lambert Conformal Conic)
zone:       0
datum:      bel72
ellipsoid:  a=6378388 es=0.00672267
north:      254048.15463081
south:      13947.74182287
west:       -996.26727306
east:       317809.26010678
nsres:      498.13363653
ewres:      498.13363653
rows:       482
cols:       640
cells:      308480

default x-mon:
render=g
real 9.49
user 4.41
sys 0.98
render=r
real 10.27
user 4.58
sys 1.07
render=d
real 10.34
user 4.64
sys 1.06
render=c
real 10.87
user 5.97
sys 1.14

maximised x-mon:
render=g
real 9.75
user 4.68
sys 1.04
render=r
real 10.26
user 4.67
sys 0.96
render=d
real 10.17
user 4.69
sys 1.03
render=c
real 11.04
user 6.04
sys 1.15


new layer:

 +----------------------------------------------------------------------------+
 | Layer:    communes                       Organization:                     |
 | Mapset:   mlennert                       Source Date:                      |
 | Location: BELGIQUE                       Name of creator:                  |
 | Database: /home/mlennert/GRASS/DATA                                        |
 | Title:                                                                     |
 | Map Scale:  1:1                                                            |
 | Map format: native                                                         |
 |----------------------------------------------------------------------------|
 |   Type of Map:  Vector (level: 2)                                          |
 |                                                                            |
 |   Number of points:       0               Number of areas:      622        |
 |   Number of lines:        0               Number of islands:    26         |
 |   Number of boundaries:   1799            Number of faces:      0          |
 |   Number of centroids:    592             Number of kernels:    0          |
 |                                                                            |
 |   Map is 3D:              0                                                |
 |   Number of dblinks:      1                                                |
 |                                                                            |
 |   Projection: Lambert Conformal Conic (zone 0)                             |
 |            N: 244022.297    S: 21153.199                                   |
 |            E: 295156.812    W: 22120.699                                   |
 |            B: 0.000         T: 0.000                                       |
 |                                                                            |
 |   Digitize threshold: 0.00000                                              |
 |   Comments:                                                                |
 |                                                                            |
 +----------------------------------------------------------------------------+


projection: 99 (Lambert Conformal Conic)
zone:       0
datum:      bel72
ellipsoid:  a=6378388 es=0.00672267
north:      254048.15463081
south:      13947.74182287
west:       -996.26727306
east:       317809.26010678
nsres:      498.13363653
ewres:      498.13363653
rows:       482
cols:       640
cells:      308480


default x-mon size:
render=g
real 1.34
user 0.46
sys 0.09
render=r
real 1.18
user 0.49
sys 0.05
render=d
real 1.15
user 0.54
sys 0.06
render=c
real 1.28
user 0.76
sys 0.07


maximised x-mon:
render=g
real 1.11
user 0.54
sys 0.04
render=r
real 1.17
user 0.49
sys 0.06
render=d
real 1.16
user 0.58
sys 0.08
render=c
real 1.26
user 0.82
sys 0.05


projection: 99 (Lambert Conformal Conic)
zone:       0
datum:      bel72
ellipsoid:  a=6378388 es=0.00672267
north:      201744.12279505
south:      124035.27549622
west:       131507.28004418
east:       189788.91551831
nsres:      498.13363653
ewres:      498.13363653
rows:       156
cols:       117
cells:      18252

default x-mon size:
render=g
real 0.36
user 0.18
sys 0.04
render=r
real 0.34
user 0.19
sys 0.03
render=d
real 0.37
user 0.18
sys 0.03
render=c
real 0.37
user 0.25
sys 0.02

maximised x-mon:

render=g
real 0.37
user 0.23
sys 0.03
render=r
real 0.36
user 0.20
sys 0.02
render=d
real 0.36
user 0.19
sys 0.02
render=c
real 0.38
user 0.24
sys 0.02


GRASS 6.3.cvs (BELGIQUE):~ > d.mon PNG PNG: GRASS_TRUECOLOR status: FALSE PNG: collecting to file: map.png,
GRASS_WIDTH=640, GRASS_HEIGHT=480
Graphics driver [PNG] started


render=g
real 0.24
user 0.21
sys 0.02
render=r
real 0.27
user 0.24
sys 0.00
render=d
real 0.27
user 0.23
sys 0.01
render=c
real 0.29
user 0.27
sys 0.01


More information about the grass-dev mailing list