Re: Laying points based on Latitude and Longitude values

From: Don Dietrick <dietrick@bbn.com>
Date: Thu Apr 25 2002 - 16:39:10 EDT

Hi Ravi,

On Thursday, April 25, 2002, at 01:30 PM, Kandula, Ravindra wrote:

> Hi Don,
> I want to explain things I have to accomplish before going deep
> into the subject.
> Our application runs entirely on server side with Tomcat and Apache
> webserver and the entire application is developed in java. It access
> data from the oracle database. This application is available to the
> registered associates of the company thru internet, so it may be
> treated as intranet application with larger view. Each associate logs
> into the application, and it serves the data specific to him in the
> form of reports and graphs, this is developed entirely using java
> sevlets,beans,jsps.
> Now we want to show the data on NORTH AMERICA MAP by laying
> points on it based on the data accumulated from oracle database grouped
> by zip code. This entire thing should be done on the server side, and
> once the map is ready with points on it, it will be shown on the web
> page. User is not going to interact with map after it is shown on the
> web page, so we don't want any "listeners" which track the user
> interaction with map. So our work is entirely on the server side.
>
> After detailed analysis we had sorted out the following things to
> be done in order to accomplish the above task from the maps point of
> view.
>
> 1. Obtain the USNorthAmerica Map in which ever format we want.

The US North America map would be shown in a layer that handles the data
format you decide on.

These next two tasks would probably be handled by a layer that you
design to manage your locations.

> 2. Assign xy coordinates for each record obtained from database based
> on zip code. (this we thought of doing by converting to Lat/Long
> vales and then get xy coordinates).

If you convert it to lat/lon values, you can create OMGraphics from them
and let the projection object do the conversion for you to x/y
coordinates.

> 3. Develop an algorithm of plotting points on the map by grouping the
> records into four or five categories based on the no of record for a
> particular associate which is dynamic.

Organization of the points is up to you.

> 4. Other than plotting points we have to show the legend on the map
> with the range of no's for each legend color i.e.
> (0-500,500-1000,1000-1500) etc.

You can create X/Y OMGraphics to draw a legend on the map in a certain
place, regardless of projection. See the RENDERTYPE_XY definitions for
different OMGraphics.

> So in this scenario, after doing some searches on the web, we
> found that we can use ur tool for accomplishing the above tasks.
>
> When I went thru the demos , always it is generating
> applets only, is there any way we can convert applets into .gif files
> so that we can avoid loading applets into the web page. Is there any
> limitation that it can read only .shp and .ssx files. I didn't find
> anywhere of generating maps with gif files.

You'll want to look at the com.bbn.openmap.image package, where there
are different objects to help you create images from OpenMap layers.
You'll want to look at the ImageServer, and the MapRequestHandler, which
is an enhanced ImageServer. The SimpleHttpImageServer is a low-load web
server that creates map images using the MapRequestHandler. If you
needed something more robust, you could embed a MapRequestHandler in a
servlet.

The next version of OpenMap has a color optimizer built in that will
reduce the colors of an OpenMap image, enabling GIF creation. For
OpenMap 4.4.2, it's better to create JPG images, unless you know that
your images have less then 256 colors.

> As far as you see how far does ur tool can help us in
> accomplishing these tasks. If so is there any way of having technical
> support from the company for at least few months regarding the usage of
> packages available in the tool.

Email support is free, but response times vary according to our
workload. If you need more timely responses, we'd be happy to put
together a proposal for contracted support.

Just so you know, openmap@bbn.com is the email address of the BBN
developers. openmap-users@bbn.com is the mailing list, disseminated to
the registered OpenMap community. We generally respond to the larger
distribution when more than one of them is listed.

Regards,

Don

>
> -----Original Message-----
> From: Don Dietrick [mailto:dietrick@bbn.com]
> Sent: Wednesday, April 24, 2002 1:32 PM
> To: Kandula, Ravindra
> Cc: 'openmap@bbn.com'
> Subject: Re: Laying points based on Latitude and Logitude values
>
>
> Hi Ravi,
>
> Are you trying to lay out data from a database or file, or do you want
> the user to select points on the map and add them manually?
>
> It's very easy to add data from a database or file - see the
> com.bbn.openmap.layer.location.LocationLayer for information about doing
> that. You can use the DBLocationHandler for database access, or the
> CSVLocationHandler for reading data out of a csv file. In addition, you
> can write your own LocaitonHandler for any specific data files you may
> have.
>
> For manually drawing points, there is a way to set up OpenMap applets so
> that the user can define points (or several other shapes) on the map.
> If you use the OMDrawingTool (launched by a button on the tool panel),
> one of the options on the panel is to set the requestor - which is
> another way of saying which component should get the shape when the user
> is finished drawing it.
>
> Programmatically, any object added to the MapHandler that implements the
> DrawingToolRequestor interface will be added to this list. The
> com.bbn.openmap.layer.link.LinkLayer is a DrawingToolRequestor, and will
> send any OMGraphic drawn on the map to its server. However, you'll have
> to create/modify a LinkServer to do something with this graphic. You
> could write your own code that send the new OMGraphic to a server in
> another fashion - via RMI, CORBA, JDBC.
>
> Hope this helps,
>
> Don
>
>
> On Monday, April 22, 2002, at 12:32 PM, Kandula, Ravindra wrote:
>
>> Hi,
>> we have to lay points on the Map of NorthAmerica based on customer
>> availability data, and it should be dynamic and it should be server
>> based,
>> does the open map can serve this functionality if so please give me an
>> idea
>> how can i accomplish this with the openmap toolkit, if u need any
>> additional
>> info i can provide it.
>> Thanks,
>> Ravi.k.
>>
>>

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Don Dietrick, BBN Technologies, dietrick@bbn.com
10 Moulton Street, Cambridge, MA 02138
617-873-3031 [fax]-2794
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
>

--
[To unsubscribe to this list send an email to "majdart@bbn.com"
with the following text in the BODY of the message "unsubscribe openmap-users"]
Received on Thu Apr 25 16:40:07 2002

This archive was generated by hypermail 2.1.8 : Thu May 12 2005 - 07:18:33 EDT