On Wednesday, August 13, 2003, at 09:33 AM, Benjamin.May@bookspan.com
wrote:
>
> Don,
>
>> You probably have to update the openmap.properties file so
>> the layers
>> you want to have in the image are defined.
>
> I am using the default openmap.properties provided with the
> distribution.
> Doesn't this include layers for cities, states, etc?
Not really. The openmap.properties file contains entries for data that
is included in the download package, and some other entries for data
that you might come across later. The application doesn't
automatically use layer that you have on your machine, though. You
have to modify the properties for those layers to point to the data on
your machine, and then modify the openmap.layers property to use those
properties that would then be valid.
>> The ImageServer class can be run directly. You might want to
>> look at
>> the main() function, it does pretty much what you are trying
>> to do in
>> your code, but it's using the projection parameters defined in the
>> openmap.properties file instead of defining them in the code.
>
> I have tried using the following command from within $OPENMAP_HOME:
>
> java com.bbn.openmap.image.ImageServer -file test2 -properties
> openmap.properties
>
> And I get the following output:
>
> OpenMap.getLayers(): [date, drawing, quake, daynight, cities, test,
> graticule, demo, shapePolitical, politicalCombo]
> SunJPEGFormatter setting image quality to: 0.8
> ImageServer: creating image with projection Mercator[ world(640,0)
> radius=6378137.0 ppm=3272 center(19.999998,-19.999998)
> scale=2.0488352E8
> maxscale=2.0488352E8 minscale=62.0 width=640 height=480]
> ImageServer: using the new ProjectionPainter interface! createImage
> with
> layer mask.
> ImageServer.createGraphics: graphics is cool
> ImageServer: ready to create formatted image.
> ImageServer: using full scale image (unscaled).
> Writing image file to: test2.jpg
Here is the output from my run:
[jade:~/dev/openmap] dietrick% java com.bbn.openmap.image.ImageServer
-file test2 -properties ./openmap.properties
OpenMap.getLayers(): [date, dtlayer, distlayer, quake, daynight,
cities, test, graticule, demo, shapePolitical, politicalCombo]
SunJPEGFormatter setting image quality to: 0.8
ImageServer: creating image with projection Mercator[ world(640,0)
radius=6378137.0 ppm=3272 center(19.999998,-19.999998)
scale=2.0488352E8 maxscale=2.0488352E8 minscale=62.0 width=640
height=480]
ImageServer: using the new ProjectionPainter interface! createImage
with layer mask.
ImageServer.createGraphics: graphics is cool
ImageServer: image request adding layer graphics from : Political
Boundaries 2
ImageServer: image request adding layer graphics from : Political
Boundaries
ImageServer: image request adding layer graphics from : Demo
ImageServer: image request adding layer graphics from : Graticule
ImageServer: image request adding layer graphics from : Test
ImageServer: image request adding layer graphics from : World Cities
CSVLocationHandler: Figuring out the locations and names! (This is a
one-time operation!)
ImageServer: image request adding layer graphics from : Day/Night
Shading
ImageServer: image request adding layer graphics from : Recent
Earthquakes
ImageServer: image request adding layer graphics from : Distance Layer
ImageServer: image request adding layer graphics from : Drawing Layer
ImageServer: image request adding layer graphics from : Date & Time
ImageServer: ready to create formatted image.
ImageServer: using full scale image (unscaled).
Writing image file to: test2.gif
Seems like there is more output when the layers are drawn for me, and
I'm getting an image with content. I'm not sure what the difference is.
- Don
>
> It seems that it is aware of several layers, and the default properties
> defined in the out of the box openmap.properties file are:
>
> openmap.Latitude=20f
> openmap.Longitude=-20f
> # Scale: zoom level (1:scale)
> openmap.Scale=300000000f
>
> # Projection type to start the map with. Try "cadrg", "orthographic",
> # which are projection IDs. Check a particular projection class for
> # it's ID string.
> openmap.Projection=mercator
>
> # Width and Height of map, in pixels
> openmap.Width=640
> openmap.Height=480
>
> # Change this for a different title in the main window.
> openmap.Title=OpenMap(tm)
>
> # pixel X/Y window position (if values < 0, then center window on
> screen)
> openmap.x=-1
> openmap.y=-1
>
> Which seems like it would generate something, but I am still ending up
> with
> an image which is a solid block of a single color with no details or
> information in it whatsoever. Is there some trick to getting the
> properties
> to be read? Does the out of the box openmap.properties need to be
> modified?
> Thanks!
>
>
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
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 Wed Aug 13 16:40:50 2003
This archive was generated by hypermail 2.1.8 : Thu May 12 2005 - 07:18:36 EDT