Re: [GRASS-user] Export specific shapes from a vector file

2009-02-19 Thread leonidas

Thanks, very interesting and useful job,
Καλό Τσίκνισμα, Λεωνίδας:-D
-- 
View this message in context: 
http://n2.nabble.com/Export-specific-shapes-from-a-vector-file-tp2337165p2354772.html
Sent from the Grass - Users mailing list archive at Nabble.com.

___
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user


Re: [GRASS-user] Export specific shapes from a vector file

2009-02-17 Thread Nikos Alexandris
Λεωνίδα,

you might be interested in this tutorial:
Αναπαραγωγή του χάρτη CORINE με το GRASS-GIS
(http://users.hol.gr/~dzach/tilaphos/corine_grass-gis_el.pdf)

published at http://tilaphos.blogspot.com/2009/02/gis-corine.html

Χαιρετίσματα, Νίκος

___
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user


[GRASS-user] Export specific shapes from a vector file

2009-02-16 Thread leonidas

I need to export specific shapes from a grass vector file to another grass
vector file.
Also, I need to convert specific polygons from a vector grass file to a
raster grass file.
How can I do that?
Thanks, Leonidas
-- 
View this message in context: 
http://n2.nabble.com/Export-specific-shapes-from-a-vector-file-tp2337165p2337165.html
Sent from the Grass - Users mailing list archive at Nabble.com.

___
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user


Re: [GRASS-user] Export specific shapes from a vector file

2009-02-16 Thread Nikos Alexandris
On Mon, 2009-02-16 at 12:55 -0800, leonidas wrote:
 I need to export specific shapes from a grass vector file to another grass
 vector file.

v.extract in=VectorMap out=ExtractedFeatures ...
# you can use list= to extract specific categories (the cat column)
# or an SQL where clause, e.g. something like
where='SomeColumn=SomeString'

 Also, I need to convert specific polygons from a vector grass file to a
 raster grass file.

I assume by polygons you mean areas.

v.to.rast in=VectorMap out=RasterMap type=area ...
# use=??? You need to decide which values you will assign to your
pixels.

 How can I do that?
 Thanks, Leonidas

Regards, Nikos

___
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user


Re: [GRASS-user] Export specific shapes from a vector file

2009-02-16 Thread leonidas

Thank you Niko,
well I understand the first one (using v.extract).
-Is it possible to do something like that using v.out.ogr and export to
shapefile?
-As far as concerns the second question using v.to.rast, how can I export
only specific areas using sql where clause or list for specific categories?
Thanks again, Leonidas

Nikos Alexandris wrote:
 
 On Mon, 2009-02-16 at 12:55 -0800, leonidas wrote:
 I need to export specific shapes from a grass vector file to another
 grass
 vector file.
 
 v.extract in=VectorMap out=ExtractedFeatures ...
 # you can use list= to extract specific categories (the cat column)
 # or an SQL where clause, e.g. something like
 where='SomeColumn=SomeString'
 
 Also, I need to convert specific polygons from a vector grass file to a
 raster grass file.
 
 I assume by polygons you mean areas.
 
 v.to.rast in=VectorMap out=RasterMap type=area ...
 # use=??? You need to decide which values you will assign to your
 pixels.
 
 How can I do that?
 Thanks, Leonidas
 
 Regards, Nikos
 
 ___
 grass-user mailing list
 grass-user@lists.osgeo.org
 http://lists.osgeo.org/mailman/listinfo/grass-user
 
 

-- 
View this message in context: 
http://n2.nabble.com/Export-specific-shapes-from-a-vector-file-tp2337165p2337293.html
Sent from the Grass - Users mailing list archive at Nabble.com.

___
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user


Re: [GRASS-user] Export specific shapes from a vector file

2009-02-16 Thread Nikos Alexandris
On Mon, 2009-02-16 at 13:14 -0800, leonidas wrote:
 Thank you Niko,
 well I understand the first one (using v.extract).
 -Is it possible to do something like that using v.out.ogr and export to
 shapefile?

AFAIK, no. The way to do it is: v.extract + v.out.ogr


 -As far as concerns the second question using v.to.rast, how can I export
 only specific areas using sql where clause or list for specific categories?

Apologies, I overlooked the word specific before. Here (again) I think
you would need v.extract + v.to.rast. An example:

Let's say you have the CORINE map in whose attribute table you have a
column named level3 of type integer (with a lentgh of 3) which
contains the CORINE land cover class codes (111,112,113, etc.).

And now you need to extract specific classes, that is areas with
specific level3 codes (i.e. 111, 112, 122, 123, 141, 142). Then you
could do:

v.extract in=corine_ellas_v2 out=corine_ellas_v2_subset
where='level3=111 or level3=112 or level3=112 or
level3=122 or level3=123 or level3=141 or level3=142'
--o

then

v.to.rast in=corine_ellas_v2_subset out=corine_ellas_v2_subset use=attr
column=level3

Hope that helps
Cheers, Nikos

___
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user


Re: [GRASS-user] Export specific shapes from a vector file

2009-02-16 Thread leonidas

Yes that was what exactly I need.Thanks again

Nikos Alexandris wrote:
 
 On Mon, 2009-02-16 at 13:14 -0800, leonidas wrote:
 Thank you Niko,
 well I understand the first one (using v.extract).
 -Is it possible to do something like that using v.out.ogr and export to
 shapefile?
 
 AFAIK, no. The way to do it is: v.extract + v.out.ogr
 
 
 -As far as concerns the second question using v.to.rast, how can I export
 only specific areas using sql where clause or list for specific
 categories?
 
 Apologies, I overlooked the word specific before. Here (again) I think
 you would need v.extract + v.to.rast. An example:
 
 Let's say you have the CORINE map in whose attribute table you have a
 column named level3 of type integer (with a lentgh of 3) which
 contains the CORINE land cover class codes (111,112,113, etc.).
 
 And now you need to extract specific classes, that is areas with
 specific level3 codes (i.e. 111, 112, 122, 123, 141, 142). Then you
 could do:
 
 v.extract in=corine_ellas_v2 out=corine_ellas_v2_subset
 where='level3=111 or level3=112 or level3=112 or
 level3=122 or level3=123 or level3=141 or level3=142'
 --o
 
 then
 
 v.to.rast in=corine_ellas_v2_subset out=corine_ellas_v2_subset use=attr
 column=level3
 
 Hope that helps
 Cheers, Nikos
 
 ___
 grass-user mailing list
 grass-user@lists.osgeo.org
 http://lists.osgeo.org/mailman/listinfo/grass-user
 
 

-- 
View this message in context: 
http://n2.nabble.com/Export-specific-shapes-from-a-vector-file-tp2337165p2337658.html
Sent from the Grass - Users mailing list archive at Nabble.com.

___
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user