tags:

views:

65

answers:

2

hello friends,

i am jaison i like to build an application for land survey process. for that i need to plot points in a canvas for a given gsi file. for example

the points be

       a.             .b


          c.         .d          .e

these are the 5 points and i need to develop a tool to connect these points by line. while closing a boundry by like connecting points acdba. give it a parcel_id and other details like land owner, tax payment etc. save these details for feature query.

in real time the points will be more than 100000. and i need the canvas should have pan and zoom property.

friends i like to do this project in python using pygame. is it possible to do. i am a newbie to python.

please need help.

A: 

Pygame is absolutely a good tool for this.

Look into using a pygame.surface object, and the pygame.draw module.

http://www.pygame.org/docs/ref/

If you need anything more complicated than dots, pygame.sprite is a relatively well developed module as well.

JGord
A: 

http://www.pygame.org/docs/ref/draw.html#pygame.draw.polygon

This is the function for drawing polygons in pygame. You can draw straight to screen or to a separate surface. I am not sure how fast it is with lots of points, you might want to split up what your drawing into smaller segments and just display what you need.

If you do need to show the whole polygon I would look into some way of compressing the amount of points to only get the general shape

iPope
pals thanks for the reply.i have one more query thats how to add pan to the window in pygame....
Jaison Justus
If I read what you are saying correctly this might be possible by storing a 2D array of polygon points so that by looping through the array you get the whole image and then using some code to get the x and y values you wish to draw on the screen and finding those points in the array and drawing those olygons. That might make no sense at all.
iPope