[[TOC]] = OGR interface in GRASS 7 = == Direct OGR read access == Capability to read OGR layers directly without linking them via {{{v.external}}}. Example: {{{ v.info map=~/shapefiles/@OGR layer=busstopsall v.extract input=PG:dbname=nc_spm_08@OGR layer=busstopsall where="STREET_1 = 'William Moore Dr.'" output=b1 }}} List of modules which supports direct OGR read access ((*) indicates work in progress): * {{{v.info}}} (r39161), {{{v.db.connect}}} (r39538), {{{v.extract}}} (r39621), {{{v.db.select}}} (r39556), {{{v.buffer}}} (r39809), {{{v.category}}} (r39812), {{{v.class}}} (r39813), {{{v.clean}}} (r39814), {{{v.delaunay}}} (r39821), {{{v.dissolve}}} (r39822), {{{v.distance}}} (r39823), {{{v.drape}}} (r39826), {{{v.extrude}}} (r39827), {{{v.generalize}}} (r39828), {{{v.hull}}} (r39829), {{{v.kcv}}} (r39832), {{{v.neighbors}}} (r39834), {{{v.normal}}} (r39839), {{{v.out.ascii}}} (r39881), {{{v.out.dxf}}} (r39882), {{{v.out.ogr}}} (r39883), {{{v.out.pov}}} (r39884), {{{v.out.svg}}} (r39885), {{{v.overlay}}} (r39895), {{{v.parallel}}} (r39896), {{{v.pertrub}}} (r39897), {{{v.qcount}}} (r39898), {{{v.report}}} (r39905), {{{v.sample}}} (r39906), {{{v.segment}}} (r39907), {{{v.reclass}}} (r39908), {{{v.random}}} (r39909), {{{v.rast.stats}}} (r39910), {{{v.select}}}, {{{v.split}}}, {{{v.surf.idw}}}, {{{v.surf.rst}}}, {{{v.to.3d}}}, {{{v.to.db}}}, {{{v.to.points}}}, {{{v.to.rast}}}, {{{v.to.rast3}}}, {{{v.transform}}}, {{{v.type}}}, {{{v.univar}}}, {{{v.what}}} (r40188) == Direct OGR write access == Capability to write OGR layers directly without need to store data in the native vector format and then exporting data using {{{v.out.ogr}}}. Example: Testcase: * location: {{{nc_spm_08}}} * Shapefile directory: {{{~/ncshape}} * PostGIS database: {{{pgis_nc}}} === Scenario 1 === Use parameters {{{output}}} for output OGR datasource and {{{olayer}}} for OGR layer. Example: {{{ # input: GRASS data # output: PostGIS database v.extract map=obce where="NAZEV = Solany" output=PG:dbname=gisdb@OGR olayer=obce # input: PostGIS layer, ESRI Shapefile # output: PostGIS database v.select ainput=PG:dbname=gisdb@OGR alayer=zeleznice \ binput=shps@OGR blayer=obce operator=intersects \ output=PG:dbname=gisdb@OGR olayer=obce_zelez }}} '''Status:''' not planned to be implemented === Scenario 2 === Use `v.external.out` {{{ # input: GRASS data # output: PostGIS database v.external.out dsn=PG:dbname=gisdb format=PostgreSQL v.extract map=obce where="NAZEV = Solany" output=obce # input: PostGIS layer, ESRI Shapefile # output: PostGIS database v.select ainput=PG:dbname=gisdb@OGR alayer=zeleznice \ binput=shps@OGR blayer=obce operator=intersects \ output=obce_zelez }}} '''Status:''' implemented [source:grass/trunk/vector/v.external.out] === Tasks === * ~~Attribute table (write) access for OGR-linked vectors (direct or linked by v.external)~~ * Implemented in r47225 === Changes in vector library === * [source:grass/trunk/lib/vector/Vlib/write_ogr.c write_ogr.c] === Changes in modules === List of modules which supports direct OGR write access ((*) indicates work in progress): * `v.edit`