Hi triplederby,

that sounds to me like a special case of the 'Minimum Area Rectangle' 
algorithm. This algorithm is not contained in 
JTS, but if I remember correctly you can find it in the Numerical Recipes.

For your problem the algorithm reduces to only one step of the algorithm's 
iteration:
- rotate your Geometry around the negative of the given angle, so that it is 
axis parallel
- calculate the minimum bounding rectangle (min/max x/y) (MBR)
- rotate the MBR back.

Matthias


>----Ursprüngliche Nachricht----
>Von: [EMAIL PROTECTED]
>Datum: 28.06.2008 04:10
>An: <[email protected]>
>Betreff: [jts-devel] Re: jts-devel Digest, Vol 53, Issue 12
>
>Is there a way in JTS to obtain the bounding box that is rotated at specified 
>angle? I see that getEnvelope() and 
getEnvelopeInternal() return the coordinate extents (minX, minY, maxX, maxY). 
This gives axis aligned bounding box - 
while I need it rotated to align with the rotated geometry whihc is a polygon. 
Any ideas?
>
>Thanks!
>
>
>----- Original Message ----
>From: "[EMAIL PROTECTED]" <[EMAIL PROTECTED]>
>To: [email protected]
>Sent: Friday, June 27, 2008 12:00:18 PM
>Subject: jts-devel Digest, Vol 53, Issue 12
>
>Send jts-devel mailing list submissions to
>    [email protected]
>
>To subscribe or unsubscribe via the World Wide Web, visit
>    http://lists.refractions.net/mailman/listinfo/jts-devel
>or, via email, send a message with subject or body 'help' to
>    [EMAIL PROTECTED]
>
>You can reach the person managing the list at
>    [EMAIL PROTECTED]
>
>When replying, please edit your Subject line so it is more specific
>than "Re: Contents of jts-devel digest..."
>
>
>Today's Topics:
>
>   1. Name for line intersects (Paul Austin)
>   2. Re: Name for line intersects (Martin Davis)
>
>
>----------------------------------------------------------------------
>
>Message: 1
>Date: Fri, 27 Jun 2008 11:32:49 -0700
>From: "Paul Austin" <[EMAIL PROTECTED]>
>Subject: [jts-devel] Name for line intersects
>To: [email protected]
>Message-ID:
>    <[EMAIL PROTECTED]>
>Content-Type: text/plain; charset="iso-8859-1"
>
>I'm trying to think of a name to describe and intersection between two
>lines, where the intersection between the two is a line (so it ignores any
>point intesections). This would be detected using the following.
>
>IntersectionMatrix relate = line1.relate(line2);
>if (relate.get(0, 0) == Dimension.L) {
>  return true
>} else {
>  return false;
>}
>
>Can anyone think of a catchy name to describe an operator implementing this?
>Something like intersectsLine.
>
>Cheers,
>Paul
>-------------- next part --------------
>An HTML attachment was scrubbed...
>URL: 
>http://lists.refractions.net/pipermail/jts-devel/attachments/20080627/a138b5d8/attachment-0001.html
>
>------------------------------
>
>Message: 2
>Date: Fri, 27 Jun 2008 11:42:39 -0700
>From: Martin Davis <[EMAIL PROTECTED]>
>Subject: Re: [jts-devel] Name for line intersects
>To: JTS Topology Suite Development <[email protected]>
>Message-ID: <[EMAIL PROTECTED]>
>Content-Type: text/plain; charset=ISO-8859-1; format=flowed
>
>intersectsInALine?  intersectsLinearly? intersectsDimension1?
>
>Paul Austin wrote:
>> I'm trying to think of a name to describe and intersection between two 
>> lines, where the intersection between the two is a line (so it ignores 
>> any point intesections). This would be detected using the following.
>>
>> IntersectionMatrix relate = line1.relate(line2);
>> if (relate.get(0, 0) == Dimension.L) {
>>   return true
>> } else {
>>   return false;
>> }
>>
>> Can anyone think of a catchy name to describe an operator implementing 
>> this? Something like intersectsLine.
>>
>> Cheers,
>> Paul
>> ------------------------------------------------------------------------
>>
>> _______________________________________________
>> jts-devel mailing list
>> [email protected]
>> http://lists.refractions.net/mailman/listinfo/jts-devel
>>  
>
>-- 
>Martin Davis
>Senior Technical Architect
>Refractions Research, Inc.
>(250) 383-3022
>
>
>
>------------------------------
>
>_______________________________________________
>jts-devel mailing list
>[email protected]
>http://lists.refractions.net/mailman/listinfo/jts-devel
>
>
>End of jts-devel Digest, Vol 53, Issue 12
>*****************************************
>_______________________________________________
>jts-devel mailing list
>[email protected]
>http://lists.refractions.net/mailman/listinfo/jts-devel
>


_______________________________________________
jts-devel mailing list
[email protected]
http://lists.refractions.net/mailman/listinfo/jts-devel

Reply via email to