4 intersection model vs. 9IM

76 views
Skip to first unread message

Casey Duncan

unread,
Mar 4, 2011, 1:31:46 PM3/4/11
to Jonathan Hartley, grease...@googlegroups.com
Hey there,

I've been doing some thinking about how intersection will work in
planar, and I wanted your opinion since you've also done some research
in this area.

It seems to come down to whether to support the full 9-intersection
model or not. I found a good discussion on this topic in this paper:

http://www.spatial.maine.edu/~max/4Vs9.pdf

Figure 4 seems to narrow down the distinction of what the 9IM model
buys you in terms of being able to differentiate different cases.

It seems like a practical approach might be to start with a 4IM and
extend it to 9 if needed. The advantages to 4IM being easier
implementation, and better performance. The downside to that might be
introducing subtle semantic differences if/when 9IM is implemented,
and whether an API designed to support 4IM can also work with 9IM
without breakage, or confusion.

Obviously if I were implementing a GIS library, I'd just go with 9IM,
but I do feel like the complexity may be beyond what is warranted for
a "game" library. Also there's only so many hours in the day ;^)

Since you've mentioned using shapely before, I wondered if you had any
thoughts on their approach with 9IM, and how well that fit your app
development. in particular I'd be interested to know what you think an
"ideal" intersection api might look like.

Any other random ideas on the topic are welcome too.

Thanks,

-Casey

Jonathan Hartley

unread,
Mar 5, 2011, 6:20:36 AM3/5/11
to grease...@googlegroups.com
Hey,

As it happens, just this month I've been considering 4IM vs 9IM myself,
trying to think of game scenarios in which 9IM would be required. I've
only been able to come up with ridiculously contrived ones. The one time
I used Shapely for a non-GIS (i.e. gaming) project, I didn't use the 9IM
distinctions at all.

So I agree that 4IM is sufficient. (I say this with a little
disappointment, but so be it.)

As for API, I don't have anything specific in mind, but I guess you
could do a lot worse than something similar to Shapely.

J

--
Jonathan Hartley tar...@tartley.com http://tartley.com
Made of meat. +44 7737 062 225 twitter/skype: tartley


Jonathan Hartley

unread,
Mar 5, 2011, 10:47:30 AM3/5/11
to grease...@googlegroups.com
Casey,

Would you have any interest in sitting down to chat about this & related
ideas during PyCon? It might be a good way to get potential contributors
like me up to speed with the project & your plans.

Jonathan

Casey Duncan

unread,
Mar 5, 2011, 2:22:11 PM3/5/11
to grease...@googlegroups.com
Totally, I'd love to sit down and brainstorm. I actually think I'll
formalize my intersection api ideas a bit this week as well. Doing the
simplest thing to start with is almost always the best choice. I stand
a much better chance of doing that well also.

Thanks,

-Casey

Reply all
Reply to author
Forward
0 new messages