Opened 6 years ago

Last modified 5 years ago

#3646 new defect

v.external.out and r.to.vect support

Reported by: neteler Owned by: grass-dev@…
Priority: normal Milestone: 7.6.2
Component: Vector Version: svn-trunk
Keywords: v.external.out Cc:
CPU: Unspecified Platform: Unspecified

Description

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").

Change History (4)

in reply to:  description ; comment:1 by mmetz, 6 years ago

Replying to 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.

in reply to:  1 comment:2 by neteler, 6 years ago

Replying to 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?

comment:3 by martinl, 5 years ago

Milestone: 7.6.07.6.1

Ticket retargeted after milestone closed

comment:4 by martinl, 5 years ago

Milestone: 7.6.17.6.2

Ticket retargeted after milestone closed

Note: See TracTickets for help on using tickets.