[GRASS-dev] [GRASS GIS] #3646: v.external.out and r.to.vect support

#3646: v.external.out and r.to.vect support
----------------------------+-------------------------
Reporter: neteler | Owner: grass-dev@…
     Type: defect | Status: new
Priority: normal | Milestone: 7.6.0
Component: Vector | Version: svn-trunk
Keywords: v.external.out | CPU: Unspecified
Platform: Unspecified |
----------------------------+-------------------------
Running
{{{
## Test case for nc_spm_08_grass7:

# test GeoTIFF preparation:
r.out.gdal input=landclass96 output=landclass96.tif
createopt="COMPRESS=LZW"

# register GeoTIFF
r.external input=landclass96.tif output=TMP --o

# define external vector file, here GeoPackage
v.external.out output=landclass96map.gpkg format=GPKG

# rasterize LULC map, write out directly as GPKG
g.region raster=TMP -p
r.to.vect input=TMP output=landclass96map type=area column=landuse

# cease connection
v.external.out -r
}}}

leads to:

{{{
r.to.vect input=TMP output=landclass96map type=area column=landuse --o
Extracting areas...
  100%
Writing areas...
  100%
Registering primitives...
Building areas...
  100%
Attaching islands...
  100%
Attaching centroids...
  100%
Copying features...
WARNING: Boundary is not closed. Feature skipped.
WARNING: Unable to write feature in vector map <landclass96map>
WARNING: Writing new feature failed
Exporting areas...
  100%
WARNING: Copying features failed
r.to.vect complete.
}}}

From https://lists.osgeo.org/pipermail/grass-
dev/2018-September/089719.html:
"topological areas can only be converted to non-topological polygons after
all boundaries and centroids have been written out and after topology has
been built."

This would be quite useful in order to write such scripts as Python jobs
(think "grass-session").

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/3646&gt;
GRASS GIS <https://grass.osgeo.org>

#3646: v.external.out and r.to.vect support
--------------------------+----------------------------
  Reporter: neteler | Owner: grass-dev@…
      Type: defect | Status: new
  Priority: normal | Milestone: 7.6.0
Component: Vector | Version: svn-trunk
Resolution: | Keywords: v.external.out
       CPU: Unspecified | Platform: Unspecified
--------------------------+----------------------------

Comment (by mmetz):

Replying to [ticket:3646 neteler]:
>
> From https://lists.osgeo.org/pipermail/grass-
dev/2018-September/089719.html:
> "topological areas can only be converted to non-topological polygons
after all boundaries and centroids have been written out and after
topology has been built."
>
> This would be quite useful in order to write such scripts as Python jobs
(think "grass-session").

This is equivalent to using v.out.ogr instead of v.external.out. Added
bonus is that with v.out.ogr you have much more control over how data are
exported.

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/3646#comment:1&gt;
GRASS GIS <https://grass.osgeo.org>

#3646: v.external.out and r.to.vect support
--------------------------+----------------------------
  Reporter: neteler | Owner: grass-dev@…
      Type: defect | Status: new
  Priority: normal | Milestone: 7.6.0
Component: Vector | Version: svn-trunk
Resolution: | Keywords: v.external.out
       CPU: Unspecified | Platform: Unspecified
--------------------------+----------------------------

Comment (by neteler):

Replying to [comment:1 mmetz]:
> This is equivalent to using v.out.ogr instead of v.external.out. Added
bonus is that with v.out.ogr you have much more control over how data are
exported.

OK - but what is the purpose then of v.external.out?

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/3646#comment:2&gt;
GRASS GIS <https://grass.osgeo.org>