Wednesday, February 17, 2010

JTS & Jython

Sean's post suddenly made me realize that it might be really cool to have a nice set of Jython bindings for JTS (a la what Shapely has done for GEOS).

Now, of course Jython can call Java classes directly, so maybe this is an empty task. But perhaps there are some impedance mismatches which could be removed via some simple glue code. And it would be nice to provide some examples of Jython code using JTS, to make it easier for people to figure out how to get started.

And of course I'd throw in Proj4J as well!

One more thing for my ever-growing task list...

If anyone has any ideas on what needs doing here, I'd like to hear them.

(This also makes me think that both Jython and JTS need some cool logos... I don't have any pictures to post!)

3 comments:

sgillies said...

I, for one, would profit from a Jython JTS API. I could see porting at least one of my Shapely-using apps to App Engine.

gene said...

Look at

http://pyright.blogspot.com/2011/03/jython-jts-geometry-library.html

Dr JTS said...

Nice work, Gene.

So I guess a Jython API isn't absolutely necessary per se, since you seem to be able to use the JTS API directly. Are there any situations where it would be nice to have more "Pythonesque" methods or structures?

If it's not too hard or unpleasant to do, I could add some of these directly into JTS, if they are needed.