
- Geo-coordinate-to-pixel
- 12-27-2004
![]() Re: Geo coordinate to pixel
| Bruce Broussard | 12-29-2004 |
If you were Registered and logged in, you could reply and use other advanced thread options
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
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
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
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



> 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
>