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


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.



Relevant Pages

  • Re: How inaccurate is a 555 or 7555 REALLY?
    ... on making a tiny quartz crystal divide down to 420hz in a tiny package ... Sine wave output preferred, but I think square ...
    (sci.electronics.design)
  • Re: Number with parameter...
    ... A general rational solution, in terms of a parameter u, is: ... I don't know how to transfer with u. so, I need your advice. ... To make y you take u, square it, subtract x, multiply by x, and divide by 2u. ...
    (sci.math)
  • Re: Standard Deviation
    ... If you divide that value by N or N-1 you get the variance, which is s squared if you divide by N, or sigma squared if you divide by N-1. ... From that value again, you get the standard deviation by extracting the square root, which is either s or sigma. ...
    (borland.public.delphi.non-technical)
  • Re: read/write at the same time
    ... Don't you only need to divide by primes from 3 to the prime below one- ... (primeth you've just tested) ... There is never any need to test with a number greater than the square ... root, there must be a corresponding factor smaller than the square root. ...
    (alt.comp.lang.borland-delphi)
  • Re: New high speed rail line proposed
    ... towns/cities is to multiply the population of two towns, and divide by ... the square of the distance between them. ...
    (uk.railway)