Fun With Shapely

Very cool. Is this neogeogenomics? I hope the JTS/GEOS architects are equally pleased. You could do this with the OGR Python bindings of course, but since there are no projections involved, and no GIS data to read – only the comparably baroque genetic software formats – there's little point in doing so. I designed Shapely to provide simple spatial functions and otherwise get out from under the feet of your imagination.

Comments

Re: Fun With Shapely

Author: brentp

but with ogr, it'd be more code to translate to/from numpy arrays for plotting -- unless ogr bindings provide the array interface and i just missed that. any chance for 1D spatial operators in geos, like: >>> LineString1D(astart, astop).overlaps(LineString1D(bstart, bstop)) for that kind of thing i use: >>> LineString([[astart, 0], [astop, 0]]).overlaps(...) maybe then "neogeogenomics" would catch on.

Re: Fun With Shapely

Author: Sean

I'm not sure that I understand you. The 1D calculations would be trivial, yes? Is the distance between their center points less than or equal to half the sum of their lengths?

Re: Fun With Shapely

Author: brentp

yes, they are trivial--and your method is simpler than i'd been using. But then for a Multi1D, you do that n times. and Multi1D to Multi1D, n*n times... maybe i'm too lazy.