Hi, 2011/1/4 Glynn Clements <[email protected]>: >> p = line_pnts() >> Vect_append_point(byref(p), 1, 1, 0) > > You're passing an uninitialised line_pnts structure (i.e. with its > fields containing garbage), and probably trashing the heap. Use > Vect_new_line_struct() to allocate an empty line_pnts object.
something like? map_obj = Map_info() map = pointer(map_obj) Vect_open_update(map, "a", "") p = Vect_new_line_struct() c = Vect_new_cats_struct() Vect_append_point(p, 1, 1, 0) Vect_cat_set(c, 1, 1) print p.contents.n_points Vect_write_line(map, GV_POINT, p, c) Vect_build(map) Vect_close(map) No success, btw p = line_pns() Vect_append_point(byref(p), 1, 1, 0) print p.n_points interestingly works. Martin -- Martin Landa <landa.martin gmail.com> * http://geo.fsv.cvut.cz/~landa _______________________________________________ grass-dev mailing list [email protected] http://lists.osgeo.org/mailman/listinfo/grass-dev
