GRASS GIS 7 Programmer's Manual  7.9.dev(2021)-e5379bbd7
open_nat.c File Reference

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

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

Go to the source code of this file.

Functions

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

Detailed Description

Vector library - open vector map (native format) - level 1.

Higher level functions for reading/writing/manipulating vectors.

(C) 2001-2009 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.

Author
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

◆ V1_open_new_nat()

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

◆ V1_open_old_nat()

int V1_open_old_nat ( struct Map_info Map,
int  update 
)

Open existing vector map (level 1)

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

Parameters
Mappointer to Map_info structure
updatenon-zero for write mode, otherwise read-only
Returns
0 success
-1 error

Definition at line 39 of file open_nat.c.

References _, dig__read_head(), dig_file_init(), Map_info::dig_fp, gvfile::file, G_debug(), G_fopen_modify(), G_fopen_old(), G_warning(), GPATH_MAX, GV_COOR_ELEMENT, Map_info::head, Map_info::mapset, Map_info::name, NULL, dig_head::size, Coor_info::size, Vect__get_path(), Vect_coor_info(), and Vect_get_full_name().