Talk:DE-9IM
This article is rated B-class on Wikipedia's content assessment scale. It is of interest to the following WikiProjects: | |||||||||||
|
ST_Relate translator
editThe PostGIS (and similar by OGC standards) offer the ST_relate function for the DE-9IM analysis,
http://www.postgis.org/documentation/manual-2.0/ST_Relate.html
If the DE-9IM article is correct, the "or list" for each spatial predicate (binary operator) is
Equals T*F**FFF* Disjoint FF*FF**** Intersects T******** *T******* ***T***** ****T**** Touches FT******* F**T***** F***T**** Crosses T*T****** T*****T** 0******** Within T*F**F*** Contains T*****FF* Overlaps T*T***T** 1*T***T** Covers T*****FF* *T****FF* ***T**FF* ****T*FF* CoveredBy T*F**F*** *TF**F*** **FT*F*** **F*TF***
Then, we can translate the result of the ST_Replate() function into a summarized and human-readable string,
http://code.google.com/p/postgis-st-relate-summary/
Number of possible cases
editThe number of possible results in a binary DE-9IM matrix is 512, but, all results that ends with '0' or '1' (EE) starts with '1' or '0', since EE is the opposite of II. This correlation reduces the number of possible results to 256. Calculating the probability of each predicate in a context of possible matrix results,
Equals T*F**FFF = 2^3 = 8 (3.1% of 256) or T*F**FFF* = 2^4 = 16 (3.1% of 512) Disjoint FF*FF*** = 2^4 = 16 (6.3% of 256) Intersects T******* *T****** ***T**** ****T*** P1 = = 2^7 = 128 (50% of 256), P2 = 50% - P2(P1), P3 = ... P1+P2+P3+P4 = 240 (93.8% of 256) Touches FT****** F**T**** F***T*** 112 (43.8%) Crosses T*T***** T*****T* 0******* changes with combination of input dimensions 2^6 = 64 (25% of 256) and 0% for inputs with equal dimensions, except lines. Within T*F**F** = 2^5 = 32 (12.5% of 256) Contains T*****FF = 2^5 = 32 (12.5% of 256) Overlaps T*T***T* 1*T***T* changes with combination of input dimensions for both cases, 2^5 = 32 (12.5% of 256) Covers T*****FF *T****FF ***T**FF ****T*FF 60 (23.4%) CoveredBy T*F**F** *TF**F** **FT*F** **F*TF** 60 (23.4%)
You can demonstrate by Combinatorics or by software. Example:
CREATE FUNCTION bit8checkmask(bit(8),bit(8),bit(8)) RETURNS boolean AS
$func$
SELECT COALESCE(($1 & $2 = $3),false);
$func$ LANGUAGE SQL IMMUTABLE;
CREATE FUNCTION testmask(bit[],bit[]) RETURNS table (s integer,perc float) AS
$func$
select s, round(100.0*s::float/256.0,1) as perc FROM (
select sum((
bit8checkmask(v::bit(8),$1[1],$2[1])
OR bit8checkmask(v::bit(8),$1[2],$2[2])
OR bit8checkmask(v::bit(8),$1[3],$2[3])
OR bit8checkmask(v::bit(8),$1[4],$2[4])
)::integer)::integer as s from (
select generate_series(0,255) as v
) as t ) as t2;
$func$ LANGUAGE SQL;
-- -- EXAMPLE:
select * from testmask( -- Intersects
-- 'T*******', '*T******', '***T****', '****T***'
array[b'10000000',b'01000000',b'00010000',b'00001000'],
array[b'10000000',b'01000000',b'00010000',b'00001000']
); -- 240 | 93.8%
For the {0,1,2,F} domain of the DE-9IM matrix, generating sequences from 0 to 3^8=6561, falls into same percentuals for masks of {T,*} domain, like Intersects, Equals, etc. and lower values for masks of {0,1,2,T,*} domain.
Illustrations for predicates
editWork to do, add some of these illustrations...
related articles
edit- Spatial relation
- ...
External links modified
editHello fellow Wikipedians,
I have just modified 2 external links on DE-9IM. Please take a moment to review my edit. If you have any questions, or need the bot to ignore the links, or the page altogether, please visit this simple FaQ for additional information. I made the following changes:
- Added archive https://web.archive.org/web/20100614161335/http://www.spatial.maine.edu/~max/MJEJRH-SDH1990.pdf to http://www.spatial.maine.edu/~max/MJEJRH-SDH1990.pdf
- Added archive https://web.archive.org/web/20110321145301/http://www.vividsolutions.com:80/jts/javadoc/com/vividsolutions/jts/geom/IntersectionMatrix.html to http://www.vividsolutions.com/jts/javadoc/com/vividsolutions/jts/geom/IntersectionMatrix.html
When you have finished reviewing my changes, please set the checked parameter below to true or failed to let others know (documentation at {{Sourcecheck}}
).
This message was posted before February 2018. After February 2018, "External links modified" talk page sections are no longer generated or monitored by InternetArchiveBot. No special action is required regarding these talk page notices, other than regular verification using the archive tool instructions below. Editors have permission to delete these "External links modified" talk page sections if they want to de-clutter talk pages, but see the RfC before doing mass systematic removals. This message is updated dynamically through the template {{source check}}
(last update: 5 June 2024).
- If you have discovered URLs which were erroneously considered dead by the bot, you can report them with this tool.
- If you found an error with any archives or the URLs themselves, you can fix them with this tool.
Cheers.—InternetArchiveBot (Report bug) 17:15, 4 December 2016 (UTC)
Featured article nomination
editAn incomplete nomination for a Wikipedia:Featured article candidates has been placed on this page.
In my view the article is a long way from where it would need to be to stand a chance. The main criticism which would be encountered is its accessibility. Even as someone with a mathematics background I've found to hard to follow.--Salix alba (talk): 14:13, 1 October 2018 (UTC)
- Hi @Salix alba: thanks to comment (!). Well, I agree that more didatic will be good, can you show "didactic articles" as example?
- External didactic article about DE-9IM, as this one or this other: what characteristics you see there that you not see here? We need more illustrations? .. Show any paragraph or section that is better there (tham here), so if it is easy I can try to change here in the correct direction.
- Internal featured didactic article with mathematical background: any article, to show as "reference model" to this kind of content.
- Krauss (talk) 01:02, 17 November 2018 (UTC)
Grammar error
editThis part of a sentence does not make sense: "...it is useful the translation..." 2A00:23C5:FE1C:3701:1051:7725:5B14:15EF (talk) 20:07, 10 November 2024 (UTC)