[GRASSLIST:1761] maps with polygons from sites files

Hi,

i need thematic maps from sites files (pinpoint maps). But the maps with
d.sites commands are not very fancy. So i had the idea that i could draw
polygons with piping s.out.ascii to v.in.poly and display with d.area.
This allows me to draw circles, triangles, quadrats and other regular
shaped polygons with user selectable size and colors.

But the problem with this is that for overlapping polygons the topology
is not created correctly, so nothing is displayed or only some points
are drawn in the display.

Are there any workarounds for this? Can i use another command?

Thanks in advance for help,

Andreas

--
Andreas Lange, 65187 Wiesbaden, Germany, Tel. +49 611 807850
Andreas.Lange@Rhein-Main.de - A.C.Lange@GMX.net

Andreas Lange wrote:

Hi,

i need thematic maps from sites files (pinpoint maps). But the maps with
d.sites commands are not very fancy. So i had the idea that i could draw
polygons with piping s.out.ascii to v.in.poly and display with d.area.
This allows me to draw circles, triangles, quadrats and other regular
shaped polygons with user selectable size and colors.

But the problem with this is that for overlapping polygons the topology
is not created correctly, so nothing is displayed or only some points
are drawn in the display.

Are there any workarounds for this? Can i use another command?

Thanks in advance for help,

Andreas

You can use ps.map where you can specify EPS file for sites.
More EPS files for sites in one sites file may be specified by category
number.
Icons may be rotated by constant and scaled by selected float attribute. It
is described in man page.

Radim

Hi Radim,

thank you very much for your comments.
While playing around with ps.map some more questions arise:

The generated ps files are _very_ big (50 to 130 MB).
If i make pdf files from them (ps2pdf), they shrink down to 1-3 MB.
Is this related to compression?

Are there any ready-to-use ps_icons for grass? Creating them is very
cumbersome.
And the ps_icons are not listed with g.list etc.

Can i use normal eps files generated with other programs? The manual is
not very exhausting here. Are the eps files scalable with the category
value from the sites list?

I think the hcolor and hwidth parameters to the vector display need some
more explanation. Am i right that if i have a style of 0011 the 0's get
painted with color/width parameter and the 1's with the hcolor and
hwidth parameter? Or the other way round? I am confused.

It would be nice to use rgb values for all colors and to allow raster
overlays (with NULL). And i am missing umlauts/localization of the
texts.

But the output is very nice. This has a lot of more potential, but a
user interface is needed IMHO.

cu,

Andreas

Radim Blazek wrote:

Andreas Lange wrote:
> Hi,
>
> i need thematic maps from sites files (pinpoint maps). But the maps with
> d.sites commands are not very fancy. So i had the idea that i could draw
> polygons with piping s.out.ascii to v.in.poly and display with d.area.
> This allows me to draw circles, triangles, quadrats and other regular
> shaped polygons with user selectable size and colors.
>
> But the problem with this is that for overlapping polygons the topology
> is not created correctly, so nothing is displayed or only some points
> are drawn in the display.
>
> Are there any workarounds for this? Can i use another command?
>
> Thanks in advance for help,
>
> Andreas

You can use ps.map where you can specify EPS file for sites.
More EPS files for sites in one sites file may be specified by category
number.
Icons may be rotated by constant and scaled by selected float attribute. It
is described in man page.

Radim

--
Andreas Lange, 65187 Wiesbaden, Germany, Tel. +49 611 807850
Andreas.Lange@Rhein-Main.de - A.C.Lange@GMX.net

Andreas Lange wrote:

Hi Radim,

thank you very much for your comments.
While playing around with ps.map some more questions arise:

The generated ps files are _very_ big (50 to 130 MB).
If i make pdf files from them (ps2pdf), they shrink down to 1-3 MB.
Is this related to compression?

PS files are written as ascii including rasters and so if you have map with
rasters that size is possible and it will not be better.

Are there any ready-to-use ps_icons for grass? Creating them is very
cumbersome.
And the ps_icons are not listed with g.list etc.

AFAIK no.

Can i use normal eps files generated with other programs? The manual is
not very exhausting here. Are the eps files scalable with the category
value from the sites list?

Yes, eps files written as ascii files with unix <NL> generated by
other programs should be OK. I tested only some pictures generated by fig
(including raster + vector picture) and some ps files generated by
microstation where conversion to unix text was needed. Simple eps icons may
be written even by hand (some knowledge of ps is required).
But including eps to ps files (eps and ps both are programs and not picture
formats) is complex task and some problems may appear.

Scaling is possible not by category but float attribute. Category may be used
for eps specification. You can use one site file and for each category one
eps file and at the same time scale by float attribute:

sites test
  eps $.eps # where $ is replaced by category on runtime by ps.map
  size 0.1 # scale all
  size_att 3 # scale by third float attribute
end

I think the hcolor and hwidth parameters to the vector display need some
more explanation. Am i right that if i have a style of 0011 the 0's get
painted with color/width parameter and the 1's with the hcolor and
hwidth parameter? Or the other way round? I am confused.

I am not sure here. Style is limited and I do not even know how to improve in
future because patterns are defined only for polygons in PS.

It would be nice to use rgb values for all colors and to allow raster
overlays (with NULL).

Yes, I plan rgb colors but I do not plan rasters overlay because overlays may
be done by other modules, but anybody may work on that ....

And i am missing umlauts/localization of the
texts.

What do you mean here? Because you can specify any ps font by name. All my
maps have czech characters.
Note: new fonts for gs must be specified in: /usr/share/ghostscript/5.50/Fontmap (or similar).
And AFAIK in gs < v6.0 Type1 fonts are converted to raster for pdf output, in
6.0 it is OK (vector fonts).

But the output is very nice. This has a lot of more potential, but a
user interface is needed IMHO.

Yes, first of all for interactive labels and legend placement.

Radim