[Qgis-user] Problems with Union tool in QGIS 2.6

Colin D. MacLeod cdmacleod at GISinEcology.com
Fri Dec 5 10:52:43 PST 2014


Thanks Nicholas,

If I’m understanding it correctly (and I appologise if I’m not), te method you provide would allow me to elliminate any of my vector grid cells which fall on land (or more precisely which have centres that fall on land), which is useful. However, what I need to be able to do is to separate each grid cell which lies along any stretches of coastline into two separate irregular polygon features, one which falls entirely in the sea and one which falls entirely on land. I can then delete the sections of all the grid cells which fall on land. 

The process that I use for doing this is to use the Union tool to create a combined data layer of my land polygons and my polygon grid cells, and then use the ID field from the land polygon data layer to select and delete the sections which overlap with the land polygons, leaving me with a vector grid which is clipped exactly along the coastline, and has partial grid cells for these coastal cells that only represent the sea parts of them.

As I said, this approach used to work perfectly in QGIS 2.2 and 2.4, but I can only get the Union tool to work intermittently in QGIS 2.6, and when it doesn’t work, I get the Feature Geometry Not Imported (OGR Error:) error message. 

At the moment, this is the one thing which is stopping me being able to ditch ArcGIS and instead use QGIS as the basis for teaching marine biologists to use GIS in their research using our standard protocols for processing data, so any suggestions on what might be going wrong with the Union tool, and how I might be able to deal with it, would be greatly appreciated.

I would prefer to be able to use the Union tool in my exercises, but if there is another way of doing it that will allow me to split the coastal cells of my vector grid into irregular polygons that are entirely land and entirely sea, then I would consider that.

Thanks for any further advice anyone can offer.

All the best,

Colin


>>Hi, You can use the point sampling tool plugin for that. Extract your grid centroid, use the new point layers with the point >>sampling tools. You can also sample raster and vector values with the tool. You can rejoin both layer later in a number of ways. >>If you want to eliminate points, (or grid squares if both have been joined) you can use a query. If you have millions features, >>this may be slow. In that case, use the "split vector file" using a column. For more tools for your work, look at the plugins for >>"stats". You will find a number of good plugins for extracting statistics from vector or raster data. There are also many tools in >>the " processing" tools. Send me a mail if you need more help. I Like what you are doing... Nicolas Cadieux M.Sc. Les Entreprises >>Archéotec inc. 8548, rue Saint-Denis Montréal H2P 2H2 Téléphone: 514.381.5112 Fax: 514.381.4995 Le 2014-12-05 09:37, "Colin D. >>MacLeod [via OSGeo.org] " <ml-node+s1560n5176645h56 at n6.nabble.com> a écrit : 
==================================================================================
GIS IN ECOLOGY - Providing Training, Advice And Consultancy On The Use Of GIS In Ecology

Web: www.GISinEcology.com Email: info at GISinEcology.com

Need to ask a question about using GIS? Try the GIS In Ecology Forum: www.GISinEcology.com/GIS_in_Ecology_forum.htm

Books From GIS In Ecology Staff:

An Introduction To Using GIS In Marine Biology; RRP: £44.99
An Introduction To Using GIS In Marine Biology: Supplementary Workbook One - Creating Maps Of Species Distribution; RRP: £19:99 
An Introduction To Using GIS In Marine Biology: Supplementary Workbook Two - Working With Raster Data Layers; RRP: £19.99 

If you wish to purchase these books, visit: http://www.gisinecology.com/Book_Shop.htm

To help the environment, please do not print out this email unless it is unavoidable.
==================================================================================

 

---
This email is free from viruses and malware because avast! Antivirus protection is active.
http://www.avast.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-user/attachments/20141205/204367f0/attachment.html>


More information about the Qgis-user mailing list