Re: [postgis-users] DE-9IM question

2012-05-09 Thread fork
Martin Davis mtnclimb at telus.net writes:

 
 Have a look at:
 
 http://www.vividsolutions.com/jts/tests/index.html
 
 This is a visual interface to the JTS Test Suite, which has a very 
 complete collection of DE-9IM cases.  

Interesting!  Seems exhaustive to me.  Two comments:  Did you prove
exhaustiveness - seems like there should be a way to make a combinatorial
argument about how many possible Clementini matrices are possible (9^4 == 6561,
less impossible combinations)?  Also - it might be easier to do confirm
exhaustiveness with simpler shapes, at least for part of the tests.  Still,
looks great, and comforts me that you are testing that hard. 

 As was mentioned, you can use the JTS TestBuilder to build and inspect 
 test  cases.  You can drag-and-drop Test Suite XML files onto the 
 TestBuilder, so it's easy to inspect the cases in the XML tests.

That is cool!

 I'm not sure if Wikipedia would appreciate being flooded with DE-9IM 
 test cases - it doesn't seem like quite the right place for it.  The 
 Vivid site is a good reference as long as it stays up.

I will continue to think about this.  I probably don't have time to do fiddle
with this in any systematic way, but a table with every possible matrix, a
picture, and simple code to generate it might be pretty useful.
 

___
postgis-users mailing list
postgis-users@postgis.refractions.net
http://postgis.refractions.net/mailman/listinfo/postgis-users


Re: [postgis-users] DE-9IM question

2012-05-09 Thread Martin Davis
No, we didn't prove exhaustiveness.  But as you can see from the 
documentation in the test cases we did try and formalize a system for 
describing geometric configurations, with the idea that it might lead to 
a way of enumerating all possible distinct situations.  It would be 
interesting to see this pushed through to a proof.


On 5/9/2012 9:32 AM, fork wrote:

Martin Davismtnclimbat  telus.net  writes:


Have a look at:

http://www.vividsolutions.com/jts/tests/index.html

This is a visual interface to the JTS Test Suite, which has a very
complete collection of DE-9IM cases.

Interesting!  Seems exhaustive to me.  Two comments:  Did you prove
exhaustiveness - seems like there should be a way to make a combinatorial
argument about how many possible Clementini matrices are possible (9^4 == 6561,
less impossible combinations)?  Also - it might be easier to do confirm
exhaustiveness with simpler shapes, at least for part of the tests.  Still,
looks great, and comforts me that you are testing that hard.


As was mentioned, you can use the JTS TestBuilder to build and inspect
test  cases.  You can drag-and-drop Test Suite XML files onto the
TestBuilder, so it's easy to inspect the cases in the XML tests.

That is cool!


I'm not sure if Wikipedia would appreciate being flooded with DE-9IM
test cases - it doesn't seem like quite the right place for it.  The
Vivid site is a good reference as long as it stays up.

I will continue to think about this.  I probably don't have time to do fiddle
with this in any systematic way, but a table with every possible matrix, a
picture, and simple code to generate it might be pretty useful.


___
postgis-users mailing list
postgis-users@postgis.refractions.net
http://postgis.refractions.net/mailman/listinfo/postgis-users


-
No virus found in this message.
Checked by AVG - www.avg.com
Version: 2012.0.1913 / Virus Database: 2425/4987 - Release Date: 05/09/12



___
postgis-users mailing list
postgis-users@postgis.refractions.net
http://postgis.refractions.net/mailman/listinfo/postgis-users


[postgis-users] DE-9IM question

2012-05-08 Thread fork
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

___
postgis-users mailing list
postgis-users@postgis.refractions.net
http://postgis.refractions.net/mailman/listinfo/postgis-users


Re: [postgis-users] DE-9IM question

2012-05-08 Thread Sandro Santilli
On Tue, May 08, 2012 at 03:46:36PM +, fork wrote:
 Does anyone know of an exhaustive reference of DE-9IM matrices, with pictures?

http://en.wikipedia.org/wiki/DE-9IM
http://postgis.org/documentation/manual-svn/using_postgis_dbmanagement.html#DE-9IM

