GRASS GIS 8 Programmer's Manual  8.5.0dev(2024)-d6dec75dd4
build_ogr.c File Reference

Vector library - Building topology for OGR. More...

#include <string.h>
#include <stdlib.h>
#include <stdio.h>
#include <grass/vector.h>
#include <grass/glocale.h>
#include <ogr_api.h>
#include <cpl_error.h>
#include "local_proto.h"
Include dependency graph for build_ogr.c:

Go to the source code of this file.

Functions

int Vect_build_ogr (struct Map_info *Map, int build)
 Build pseudo-topology (simple features) for OGR layer. More...
 
int Vect_save_fidx (struct Map_info *Map, struct Format_info_offset *offset)
 Save feature index file for vector map. More...
 

Detailed Description

Vector library - Building topology for OGR.

Higher level functions for reading/writing/manipulating vectors.

Category: FID, not all layer have FID, OGRNullFID is defined (5/2004) as -1, so FID should be only >= 0

(C) 2001-2010, 2012 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
Radim Blazek, Piero Cavalieri
Various updates for GRASS 7 by Martin Landa <landa.martin gmail.com>

Definition in file build_ogr.c.

Function Documentation

◆ Vect_build_ogr()

int Vect_build_ogr ( struct Map_info Map,
int  build 
)

Build pseudo-topology (simple features) for OGR layer.

Build levels:

  • GV_BUILD_NONE
  • GV_BUILD_BASE
  • GV_BUILD_ATTACH_ISLES
  • GV_BUILD_CENTROIDS
  • GV_BUILD_ALL
Parameters
Mappointer to Map_info structure
buildbuild level
Returns
1 on success
0 on error

Definition at line 49 of file build_ogr.c.

References _, Format_info_offset::array, Plus_head::built, Format_info_ogr::ds, Format_info_ogr::dsn, Map_info::fInfo, G_debug(), G_fatal_error(), G_free(), G_message(), G_warning(), G_zero(), GV_BUILD_BASE, GV_BUILD_NONE, Format_info_ogr::layer, Format_info_ogr::layer_name, Format_info_ogr::offset, Format_info::ogr, Map_info::plus, Vect__build_sfa(), Vect_get_finfo_format_info(), and Vect_get_finfo_geometry_type().

◆ Vect_save_fidx()

int Vect_save_fidx ( struct Map_info Map,
struct Format_info_offset offset 
)