Hello everybody.
New in Knime.
I have a workflow. In that i have readed a file with columnes that have latutid and longitud values of a gps bus trayectory.
https://drive.google.com/file/d/0B56r_V66BiodcGp6MzNwclNJUG8/view?usp=sharing
i have too, the latitud and longitud values for several bus stop.
https://drive.google.com/file/d/0B56r_V66BiodSzVfWWY2S2lEU0U/view?usp=sharing
Using, java snippet, i have maked a filter that filter he records that have a distance calculated betwin one bus stop and one bus gps point trayectory less than a value (20 m).
https://drive.google.com/file/d/0B56r_V66BiodZFNoc1hnQ1BmOTg/view?usp=sharing
https://drive.google.com/file/d/0B56r_V66BiodenpMeVpHQmNRb2c/view?usp=sharing
THIS IS THE ECUATION I HAVE USED TO FILTER
pyLat = 18.39722;
pxLon = -65.97793;
R=6372.795477598;
rad=Math.PI/180;
dp=20;
return
(2*R*(Math.asin(Math.sqrt(Math.pow((Math.sin(rad*($yLat$-(pyLat))/2)),2) + Math.cos(rad*$yLat$)*Math.cos(rad*(pyLat))*Math.pow((Math.sin(rad*($xLon$-(pxLon))/2)),2))))*1000)<dp;
where $yLat$ and $xLon$ are the coordinates of the gps bus and is on the files
where pyLat and pxLon are the coordinates of the bus stop and is on another file
This is the result...
https://drive.google.com/file/d/0B56r_V66BiodREFaLUNTbG1NS2c/view?usp=sharing
My problem is that this result is for one bus stop (just one pair of coordinates lat,lon)...and i wanna do it for all bus stop, at once. All of it...
https://drive.google.com/file/d/0B56r_V66BiodSzVfWWY2S2lEU0U/view?usp=sharing
I have try using loop, but i dont now how to make that the varibles yLat and xLong in my ecuation take the diferent values already showed.
https://drive.google.com/file/d/0B56r_V66BiodWV9SM0VRdHlEYk0/view?usp=sharing
https://drive.google.com/file/d/0B56r_V66BiodOFpfTko4SDhETzA/view?usp=sharing
Please Help me.
jodomofo