--strk;

  ,--o-. 
  |   __/  |Delivering high quality PostGIS 2.0 !
  |  / 2.0 |http://strk.keybit.net - http://vizzuality.com
  `-o--'

___
postgis-users mailing list
postgis-users@postgis.refractions.net
http://postgis.refractions.net/mailman/listinfo/postgis-users


Re: [postgis-users] DE-9IM question

2012-05-08 Thread fork
Sandro Santilli strk at keybit.net writes:

 http://en.wikipedia.org/wiki/DE-9IM
 http://postgis.org/documentation/manual-svn/using_postgis_dbmanagement.html#DE-9IM

Those either aren't exhaustive (postgis) or don't have pictures (wiki).  I would
like to be able to look up FF2F1F212 and see a picture of it. 

I think a difference is that I am not interested in using a matrix to implement
a function like st_within(), but rather I am querying a database looking for
relationships and how to deal with them.  In my case, also, the query will never
return a string with wildcards in it, because it will give me the exact
relationship. (Maybe the above links are exhaustive if you count wildcards,
though...)

Sorry -- I tried to make clear that I had already read the docs that are easily
available.  Thanks for the explicit links though.

___
postgis-users mailing list
postgis-users@postgis.refractions.net
http://postgis.refractions.net/mailman/listinfo/postgis-users


Re: [postgis-users] DE-9IM question

2012-05-08 Thread fork
fork forkandwait at gmail.com writes:

 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.  

For a flavor, look at Table 3 here:

http://www.cise.ufl.edu/~mschneid/Research/papers/BS01ER.pdf

Note that these matrices are boolean for the intersection, and there are 32 of
them.  One can tweak them so that the max dimension on the boundaries is either
0 (a point) or 1 (a line) and create more matrices using the full definition of
DE-91M; see #33.

I am mostly just entertaining myself with mathematical patterns, but I think the
topological matrices might be useful in trying to figure out how to simplify
slivers and weird things.

I also think one's intuition about within might not stand up to closer
scrutiny via mathematical formalisms like this.  The only way I could figure out
my blocks-in-cities problem was to abandon st_within() etc and go for a list of
specific DE-9IM's based on the data.

If I feel bored/ ambitious I will try to create a useful atlas.  I don't think
one exists...

___
postgis-users mailing list
postgis-users@postgis.refractions.net
http://postgis.refractions.net/mailman/listinfo/postgis-users


Re: [postgis-users] DE-9IM question

2012-05-08 Thread Mike Toews
On 9 May 2012 03:46, fork forkandw...@gmail.com wrote:
 Does anyone know of an exhaustive reference of DE-9IM matrices, with pictures?

A really handy visual tool to work with DE-9IM is JTS TestBuilder. You
can interact with the geometries and the results, which makes it a
pretty good educational tool. You can copy/paste WKB directly into the
geometry inputs, which makes it work nice with PostGIS.

Take a look at http://gis.stackexchange.com/a/12119/1872

-Mike
___
postgis-users mailing list
postgis-users@postgis.refractions.net
http://postgis.refractions.net/mailman/listinfo/postgis-users


Re: [postgis-users] DE-9IM question

2012-05-08 Thread Stefan Keller
Hi fork

On 2012/5/8 fork forkandw...@gmail.com wrote:
 Does anyone know of an exhaustive reference of DE-9IM matrices, with pictures?

I don't think I would call it a reference but take a look
http://labs.geometa.info/postgisterminal/?xapi=node[tourism=zoo] :
There is a menu item Relate exemplified (bool) which displays
parameters as as list of pictures (disregarding of the current query).
Choose the two geometry types and the DE-9IM pattern, then click on
[+] and look at the prerendered pictures.
Pls. give feedback if you have any suggestions.

-S.


 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

 ___
 postgis-users mailing list
 postgis-users@postgis.refractions.net
 http://postgis.refractions.net/mailman/listinfo/postgis-users
___
postgis-users mailing list
postgis-users@postgis.refractions.net
http://postgis.refractions.net/mailman/listinfo/postgis-users


Re: [postgis-users] DE-9IM question

2012-05-08 Thread Martin Davis

Have a look at:

http://www.vividsolutions.com/jts/tests/index.html

This is a visual interface to the JTS Test Suite, which has a very 
complete collection of DE-9IM cases.  It is meant to be exhaustive - if 
you find something missing, send it in!  It would be interesting to see 
the 7 situations that you found.


The test suite is here:

http://jts-topo-suite.svn.sourceforge.net/viewvc/jts-topo-suite/trunk/jts/testxml/

The validate directory contains the DE-9IM tests.

As was mentioned, you can use the JTS TestBuilder to build and inspect 
test  cases.  You can drag-and-drop Test Suite XML files onto the 
TestBuilder, so it's easy to inspect the cases in the XML tests.


I'm not sure if Wikipedia would appreciate being flooded with DE-9IM 
test cases - it doesn't seem like quite the right place for it.  The 
Vivid site is a good reference as long as it stays up.


On 5/8/2012 8:46 AM, fork wrote:

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

___
postgis-users mailing list
postgis-users@postgis.refractions.net
http://postgis.refractions.net/mailman/listinfo/postgis-users


-
No virus found in this message.
Checked by AVG - www.avg.com
Version: 2012.0.1913 / Virus Database: 2425/4985 - Release Date: 05/08/12



___
postgis-users mailing list
postgis-users@postgis.refractions.net
http://postgis.refractions.net/mailman/listinfo/postgis-users