CAD application theory
Posted: Mon Mar 29, 2010 9:07 pm
I'm "thinking about starting to think about" programming a small CAD/GIS viewer application. This would be used in lieu of Microstation/ArcGIS for the less technical users in my department. I know there are other viewers out there, but this would add video linking (when they click on a line, it would RunProgram to a video file).
At first I thought it would be easy by using the drawing library- read a list of line coordinates and draw them on an image. The only problem is that these lines are real world objects and span into the miles. OK, I can draw the objects at smaller scale. Problem solved.
Now I am thinking about the zooming & panning functions. The user would need to be able to zoom in on the drawing. There will be thousands of lines, so obviously 1 zoom level would not be efficient. I cannot wrap my head around zooming. I realize I can increase the scale of the image, but at some point the image will occupy more memory than the computer has available.
The method I have "thought up" so far is to search to search the list of coordinates to check if the line will fit on screen. Here's the steps it would encompass:
1. Set zoom window (square/rectangle coordinates): min x 500, max x 1000, min y 500, max y 500. This zoom window would also dictate the zoom level.
2. Scan my list of coordinates and identify all lines that will fit
3. Draw lines on screen at scale
Am I thinking about this correctly? Can anybody share some insight?
At first I thought it would be easy by using the drawing library- read a list of line coordinates and draw them on an image. The only problem is that these lines are real world objects and span into the miles. OK, I can draw the objects at smaller scale. Problem solved.
Now I am thinking about the zooming & panning functions. The user would need to be able to zoom in on the drawing. There will be thousands of lines, so obviously 1 zoom level would not be efficient. I cannot wrap my head around zooming. I realize I can increase the scale of the image, but at some point the image will occupy more memory than the computer has available.
The method I have "thought up" so far is to search to search the list of coordinates to check if the line will fit on screen. Here's the steps it would encompass:
1. Set zoom window (square/rectangle coordinates): min x 500, max x 1000, min y 500, max y 500. This zoom window would also dictate the zoom level.
2. Scan my list of coordinates and identify all lines that will fit
3. Draw lines on screen at scale
Am I thinking about this correctly? Can anybody share some insight?