[Dev] Review of Spatial4j for impending 0.4 release
I'm looking for feedback as I gear up for a pushing a 0.4 release in maybe a week. I've been guilty of feature-creap pushing off this release.
I posted a CHANGES.txt document that reviews the changes to date since version 0.3. I regret not adding manual newlines; and perhaps I should use Markdown or Textile. (comments?)
What 0.4 does not include is more aggressive API changes such as creating a shape factory interface. The next release should perhaps include such things.
I'm on the fence of doing some moving around of classes to different packages and/or renaming for 0.4. Once upon a time all things needing JTS got a JTS sub-package to where it might otherwise go. My opinion is that it's a bit redundant to do that since after all, all such classes start with the "Jts" prefix.
I recently added the BinaryCodec but I need to kick the tires on it say in SolrSpatialSandbox to see how it might work in practice. Already I think it was stupid of me to base the api on ByteBuffer because that means for writing you have to set aside a sufficiently size buffer a-priori or hit an overflow exception. I think instead I should change it to DataInputStream and DataOutputStream. Thoughts here are most welcome as this capability is quite new. (p.s. the javadocs are incomplete on the codec; I know).
Re: [Dev] Review of Spatial4j for impending 0.4 release
Another thing I'm inclined to change:
* the wording of "prepare" (RE JtsGeoStrategy) should perhaps instead be "addIndex". The "prepare" word is inherited from the wording choice that JTS makes, but if you stand back without knowing that... it's not a word that's very clear as to what it does. Even "optimize" is inappropriate as it suggests the shape is somehow simplified or re-organized. I like "addIndex" because that accurately reflects what is happening: a JTS PreparedGeometry is an index, and JtsGeometry adds it to exist in conjunction with the Geometry. If there's no discussion within a couple days then I'll just go make this change.