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

A

Avi

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
 
R

Ramon F Herrera

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
 
V

Victor Bazarov

Ramon said:
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
 
R

Ramon F Herrera

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
 
A

Avi

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
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,482
Members
44,901
Latest member
Noble71S45

Latest Threads

Top