Indeed; it's quite confusing.
Sorry if I wasn't clear enough... I have a GridEnvelope. It could be any implementing type in the general case but in my particular case I know it happens to be an instance of org.geotools.coverage.grid.GeneralGridEnvelope. And I want a org.opengis.geometry.Envelope. If I assume that my source type is specifically GeneralGridEnvelope then I can cast it to this and call toRectangle() and give this to a constructor of GeneralEnvelope. It doesn't seem good to make this assumption, however. This struck me as something that would probably exist in some utility class or some constructor or factory I was unaware of. I'm not sure. I could pull out the components of GridEnvelope (getSpan(), getHigh(), getLow(),...) but that seems like something someone else would have done already and I might resuse it. Perhaps not.
~ David
________________________________________
From: Michael Bedward [
[hidden email]]
Sent: Thursday, October 15, 2009 10:03 PM
To: Smiley, David W.
Cc:
[hidden email]
Subject: Re: [Geotools-gt2-users] Converting a GridEnvelope to an Envelope
Hello David,
Between JTS, GeoTools and GeoAPI there's an embarrassment of riches
when it comes to envelopes isn't there ? Or, for some of us (me
included), a maze that's all too easy to get lost in...
I'm not familiar with JP2KReader so could you specify what sort of
Envelope you have (want) on either side of your assignment ?
Michael
------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference_______________________________________________
Geotools-gt2-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users