zc2's Blog

Male
Member For: 5 months, 3 weeks
Posts: 2

Member of: Mymotion Forum.
Top Post By zc2 (most thumbs up):

No posts received thumbs up, next time you see a good one, give some respect and thumb it up.

Recent Posts by zc2:

Re: makemymap need an improvement

June 13, 2008 by zc2

Thank you, I'll give the new version a try.
If you like the idea of calculating the corner coordinates from pixel positions, and going to implement it, I hope you could spare some time using my simple code I wrote to make my calculations:

int x1;
int y1;
double lon1;
double lat1;
int x2;
int y2;
double lon2;
double lat2;
int w;
int h;

int dx = x2 - x1;
int dy = y2 - y1;
if( dx == 0 || dy == 0 ) return;

double kx = ( lon2 - lon1 ) / dx;
double ky = ( lat2 - lat1 ) / dy;

double lon_right = ( w - x1 ) * kx + lon1;
double lon_left = lon2 - x2 * kx;

double lat_bottom = ( h - y1 ) * ky + lat1;
double lat_top = lat2 - y2 * ky;

makemymap need an improvement

June 12, 2008 by zc2

I tried to load a map not from GE but made by myself.
I calculated the coordinates of the corners (what a pain!) and entered them into the fields, but the button "Start" remained disabled...
I had wasted more then hour on the calculations. :(
It would be great if the utility accepts not the corners coordinates but the pixel positions and the coordinates of key objects on the image and then calculate the coordinates it need itself. Thank you in advance!