[R] Re: RArcInfo 0.3 (fwd)

virgil@uv.es virgil at uv.es
Mon Aug 26 21:05:09 CEST 2002


I have been thinking about your questions and comments. And I think I have
the answers. :D

> the way you draw the polygons has the consequence that if the larger one
> is drawn after the smaller one,
> the color of the smaller one is "overwritten"
> and therefore the map is really wrong in the relevant area.
> so this needs fixing.

Another approach is sorting the polygons by its area. The polygons
are plotted according to the order in "index", so, this way, the inner
polygons are plotted later and you get the right map.

Of course, this could be done inside plotpoly, but then another parameter
will be needed, and I would like to keep the function as simple as
possible in order to provide the most flexibility to the user.

> 2. it would be nice of the number of polygon edges could
> be "thinned out" for doing a screen image.
> the resolution of the borderlines is usually the one needed only for
> high quality large format paper printout.
> for screen images, it would look better with more straight edge lines
> and less corners.
> i do not know if the arcinfo library you are using
> supports such a thinning out.

I don't think so. The library is just a heap of function to access to the
data in the binary coverages. I know plotpoly is REALLY slow. For example,
plotting the map of Austria takes about 5-10 minutes in my computer (an
Athlon 1.4 MHZ, 1 GB RAM).

But I think this happens because, when plotting, the function works with a
lot of lists (with data that aren't needed for printing). That's why I am
thinking about creating a new object storing only the the points needed to
plot each arc, like in a shapefile.

There is a package called maptools to manage ESRI shapefiles (it is not on
CRAN). So, I can create anew function to convert the data imported from
the binary coverage to the same type of data imported from the shapefile
(just a table data and the vertices of the polygons). So, you can use the
functions in maptools to plot.

It's good because many people just want to draw a map according to some
data (me too :D).

Well, any comment or question?



r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch

More information about the R-help mailing list