GRASS Programmer's Manual  6.5.svn(2014)-r66266
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
open_nat.c File Reference

Vector library - open vector map (native format) More...

#include <unistd.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <grass/Vect.h>
#include <grass/gis.h>
#include <grass/glocale.h>
Include dependency graph for open_nat.c:

Go to the source code of this file.


int V1_open_old_nat (struct Map_info *Map, int update)
 Open existing vector map. More...
int V1_open_new_nat (struct Map_info *Map, const char *name, int with_z)
 Open/Create new vector map. More...

Detailed Description

Vector library - open vector map (native format)

Higher level functions for reading/writing/manipulating vectors.

(C) 2001-2008 by the GRASS Development Team

This program is free software under the GNU General Public License (>=v2). Read the file COPYING that comes with GRASS for details.

Original author CERL, probably Dave Gerdes or Mike Higgins. Update to GRASS 5.7 Radim Blazek and David D. Gray.

Definition in file open_nat.c.

Function Documentation

int V1_open_new_nat ( struct Map_info *  Map,
const char *  name,
int  with_z 

Open/Create new vector map.

Mappointer to vector map
namemap name
with_z2D or 3D (unused?)
0 success
-1 error

Definition at line 86 of file open_nat.c.

References buf, dig__byte_order_out(), dig__write_head(), dig_file_init(), dig_init_portable(), fclose(), G__file_name(), G_debug(), G_fopen_modify(), G_fopen_new(), G_mapset(), NULL, sprintf(), stat, and Vect__write_head().

Referenced by Vect_open_new().

int V1_open_old_nat ( struct Map_info *  Map,
int  update 

Open existing vector map.

Map->name and Map->mapset must be set before.

Mappoiter to vector map
updatenon-zero for write mode, otherwise read-only
0 success
-1 error

Definition at line 43 of file open_nat.c.

References buf, dig__read_head(), dig_file_init(), dig_file_load(), dig_init_portable(), G_debug(), G_fopen_modify(), G_fopen_old(), NULL, and sprintf().