Re: [OpenMap Users] CSV files and Circles

From: Don Dietrick <dfdietrick_at_gmail.com>
Date: Sun, 7 Sep 2014 18:41:48 -0400

Hi Gary,

The OMGraphic you want to use is the OMCircle, created at a lat/lon location with a radius value and a com.bbn.openmap.util.Length object to specify the radius units.

As for extending the CSVLocationHandler, you could do that. You'd want to add your property for the radiusIndex and update the createData() method to use it. You'd also have to get the getTokenDecoder return an object that knows how to create OMCircles using the radiusIndex in the createAndAddObjectFromTokens(). That should do it.

Hope this helps,

Don

On Sep 7, 2014, at 12:51 PM, Gary Briggs wrote:

> Morning,
>
> I haven't discovered an existing way to do this in openmap; If I need to
> implement this myself, I would appreciate a little guidance if possible.
>
> Basically, I just want something similar to CSV Location Layer, but with
> an extra column, "Radius". When radius is specified, a circle is drawn
> instead of a point, of the world-space radius described in that column. I
> can't see it currently possible anywhere [since pointRadius/pointOval
> appear to be in screen-space, and even if they were in world-space,
> they're fixed for the entire file rather than per-row]
>
> Am I missing something obvious?
>
> If not, I had several thoughts on how best to implement it, but I wasn't
> sure what the best way to do it is [where "best" might include "will be
> accepted as a patch"]:
> * Modify CSVLocationHandler to include an optional "radiusIndex" parameter
> * Seems easiest, but looking at the code I'm having a hard time figuring
> out how I'd do it. It's not clear to me that starting with something
> that always works with URLRasterLocation is the way to go
> * Extend CSVLocationHandler, create CSVCircleHandler
> * Intuitively I might add majorRadius and minorRadius, to make ellipses
> a "freebie" here.
> * Create a new handler of sorts
>
> I just don't know. I'm still sometimes having a hard time really
> identifying the flow of data in the code, which is possibly leading me
> to some confusion too.
>
> Cheers,
> Gary
>
> --
> [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"]

--
[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 Sun Sep 07 2014 - 18:44:06 EDT

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