[R-sig-Geo] agenda for R's Geo capabilities?

Roger Bivand Roger.Bivand at nhh.no
Fri Mar 16 19:00:41 CET 2007


On Fri, 16 Mar 2007 White.Denis at epamail.epa.gov wrote:

> The thread below and many others in R-sig-Geo raise questions about
> future directions.  In reinventing GIS there are a whole list of
> capabilities and functions that would be helpful.  Some that I have
> noticed include,
> 
> Topological representation to enable
>       Planar enforcement of boundary integrity of polygon tessellations
>       "Dissolving" interior edges easily as in the thread below
> Large problem computational geometry functions
>       Identify many points inside of many polygons
>       Intersections/overlays of two sets of many polygons
>       Distances between all pairs of many polygons
> 
> Are there members of the R Geo community working on any of these?
> Are these issues seen as an exclusive focus of commercial GIS?
> Are there discussions about these issues at relevant conferences?

One possibility was mentioned in a question by Hisaji Ono last year, and 
which could be done, is to build rgdal against a GDAL/OGR with GEOS 
support, and use the OGR functions such as:

virtual OGRGeometry * 	Union (const OGRGeometry *) const

and other similar ones. This would also involve trying to make a faster 
conversion between the OGR and internal sp representations, and may 
precipitate a redefinition of polygons in sp to be fully OGR compatible.

The sp S4 classes would need much better integration with OGR for this to 
work adequately on larger data sets, but we could profile it after 
prototyping.

> 
> (I will be at AAG in San Francisco and would be happy to meet with
> others if there is interest.)

Thanks for taking this initiative! As one of the guilty parties, and also
at the AAG, count me in, at least for the prototyping - I think GEOS is a
realistic place to start because it is being used by others and maintained
actively.

Having tried things out, we may find that this is too much GIS, and that 
either using a GIS or a database interface like PostGIS or aRT/Terralib is 
a better idea. But at least we'd know.

Roger

> 
> r-sig-geo-bounces at stat.math.ethz.ch wrote on 2007-03-16 07:52:59:
> 
> > Hi Tim,
> > You could compute the convex hull first, and then iterate from points
> > on the convex hull. That should be much faster already, especially
> since
> > hexagons are convex and the perimeter will be locally convex around
> all
> > the
> > points touching the convex hull. You could do a variation
> > of the "monotone pieces" algorithm that is used in computational
> > geometry.
> > But this is a simpler problem. Are there cases with interior holes?
> >
> > I have been meaning to write something like this for hexbin for a
> while.
> > There
> > are many cases where it would be nice to find approximations to the
> > density contours
> > and a quick and dirty way is to threshold the hexagon counts, find the
> > hull and
> > smooth the perimeter.
> >
> > Nicholas
> >
> > On Fri, 16 Mar 2007 08:34:20 -0500, "Tim Keitt" <tkeitt at gmail.com>
> said:
> > > Hi Nic,
> > >
> > > The convex hull would be fast and easy to compute (there's existing
> > > code in R). I want the ordinary hull which is the set of arcs
> forming
> > > the perimeters (inside and out). My crude and very slow solution was
> > > to convert all the polygons (in this case hexagons on a lattice)
> into
> > > their constituent arcs and then for each arc count how many times it
> > > occurs in the set (requires slightly fuzzy matching of points). Arcs
> > > that occur more than once are removed. The remaining arcs form the
> > > hull. Runs in about 20 minutes with a  few hundred hexagons.
> > > Sufficient for the moment.
> > >
> > > THK
> > >
> > > On 3/16/07, Nicholas Lewin-Koh <nikko at hailmail.net> wrote:
> > > > Hi Tim,
> > > > I am not quite sure what you are getting at here. Do you want to
> > > > intersect
> > > > polygons and then select the set of lines that form the outer
> perimeter?
> > > > Do you wan the convex hull of a set of polygons. I guess I have
> been out
> > > > of the
> > > > GIS world to long. It seems to me that this would be something
> easy to
> > > > solve,
> > > > just tedious iteration of the polygon coordinates and some
> > > > triangulation.
> > > >
> > > > Nicholas
> > > >
> > > > > Date: Thu, 15 Mar 2007 10:49:23 -0500
> > > > > From: "Tim Keitt" <tkeitt at gmail.com>
> > > > > Subject: [R-sig-Geo] polygons to arcs?
> > > > > To: r-sig-geo at stat.math.ethz.ch
> > > > > Message-ID:
> > > > >
> <6262c54c0703150849qe60ab14nfef1eb3bf73dfb5d at mail.gmail.com>
> > > > > Content-Type: text/plain; charset=ISO-8859-1; format=flowed
> > > > >
> > > > > Is there an 'sp' function that takes a polygon as its argument
> and
> > > > > returns a set of line objects corresponding to the arcs in the
> > > > > polygon?
> > > > >
> > > > > Or better yet, a function that given a set of polygons, returns
> the
> > > > > hull? (ie the set of singleton arcs after applying the polys to
> arcs
> > > > > function)
> > > > >
> > > > > THK
> > > > >
> > > > > --
> > > > > Timothy H. Keitt, University of Texas at Austin
> > > > > Contact info and schedule at http://www.keittlab.org/tkeitt/
> > > > > Reprints at http://www.keittlab.org/tkeitt/papers/
> > > > > ODF attachment? See http://www.openoffice.org/
> > > > >
> > > > >
> > > > >
> > > >
> > >
> > >
> > > --
> > > Timothy H. Keitt, University of Texas at Austin
> > > Contact info and schedule at http://www.keittlab.org/tkeitt/
> > > Reprints at http://www.keittlab.org/tkeitt/papers/
> > > ODF attachment? See http://www.openoffice.org/
> >
> > _______________________________________________
> > R-sig-Geo mailing list
> > R-sig-Geo at stat.math.ethz.ch
> > https://stat.ethz.ch/mailman/listinfo/r-sig-geo
> 
> _______________________________________________
> R-sig-Geo mailing list
> R-sig-Geo at stat.math.ethz.ch
> https://stat.ethz.ch/mailman/listinfo/r-sig-geo
> 

-- 
Roger Bivand
Economic Geography Section, Department of Economics, Norwegian School of
Economics and Business Administration, Helleveien 30, N-5045 Bergen,
Norway. voice: +47 55 95 93 55; fax +47 55 95 95 43
e-mail: Roger.Bivand at nhh.no




More information about the R-sig-Geo mailing list