Is there an C/C++ package that can map a list of XY points into anarray (raster form)

Discussion in 'C++' started by Avi, Sep 11, 2009.

  1. Avi

    Avi Guest

    Hello,

    I need to map a list of xy point into a grid.
    Is there an C/C++ package that provides tis functionality?
    I found some C++ based related packages, e.g. Boost GIL and openCV but
    they don't seem to provide this capability.

    Regards,
    Avi
     
    Avi, Sep 11, 2009
    #1
    1. Advertising

  2. Re: Is there an C/C++ package that can map a list of XY points intoan array (raster form)

    On Sep 10, 7:35 pm, Avi <> wrote:
    > Hello,
    >
    > I need to map a list of xy point into a grid.
    > Is there an C/C++ package that provides tis functionality?
    > I found some C++ based related packages, e.g. Boost GIL and openCV but
    > they don't seem to provide this capability.
    >
    > Regards,
    > Avi


    It seems you are trying to find the nearest grid point (say integer)
    for every xy point (say float)?

    -Ramon
     
    Ramon F Herrera, Sep 11, 2009
    #2
    1. Advertising

  3. Re: Is there an C/C++ package that can map a list of XY points intoan array (raster form)

    Ramon F Herrera wrote:
    > On Sep 10, 7:35 pm, Avi <> wrote:
    >> Hello,
    >>
    >> I need to map a list of xy point into a grid.
    >> Is there an C/C++ package that provides tis functionality?
    >> I found some C++ based related packages, e.g. Boost GIL and openCV but
    >> they don't seem to provide this capability.
    >>
    >> Regards,
    >> Avi

    >
    > It seems you are trying to find the nearest grid point (say integer)
    > for every xy point (say float)?


    Is that like rounding? If you have the grid parameters (origin, step),
    you would basically take each of the xy coordinates and find the nearest
    grid point by subtracting the origin and dividing by the step, right?
    Why would one need a package for that? Couldn't it be done in, like, a
    few lines of code or something?

    V
    --
    Please remove capital 'A's when replying by e-mail
    I do not respond to top-posted replies, please don't ask
     
    Victor Bazarov, Sep 11, 2009
    #3
  4. Re: Is there an C/C++ package that can map a list of XY points intoan array (raster form)

    On Sep 11, 8:37 am, Victor Bazarov <> wrote:
    > Ramon F Herrera wrote:
    > > On Sep 10, 7:35 pm, Avi <> wrote:
    > >> Hello,

    >
    > >> I need to map a list of xy point into a grid.
    > >> Is there an C/C++ package that provides tis functionality?
    > >> I found some C++ based related packages, e.g. Boost GIL and openCV but
    > >> they don't seem to provide this capability.

    >
    > >> Regards,
    > >> Avi

    >
    > > It seems you are trying to find the nearest grid point (say integer)
    > > for every xy point (say float)?

    >
    > Is that like rounding?  If you have the grid parameters (origin, step),
    > you would basically take each of the xy coordinates and find the nearest
    > grid point by subtracting the origin and dividing by the step, right?


    > Why would one need a package for that?
    > Couldn't it be done in, like, a
    > few lines of code or something?


    My thoughts exactly.

    Now, if Avi needs some fancier, like the nearest neighbor problem so
    used by GPS, he may try this one:

    http://www.cs.umd.edu/~mount/ANN/

    (I provided a little code for that package).

    -Ramon
     
    Ramon F Herrera, Sep 11, 2009
    #4
  5. Avi

    Avi Guest

    Re: Is there an C/C++ package that can map a list of XY points intoan array (raster form)

    >
    > It seems you are trying to find the nearest grid point (say integer)
    > for everyxypoint (say float)?
    >
    > -Ramon


    Yes, this is what I'm trying to do.
    It shouldn't be complicated to implement. However, I don't want to
    reinvent the wheel, and this seems like a common problem.

    > Now, if Avi needs some fancier, like the nearest neighbor problem so
    > used by GPS, he may try this one:
    >
    > http://www.cs.umd.edu/~mount/ANN/


    Thanks for this information. I may use the package you suggested.

    Avi
     
    Avi, Sep 11, 2009
    #5
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Sally
    Replies:
    4
    Views:
    370
    Sally
    Apr 14, 2004
  2. mike.arsenault
    Replies:
    4
    Views:
    3,936
    mike.arsenault
    Nov 25, 2009
  3. Harry Kakueki
    Replies:
    2
    Views:
    99
    Gavin Sinclair
    Jul 29, 2010
  4. David Dyer-Bennet
    Replies:
    1
    Views:
    147
    Martin Herrmann
    Nov 15, 2004
Loading...

Share This Page