[Qgis-user] How to generate closed polygon from unordered set of points

pcreso at pcreso.com pcreso at pcreso.com
Fri Oct 8 14:29:12 PDT 2010


Gidday John,

I don't believe this is possible with the current version of the QGIS editor. Assuming your query in this list follows on from the recent thread in the GMT list, here is my 02c...

You can do this with Postgis or Postgis & QGIS though.

Have your data in Postgis & opened in QGIS. Use QGIS to chop the lines up into the requisite segments which can be combined to build your polygon, then build your polygon from these segments in Postgis.

Or do the entire thing in Postgis. Note you can manage all your GMT vector data in Postgis & extract with ogr2ogr as required (in your script) to plot with GMT. This works very well for me, managing large volumes of vector data for use with GMT is otherwise somewhat problematic.

For a good tutorial on this in Postgis, & rather than try to explain it all here, see the Postgis power user presentation here:

http://presentations.opengeo.org/2010_FOSS4G/

Also, if you did not already know, given QGIS can open layers of an GDAL/OGR supported format, if your GMT vector data is fully OGR compliant, as that with GMT v5 should be and earlier versions may be, you can open your GMT files directly in QGIS for veiwing & editing. 

HTH,

  Brent Wood


--- On Sat, 10/9/10, John Helly <hellyj at ucsd.edu> wrote:

> From: John Helly <hellyj at ucsd.edu>
> Subject: [Qgis-user] How to generate closed polygon from unordered set of points
> To: "qgis-user List" <qgis-user at lists.osgeo.org>
> Date: Saturday, October 9, 2010, 7:57 AM
> Hi.
> 
> I've got an unordered set of x,y pairs that I would like to
> plot as a line and then interactively edit the line to make
> a closed polygon.  I've used the points2one plug-in to
> make an editable line but don't seem to able to join the
> lines in the correct way by adding/deleting nodes.
> 
> Is it possible to do this with Qgis at all and, if so,
> how?
> 
> Thank you.
> 
> Cheers.
> --------------
> John Helly, UCSD / San Diego Supercomputer Center / Scripps
> Institution of Oceanography, Climate, Atmospheric Science,
> and Physical Oceanography / +01 760 840 8660 mobile /
> stonesteps (Skype) / stonesteps7 (iChat) /
> /www.sdsc.edu/~hellyj
> 
> 
> 
> 
> _______________________________________________
> Qgis-user mailing list
> Qgis-user at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/qgis-user
> 



More information about the Qgis-user mailing list