GRASS 8 Programmer's Manual 8.6.0dev(2026)-55de52a352
Loading...
Searching...
No Matches
close.c File Reference

Vector library - Close vector map. More...

#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <unistd.h>
#include <grass/vector.h>
#include <grass/glocale.h>
#include "local_proto.h"
Include dependency graph for vector/Vlib/close.c:

Go to the source code of this file.

Functions

int Vect_close (struct Map_info *Map)
 Close vector map.
 
int Vect_save_frmt (struct Map_info *Map)
 Save format definition file for vector map.
 
void Vect__free_cache (struct Format_info_cache *cache)
 
void Vect__free_offset (struct Format_info_offset *offset)
 

Detailed Description

Vector library - Close vector map.

Higher level functions for reading/writing/manipulating vectors.

SPDX-FileCopyrightText: 2001-2015 GRASS Development Team SPDX-License-Identifier: GPL-2.0-or-later

Author
Original author CERL, probably Dave Gerdes or Mike Higgins.
Update to GRASS 5.7 Radim Blazek and David D. Gray.
Update to GRASS 7 Martin Landa <landa.martin gmail.com>

Definition in file vector/Vlib/close.c.

Function Documentation

◆ Vect__free_cache()

void Vect__free_cache ( struct Format_info_cache cache)

Free memory of line cache

Parameters
cachepointer to lines cache to be freed

Definition at line 282 of file vector/Vlib/close.c.

References G_free(), G_zero(), Format_info_cache::lines, Format_info_cache::lines_alloc, Format_info_cache::lines_cats, Format_info_cache::lines_types, and Vect_destroy_line_struct().

Referenced by V1_close_ogr(), V1_close_pg(), and Vect__load_plus_pg().

◆ Vect__free_offset()

void Vect__free_offset ( struct Format_info_offset offset)

Free memory of offset array

Parameters
offsetpointer to offset array to be freed

Definition at line 301 of file vector/Vlib/close.c.

References Format_info_offset::array, G_free(), and G_zero().

Referenced by V2_close_ogr(), and V2_close_pg().

◆ Vect_close()

◆ Vect_save_frmt()

int Vect_save_frmt ( struct Map_info Map)

Save format definition file for vector map.

Parameters
Mappointer to Map_info structure
Returns
1 on success
0 on error

Definition at line 235 of file vector/Vlib/close.c.

References _, G_fatal_error(), G_fopen_new(), G_verbose_message(), G_warning(), GPATH_MAX, GV_DIRECTORY, GV_FORMAT_OGR, GV_FORMAT_POSTGIS, GV_FRMT_ELEMENT, AMI_STREAM< T >::name(), and NULL.

Referenced by V1_close_ogr(), and V1_close_pg().