ReferencedEnvelope extends JTS Envelope Literally RefernecedEnvelope is a compromise: The ReferencedEnvelope is one of the first GeoTools specific classes documented in our user guide, and is an example of something that makes the library unique. Internally GeoTools often makes use of a single implementation: So yes you need to pick one for your application the GeoTools library will do its best to work with your needs.Ĭould we refactor these into a single Envelope2D class/interface? If you are working with Java3D you will find it has its own Bounds and BoundingBox (and BoundingSphere) classes When working with the JTS Topology Suite you will need to use an Envelope class (defined according to the Simple Features for SQL Specification) When working with Java you will need to use a Rectangle, specifically Rectangle2D.Double If you are really sure you are working with a 2D CRS you can make use of a BoundingBox subclass.īut in actual fact you will need to consider a couple other interfaces: ![]() The Envelope interface stores a CRS and a range of valid values for each axis mentioned by the CRS. Envelope - this is a GeoAPI interface defined according to the the ISO 19107 Geometry specification In short there is one interface that represents an "Rectangle" well: Is it possible to have a single interface? Pick one? Could we refactor these 5 different classes into a singleĮnvelope2D class/interface?The answer is a bit of a pain but it does go a long way toward explaining what we are about with a spatial library, and why GeoTools may be considered difficult to learn. Single interface that I could reference in my code, or do I need to ![]() Is it possible these different envelope classes are represented by a ![]() I noticed in the GeoTools Javadoc (2.5 branch) the following 5 classes that could be used to represent an envelope: Envelope, Envelope2D, EnvelopeExample, .coordinate.EnvelopeImpl, .geometry.EnvelopeImpl
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |