Hi Scottie,
On Thursday, April 25, 2002, at 02:48 PM, Scott Bortman wrote:
> Hello,
>
> Okay, I'm confused about something that's
> probably simple...
>
> I read in the FAQ that OpenMaps scale
> parameter is in pixels per meter. I'm trying
> to display a raster image that has a scale
> expressed in pixels per meter. So I thought
> I'd just set the scale to the recprical but they
> just don't line up. Is there some other factor
> to take into consideration?
Actually, the scale parameter is a ratio, and is doesn't have units. It
just has its roots based on a pixels/meter constant.
> Here's some more info:
>
> image projection: Equal Distantant Cylindrical
> image scale 100 meters per pixel
>
> After playing around with different scales, I can
> get it to "kinda" match up with OpenMap set to
>
> projection: LLXY
> scale: 325,000 pixels per meter.
>
> I', not exactly a map guru but can somebody out
> there shed any light?
What you need is the coordinate of the upper left corner of the image,
and the coordinate of the lower right coordinate. With the projection
object, you figure out what the pixel height and width of the image
should be for a projection by forward projection both coordinates and
subtracting the different in both directions.
Then, you put the image in an OMRaster, and scale it to the desired
height and width. You need to keep a copy of the original image, and
reload it when the projection changes, because scaling the OMRaster
image overwrites whatever image it had originally.
The next version of OpenMap will have a OMScalingRaster object, that
will do all this for you.
Hope this helps,
Don
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
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:27:34 2002
This archive was generated by hypermail 2.1.8 : Thu May 12 2005 - 07:18:33 EDT