Re: [OpenMap Users] Parallel lines

From: Don Dietrick <dfdietrick_at_gmail.com>
Date: Thu, 19 Jul 2012 17:37:09 -0400

Hi Tony,

I'm assuming that when you are talking about parallel lines along a poly, you're looking for a ground distance buffer around a path?

If that's what you are looking for, it's a tricky thing - the x/y coordinates from the projection are pixels, so they are completely different. You can't calculate this kind of stuff in pixel space, it has to be a geocentric calculation. There's code in the com.bbn.openmap.geo package that does this, specifically the RibbonIterator class. You'll have to create Geo objects from your lat/lon coordinates.

You can play around with the com.bbn.openmap.omGraphics.util.RibbonMaker class in OM5 - it'll actually create an outside distance buffer around a poly, moving clockwise. I think it'll do the inside, too, either by reversing the coordinates, or by asking for something different. I know you said you were using 4.6.5, you might be able to pull that class from OM5 and get it to work for you. I can give you more info on creating this stuff, I just want to make sure this is what you are looking for before I start typing for an extended period of time.

If you're not interested in ground distance buffer off a path, I need more info on what you are trying to do, i.e. the semantics of what you are trying to represent.

Cheers,

Don

On Jul 19, 2012, at 3:46 AM, Tony Vasile wrote:

> Okay I have worked out how to draw the parallel lines but they aren't where I am expecting them to be. I get the latitude and longitude of the ends of my existing line but when I get their x,y values using proj.forward() , the line drawn with these x,y is nowhere near the original line. Am I doing something wrong?
>
> Tony Vasile
> Senior Software Engineer, Defence
> CSC Australia
>
>
> Please consider the environment before printing this e-mail.
>
> CSC - This is a private message. If you are not the intended recipient, please delete without copying and kindly advise us by e-mail of the mistake in delivery. Note: Regardless of content, this e-mail shall not operate to bind CSC to any order or other contract unless pursuant to explicit written agreement or government initiative expressly permitting the use of e-mail for such purpose • CSC Australia Pty Limited; Registered Office: 26 Talavera Road, Macquarie Park NSW 2113 Australia; Incorporated in Australia ACN: 008 476 944

--
[To unsubscribe to this list send an email to "majdart_at_bbn.com"
with the following text in the BODY of the message "unsubscribe openmap-users"]
Received on Thu Jul 19 2012 - 17:38:42 EDT

This archive was generated by hypermail 2.3.0 : Tue Mar 28 2017 - 23:25:10 EDT