GRASS 8 Programmer's Manual 8.6.0dev(2026)-1d1e47ad9d
Loading...
Searching...
No Matches
build_sfa.c File Reference

Vector library - Building pseudo-topology for simple feature access. More...

#include <stdlib.h>
#include <grass/gis.h>
#include <grass/vector.h>
#include <grass/glocale.h>
#include <ogr_api.h>
#include "pg_local_proto.h"
Include dependency graph for build_sfa.c:

Go to the source code of this file.

Functions

int Vect__build_sfa (struct Map_info *Map, int build)
 Build pseudo-topology (for simple features) - internal use only.
 
int Vect_fidx_dump (struct Map_info *Map, FILE *out)
 Dump feature index to file.
 

Detailed Description

Vector library - Building pseudo-topology for simple feature access.

Higher level functions for reading/writing/manipulating vectors.

Line offset is

  • centroids : FID
  • other types : index of the first record (which is FID) in offset array.

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

Function Documentation

◆ Vect__build_sfa()

int Vect__build_sfa ( struct Map_info Map,
int  build 
)

Build pseudo-topology (for simple features) - internal use only.

See Vect_build_ogr() and Vect_build_pg() for implementation issues.

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 696 of file build_sfa.c.

References _, Plus_head::built, G_fatal_error(), GV_BUILD_BASE, GV_FORMAT_OGR, GV_FORMAT_OGR_DIRECT, GV_FORMAT_POSTGIS, and Vect__build_downgrade().

Referenced by Vect_build_ogr(), and Vect_build_pg().

◆ Vect_fidx_dump()

int Vect_fidx_dump ( struct Map_info Map,
FILE out 
)

Dump feature index to file.

Parameters
Mappointer to Map_info struct
outfile for output (stdout/stderr for example)
Returns
1 on success
0 on error

Definition at line 742 of file build_sfa.c.

References _, Format_info_offset::array, Format_info_offset::array_num, G_warning(), GV_FORMAT_OGR, GV_FORMAT_POSTGIS, Vect_get_finfo_geometry_type(), Vect_get_num_lines(), Vect_maptype(), and Vect_maptype_info().