[Qgis-user] Create polygons with attributes from csv-file

2015-05-21 Thread Nicole Stoffels
Dear QGIS-users,

I have a csv-file containing the corner coordinates of different forests
with different heights. The file is structured like this:

FID,forest_id,point_id,X,Y,height
1,forest1,point1,10.915763,54.137004,25
2,forest1,point2,10.917392,54.138734,25
3,forest1,point3,10.915822,54.140197,25
4,forest1,point4,10.913504,54.140824,25
5,forest1,point5,10.913541,54.138637,25
6,forest2,point1,10.897562,54.150324,20
7,forest2,point2,10.897907,54.149662,20
8,forest2,point3,10.900432,54.148912,20
9,forest2,point4,10.901194,54.149092,20

Now I want to make two polygons from the two different forests
containing the attribute height. If I had only one forest I would create
a voronoi diagram and a delaunay triangulation and clipper them. But it
would be too time consuming to do that for every forest, as I usually
have rather 10 forests or more. Is there a way to get this done if all
forests are in one csv-dataset only separated by there forest_id?

Thank you and sorry for the first mail, which was not yet finished.

Best wishes
Nicole
___
Qgis-user mailing list
Qgis-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-user


[Qgis-user] Create polygons with attributes from csv-file

2015-05-21 Thread Nicole Stoffels
Dear QGIS-users,

I have a csv-file containing the corner coordinates of different forests
with different heights. The file is structured lik this:

FID,forest_id,point_id,X,Y,height
1,forest1,point1,10.915763,54.137004,25
2,forest1,point2,10.917392,54.138734,25
3,forest1,point3,10.915822,54.140197,25
4,forest1,point4,10.913504,54.140824,25
5,forest1,point5,10.913541,54.138637,25
6,forest2,point1,10.897562,54.150324,20
7,forest2,point2,10.897907,54.149662,20
8,forest2,point3,10.900432,54.148912,20
9,forest2,point4,10.901194,54.149092,20
___
Qgis-user mailing list
Qgis-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-user


Re: [Qgis-user] Create polygons with attributes from csv-file

2015-05-21 Thread Nicolas Cadieux
If you import the CSV as point in QGIS or in a spread sheet, you can easily 
separate them using the forest ID. In Qgis, you can save them to a shape file 
and then use the forest ID to split the shape file into different parts (vector 
menu). 
Then, you could use your method of triangulation.  
I also remember a plugin that will chain point into polygons.  Don't know 
the name but search for something like point to line or point to 
polygons.  
Python will also permit you to do that directly but I would try first to find a 
plugin that does it for you. I would help more but I am far from a PC. 
Cheers 
Nicolas Cadieux M.Sc. 
On May 21, 2015 9:06 AM, "Nicole Stoffels [via OSGeo.org]  " 
 wrote: 

Dear QGIS-users,
I have a csv-file containing the corner coordinates of different forests
with different heights. The file is structured like this:
FID,forest_id,point_id,X,Y,height
1,forest1,point1,10.915763,54.137004,25
2,forest1,point2,10.917392,54.138734,25
3,forest1,point3,10.915822,54.140197,25
4,forest1,point4,10.913504,54.140824,25
5,forest1,point5,10.913541,54.138637,25
6,forest2,point1,10.897562,54.150324,20
7,forest2,point2,10.897907,54.149662,20
8,forest2,point3,10.900432,54.148912,20
9,forest2,point4,10.901194,54.149092,20
Now I want to make two polygons from the two different forests
containing the attribute height. If I had only one forest I would create
a voronoi diagram and a delaunay triangulation and clipper them. But it
would be too time consuming to do that for every forest, as I usually
have rather 10 forests or more. Is there a way to get this done if all
forests are in one csv-dataset only separated by there forest_id?
Thank you and sorry for the first mail, which was not yet finished.
Best wishes
Nicole
___
Qgis-user mailing list
[hidden email] 
http://lists.osgeo.org/mailman/listinfo/qgis-user 








If you reply to this email, your message will be added to the 
discussion below: 

http://osgeo-org.1560.x6.nabble.com/Create-polygons-with-attributes-from-csv-file-tp5206903.html
 


To start a new topic under Quantum GIS - User, email 
ml-node+s1560n4125267h38@n6.nabble.com 
To unsubscribe from Quantum GIS - User, click here . 
NAML 




--
View this message in context: 
http://osgeo-org.1560.x6.nabble.com/Create-polygons-with-attributes-from-csv-file-tp5206903p5206912.html
Sent from the Quantum GIS - User mailing list archive at Nabble.com.___
Qgis-user mailing list
Qgis-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-user

Re: [Qgis-user] Create polygons with attributes from csv-file

2015-05-21 Thread Fernando M. Roxo da Motta
On Thu, 21 May 2015 15:08:28 +0200, Nicole Stoffels 
wrote:

  Hi all,


  I don't know what platform you use, I use Linux and I got an script
