[postgis-users] DE-9IM question

fork forkandwait at gmail.com
Tue May 8 08:46:36 PDT 2012


Does anyone know of an exhaustive reference of DE-9IM matrices, with pictures?

Context:

I just finished classifying a bunch of polygons based on their relationship to
enveloping poly's in another layer (census blocks and census city boundaries,
respectively).  The regular old st_within() and friends weren't enough, so I
calculated all the DE-9IM's, counted them (yay for GROUP BY and real
databases!), and made sure I knew what was going on for each of the matrices
returned (7 total).  Then I classified my block polys based on the strings.

I found it CRAZY how many different types of DE-9IM's could be returned, even
with just polygons and very well aligned boundaries (credit to the US Census
Bureau's geography division).  Only a few of the matrices in my data were
actually described in the few docs I could find.  Besides the seven in my data,
there are at least four more that can be generated by various combinations of
overlapping polygons.

It would have been much easier to do this project if I had been able to
reference a list of possibilities along with pictures.  It would be even better
if I could be confident that such a list was exhaustive.

Does anyone have a reference?

If not, I could continue to work on an atlas of DE-9IM matrices, at least for
polygons, and submit it somewhere if it were helpful.  Any ideas for where that
might go? (I don't have a blog and don't want to start one).  Maybe just the
wikipedia entry?

For those who don't know, a DE-9IM matrix is the output of st_relate(geo1,
geo2), and there is an excellent intro in the docs.  Fascinating stuff really.

Tx




More information about the postgis-users mailing list