Hi Everybody
With the help of Klaus (Thank you Klaus), I have managed to write a simple CAD program (which is part of the CEASER Program), which the Surveyor uses in the Field with either a Total Station or a GPS. As the Surveyor picks up Topo points in the Field, those Points get plotted on the screen.
The Surveyor can then add CAD Entities to the screen where the Topo Points are plotted. Available functions are:
1. Points
2. Lines
3. Polylines
4. Circles
5. Arcs
6. Text
Layers, Colors and Linetypes are also included.
This way the Surveyor can semi complete the Survey Drawing in the Field. The Topo Points and the CAD drawing are stored in 2 different Tables in SQLite. The CAD drawing can be exported as a DXF file.
I also have snap options available while drawing:
1. Snap to Topo Point
2. Snap to CAD Point
3. Snap to end of a Line
4. Snap to the center of a Line
5. Snap to the Center of a Circle
This is where my problem is. If I turn on the Snap function and I have selected the "Snap to Topo Point" option and I draw a Line, the program runs through al the Topo Points and calculates the shortest distance between my finger position and the Topo Points. The start of the Line will be to the Topo Point with the Shortest distance. As I move my finger over the screen to draw the line, it will plot a round circle around the Topo Point closest to my Finger.The same applies when I lift my finger off the screen to complete the line.
For this I am using the Phytharos formula. This is fine if I have say 100 Topo Points plotted on the screen, but if there are say 5000 Topo Points plotted on the screen, it takes forever to find the closest Topo Point to my Finger.
Any ideas or maybe a kick in the right direction. Sometimes one cannot the Forest for the Wood.
With the help of Klaus (Thank you Klaus), I have managed to write a simple CAD program (which is part of the CEASER Program), which the Surveyor uses in the Field with either a Total Station or a GPS. As the Surveyor picks up Topo points in the Field, those Points get plotted on the screen.
The Surveyor can then add CAD Entities to the screen where the Topo Points are plotted. Available functions are:
1. Points
2. Lines
3. Polylines
4. Circles
5. Arcs
6. Text
Layers, Colors and Linetypes are also included.
This way the Surveyor can semi complete the Survey Drawing in the Field. The Topo Points and the CAD drawing are stored in 2 different Tables in SQLite. The CAD drawing can be exported as a DXF file.
I also have snap options available while drawing:
1. Snap to Topo Point
2. Snap to CAD Point
3. Snap to end of a Line
4. Snap to the center of a Line
5. Snap to the Center of a Circle
This is where my problem is. If I turn on the Snap function and I have selected the "Snap to Topo Point" option and I draw a Line, the program runs through al the Topo Points and calculates the shortest distance between my finger position and the Topo Points. The start of the Line will be to the Topo Point with the Shortest distance. As I move my finger over the screen to draw the line, it will plot a round circle around the Topo Point closest to my Finger.The same applies when I lift my finger off the screen to complete the line.
For this I am using the Phytharos formula. This is fine if I have say 100 Topo Points plotted on the screen, but if there are say 5000 Topo Points plotted on the screen, it takes forever to find the closest Topo Point to my Finger.
Any ideas or maybe a kick in the right direction. Sometimes one cannot the Forest for the Wood.