from somewhere (sorry, long time ago and I can't recall :( ) to produce
shapefiles from the content of a CVS.   Depending on how skilled you
are in editing in your preferred editor (please guys, no VIM vs Notepad
flamewar) it can be easy to convert this CVS to the script.  I guess
that even a .bat could do, although I don't know the syntax.

  The script bellow will produce the files .dbf, .shx, and .shp.  You
will need to provide a .prj some way.  Of course if you load this
shapefile in Qgis it will ask for the CRS.  The shapefile will have two
polygons and the DBF will have the ID and the height.

#=8< cut here  

#!/bin/sh
# nome   : makeshape_poly.sh
# autor  : 
# description: 
#   Given sets of points, use them to build a shapefile
#   You will have to provide a $SHPNAM.proj later.
# changelog  : 
# 21/05/2015 - first version

# 
SHPNAM=forests

shpcreate $SHPNAM polygon
dbfcreate $SHPNAM.dbf -n FID5  0 \
  -s forestid   8\
  -n height 5  2 \


shpadd $SHPNAM.shp 10.915763 54.137004  \
   10.917392 54.138734  \
   10.915822 54.140197  \
   10.913504 54.140824  \
   10.913541 54.138637

dbfadd $SHPNAM.dbf 1 "forest1" 25


shpadd $SHPNAM.shp 10.897562 54.150324  \
   10.897907 54.149662  \
   10.900432 54.148912  \
   10.901194 54.149092

dbfadd $SHPNAM.dbf 2 "forest2"  20


shpdump $SHPNAM.shp
dbfdump $SHPNAM.dbf

#=8< cut here 


  Hope this helps.



> Dear QGIS-users,
> 
> I have a csv-file containing the corner coordinates of different
> forests with different heights. The file is structured like this:
> 
> FID,forest_id,point_id,X,Y,height
> 1,forest1,point1,10.915763,54.137004,25
> 2,forest1,point2,10.917392,54.138734,25
> 3,forest1,point3,10.915822,54.140197,25
> 4,forest1,point4,10.913504,54.140824,25
> 5,forest1,point5,10.913541,54.138637,25
> 6,forest2,point1,10.897562,54.150324,20
> 7,forest2,point2,10.897907,54.149662,20
> 8,forest2,point3,10.900432,54.148912,20
> 9,forest2,point4,10.901194,54.149092,20
> 
> Now I want to make two polygons from the two different forests
> containing the attribute height. If I had only one forest I would
> create a voronoi diagram and a delaunay triangulation and clipper
> them. But it would be too time consuming to do that for every forest,
> as I usually have rather 10 forests or more. Is there a way to get
> this done if all forests are in one csv-dataset only separated by
> there forest_id?
> 
> Thank you and sorry for the first mail, which was not yet finished.
> 
> Best wishes
> Nicole
> ___
> Qgis-user mailing list
> Qgis-user@lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/qgis-user
> 








  Roxo

-- 
 Non luctari, ludare ---+ WYSIWYG
Fernando M. Roxo da Motta   | Editor?
Except where explicitly stated I speak on my own behalf.|  VI !!
  ( Usuário Linux registrado #39505 )   | I see text,
 Quis custodiet ipsos custodes?-+ I get text!
 
___
Qgis-user mailing list
Qgis-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-user

Re: [Qgis-user] Create polygons with attributes from csv-file

2015-05-21 Thread Andre Joost

Am 21.05.2015 um 15:08 schrieb Nicole Stoffels:

Dear QGIS-users,

I have a csv-file containing the corner coordinates of different forests
with different heights. The file is structured like this:

FID,forest_id,point_id,X,Y,height
1,forest1,point1,10.915763,54.137004,25
2,forest1,point2,10.917392,54.138734,25
3,forest1,point3,10.915822,54.140197,25
4,forest1,point4,10.913504,54.140824,25
5,forest1,point5,10.913541,54.138637,25
6,forest2,point1,10.897562,54.150324,20
7,forest2,point2,10.897907,54.149662,20
8,forest2,point3,10.900432,54.148912,20
9,forest2,point4,10.901194,54.149092,20

Now I want to make two polygons from the two different forests
containing the attribute height.


You can get the polygons easily with the MMQGIS plugin -> Import/Export 
-> Geometry Import from CSV file.


It lets you select the common ID column, X, Y and geometry type.

Only height is not imported.

HTH,
André Joost


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


Re: [Qgis-user] Create polygons with attributes from csv-file

2015-05-21 Thread Goyo
2015-05-21 15:08 GMT+02:00 Nicole Stoffels :
> Dear QGIS-users,
>
> I have a csv-file containing the corner coordinates of different forests
> with different heights. The file is structured like this:
>
> FID,forest_id,point_id,X,Y,height
> 1,forest1,point1,10.915763,54.137004,25
> 2,forest1,point2,10.917392,54.138734,25
> 3,forest1,point3,10.915822,54.140197,25
> 4,forest1,point4,10.913504,54.140824,25
> 5,forest1,point5,10.913541,54.138637,25
> 6,forest2,point1,10.897562,54.150324,20
> 7,forest2,point2,10.897907,54.149662,20
> 8,forest2,point3,10.900432,54.148912,20
> 9,forest2,point4,10.901194,54.149092,20
>
> Now I want to make two polygons from the two different forests
> containing the attribute height.

I think the points2One plugin will do exactly what you want.
http://plugins.qgis.org/plugins/points2one/

Sorry there are no docs but I think the interface is pretty
straightforward. You can also ask questions and file bugs reports and
feature requests in the launchpad page.
https://launchpad.net/points2one

Goyo
___
Qgis-user mailing list
Qgis-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-user