Bookmark this page: Add Geo coordinate to pixel to Yahoo MyWeb Add Geo coordinate to pixel to Google Bookmarks Add Geo coordinate to pixel to Windows Live Add Geo coordinate to pixel to Del.icio.us Digg Geo coordinate to pixel! Add Geo coordinate to pixel to Netscape
  •  
  • Subject
  • Author
  • Date
If you were  Registered and logged in, you could reply and use other advanced thread options
Posted by Mario on December 27, 2004, 7:24 pm
Hello,
I' m newbie to gis application, and I'm trying to develop an
application that display an street map.
The coordinates (UTM) are stored in an xml file, I converted to pixel with:

XPixelForCoord = Width of screen / Range of x coordinates
YPixelForCoord = Heigth of screen / Range of Y coordinates

Can somone telle me any hints, I'don't know if this solutione is right.

Thanks

Mario




Posted by Bruce Broussard on December 29, 2004, 4:00 am
Mario,

You must perform a simple transformation to place the coordinates into your
screen area.

Your transformation might look something like this:
pixelx = GroundX * DisplayMultiplier) - ClientOffsetX
pixely = DisplaySizeFactor - ((GroundY * DisplayMultiplier) -
ClientOffsetY)

where
DisplaySizeFactor = the greater of either the output pixel width or
height
DisplayMultiplier = DisplaySizeFactor / delta;
where delta is either xmax-xmin or ymax-ymin depending on which is greater.
and
ClientOffsetX = Limits.Xmin * DisplayMultiplier;
ClientOffsetY = Limits.Ymin * DisplayMultiplier;actor / usedelta;

The basic point here is that you are trying to scale and position the ground
coordinates 'window' into the screen pixels.

I hope this has been useful. We have software that will do this for you,
have a look at www.gatewayhorizons.com

I hope this has been useful.

Bruce

> Hello,
> I' m newbie to gis application, and I'm trying to develop an application
> that display an street map.
> The coordinates (UTM) are stored in an xml file, I converted to pixel
> with:
> XPixelForCoord = Width of screen / Range of x coordinates
> YPixelForCoord = Heigth of screen / Range of Y coordinates
> Can somone telle me any hints, I'don't know if this solutione is right.
> Thanks
> Mario
>