[GRASS-dev] GUI for ps.map

Hamish hamish_b at yahoo.com
Thu Mar 24 20:58:27 EDT 2011


Anna wrote:
> thank you for your notes, I will do some changes you
> propose.  But I don't understand what do you mean
> with:
> 
> >  * "output to text" is a bit ambiguous. perhaps "Save As..." or
> >    "output instruction file" instead?
> 
> I couldn't find it. Do you mean "export to text file" in menu?

yes

> I would be glad if you find other bad translations, I'm not sure of them.

It's not really a bad translation, just that "text" is a bit vague.


> >  * maybe match R:G:B to standard named colors and substitute name
> >    if matched
> 
> It's a good idea. But now, there is a mess in color
> instructions in ps.map, because some instruction require
> named colors and others R:G:B. I hope Martin or someone will
> fix it. I use standard color picker so you can chose any
> color, but it won't work on some instructions.

Please list any you want fixed in bug ticket #192, and I will fix them.
Please list those in order of importance/gui implementation.
  https://trac.osgeo.org/grass/ticket/192

(the task to replace "color 0:0:0" with "color black" should be
independent of that though, but less critical since just cosmetic)


> > wiki todo:
> >   * map scale for ll projections (map window)
> > what does that entail?
> 
> I don't offer the option "fixed scale and map center" in
> case of  ll projections. Is that right?

I'll have to think about it, on the surface "fixed scale and map center"
seems like trouble to me. Note that ps.map automatically changes the scale
to the maximum possible if the user asks for something invalid, or doesn't
define a fixed scale at all.

My usual workflow is to run ps.map with my desired raster map and region,
see that it sets the scale to 1:165235 or so, then manually adjust to
1:750000 or some nice round number nearby. Note 1:150000 would just fall
back to 1:165235; a 'draft' run will give the minimum bound.

Once the scale is chosen I open the .ps file in `gv` and measure the PS
point coordinate between the left edge of paper and left edge of map
window (usually 36 or 72), then same on the right side (varies), then
take the average of the two and divide by 72 to get the correct x value
for the maploc placement.

Not very intuitive but the method works very well, and I think listed in
the ps.map wiki page. I have been meaning to add a maploc command to
optionally center the box horizontally, but not done that yet.


> There is a bug in mapinfo, if it is placed on the left side
> of map, ps.map aligns it to the map -- for example 
> 
> mapinfo
>      where 1 1
>      end
> maploc 2 1
> 
> will result in mapinfo's position 2 1 in postscript

I'm not sure if that is technically a bug, or if it was some intentional
design, but anyway if it is exceptionally weird we can of course change
it. please file a bug and I'll look into it.

fwiw, I'd always list maploc first, but I don't think it actually matters.


> Mapinfo has problems with background color and border. They
> are drawn only when mapinfo lies over the map.

yeah, I know that one (mea culpa). if there's not already a bug report
open for it please create one.

here's the code from ps/ps.map/map_info.c

        /* draw the background box */
        if (m_info.bgcolor != -999) {   /* skip if "none" */
            set_rgb_color(m_info.bgcolor);
            fprintf(PS.fp, "%.1f %.1f t1 %.1f B fill \n",
                    x - margin, y - k * dy - margin, y);
        }

I'm not sure why it doesn't work.


cheers,
Hamish



      


More information about the grass-dev mailing list