[GRASS-user] v.out.ogr

Hi grass users,

i'm trying to export a grass vector and generate a shapefile using v.out.ogr. the vector contains 4 points and 6 boundaries each has its own centroids.
the output shapefile contains 4 objects out of 10. WHY? How can I get all the objects?

(i created the vector using v.patch from 2 separate vectors, one containg 4 points and the other containing 6 boundaries + centroids).

thanks

silvia
----------------------------------------------------------------------------------------
Silvia Simoni PhD
DICA - Department of Civil and Environmental Engineering
Universita' di Trento
via Mesiano 77, 38100 Trento, ITALY
tel. +39 0461 882610
fax. +39 0461 882672
e-mail: silvia.simoni@ing.unitn.it

Silvia Simoni wrote:

Hi grass users,

i'm trying to export a grass vector and generate a shapefile using
v.out.ogr. the vector contains 4 points and 6 boundaries each has its
own centroids.
the output shapefile contains 4 objects out of 10. WHY? How can I get
all the objects?

(i created the vector using v.patch from 2 separate vectors, one
containg 4 points and the other containing 6 boundaries + centroids).

thanks

silvia

I don't believe that shapefiles can hold multiple vector types. It
sounds like you have both points and polygons. You can get the 4 pts
plus 6 centroids in one and the 6 boundaries in another if you like.

Alex

On Wed, Sep 10, 2008 at 10:42:12PM +0200, we recorded a bogon-computron collision of the <silvia.simoni@ing.unitn.it> flavor, containing:

Hi grass users,

i'm trying to export a grass vector and generate a shapefile using
v.out.ogr. the vector contains 4 points and 6 boundaries each has its
own centroids.
the output shapefile contains 4 objects out of 10. WHY? How can I get
all the objects?

(i created the vector using v.patch from 2 separate vectors, one
containg 4 points and the other containing 6 boundaries + centroids).

Shapefiles can only hold one type of data (point, line, polygon) per shapefile.
You can't export a grass vector with both points and areas to a single
shapefile. You'll have to do it in two passes to two different files with
v.out.ogr and different "type=" parameters.

That is, it'll be as if you exported the data before having done the v.patch.

--
Tom Russo KM5VY SAR502 DM64ux http://www.swcp.com/~russo/
Tijeras, NM QRPL#1592 K2#398 SOC#236 AHTB#1 http://kevan.org/brain.cgi?DDTNM
"Argue for your limitations and sure enough, they're yours." -- R. Bach

Thanks Tom and Alex!
it works mow!

silvia
On Sep 10, 2008, at 10:54 PM, Tom Russo wrote:

On Wed, Sep 10, 2008 at 10:42:12PM +0200, we recorded a bogon-computron collision of the <silvia.simoni@ing.unitn.it> flavor, containing:

Hi grass users,

i'm trying to export a grass vector and generate a shapefile using
v.out.ogr. the vector contains 4 points and 6 boundaries each has its
own centroids.
the output shapefile contains 4 objects out of 10. WHY? How can I get
all the objects?

(i created the vector using v.patch from 2 separate vectors, one
containg 4 points and the other containing 6 boundaries + centroids).

Shapefiles can only hold one type of data (point, line, polygon) per shapefile.
You can't export a grass vector with both points and areas to a single
shapefile. You'll have to do it in two passes to two different files with
v.out.ogr and different "type=" parameters.

That is, it'll be as if you exported the data before having done the v.patch.

--
Tom Russo KM5VY SAR502 DM64ux http://www.swcp.com/~russo/
Tijeras, NM QRPL#1592 K2#398 SOC#236 AHTB#1 http://kevan.org/brain.cgi?DDTNM
"Argue for your limitations and sure enough, they're yours." -- R. Bach

----------------------------------------------------------------------------------------
Silvia Simoni PhD
DICA - Department of Civil and Environmental Engineering
Universita' di Trento
via Mesiano 77, 38100 Trento, ITALY
tel. +39 0461 882610
fax. +39 0461 882672
e-mail: silvia.simoni@ing.unitn.it