Re: mapping x,y coordinates of twons in original BIG image to 800x600 subimages (sliced files)
From: Z Zag (zzag_at_notmail.com)
Date: 06/30/04
- Next message: Robert Israel: "Re: Systems of inequalities: methods."
- Previous message: Jon: "All Roots to any Power Series"
- In reply to: markus: "mapping x,y coordinates of twons in original BIG image to 800x600 subimages (sliced files)"
- Next in thread: Z Zag: "Re: mapping x,y coordinates of twons in original BIG image to 800x600 subimages (sliced files)"
- Reply: Z Zag: "Re: mapping x,y coordinates of twons in original BIG image to 800x600 subimages (sliced files)"
- Messages sorted by: [ date ] [ thread ]
Date: Wed, 30 Jun 2004 03:03:48 GMT
> -- I have a big map image - map1 width=9000 pixels, heigth=7000
> pixels.
> -- I slice the map image into 800x600 submaps - image files (squares
> in a grid).
> -- I know x,y and names of all towns in the original map.
> -- I need a function to determine if given a specific submap a
> particular town (original x,y) is within the specific submap
> (sliced image).
>
Well, an x of 800 represents the far boundary of square1 since an x of 0
represents the near boundary. In this case 800 / 800 = 1 is the core
operation that identifies the square. So divide any x coordinate by 800. Add
1 to the integer result if the fractional part of the float result is
greater than 0 otherwise add 0 to the integer result.
- Next message: Robert Israel: "Re: Systems of inequalities: methods."
- Previous message: Jon: "All Roots to any Power Series"
- In reply to: markus: "mapping x,y coordinates of twons in original BIG image to 800x600 subimages (sliced files)"
- Next in thread: Z Zag: "Re: mapping x,y coordinates of twons in original BIG image to 800x600 subimages (sliced files)"
- Reply: Z Zag: "Re: mapping x,y coordinates of twons in original BIG image to 800x600 subimages (sliced files)"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|