[Qgis-user] Vector menu and Sextante -> ftools behaving inconsistently (was: Re: Invalid geometry)

custard custard at westnet.com.au
Sun Jun 24 18:32:03 PDT 2012


Hi Sergio,

I had some inconsistencies on my home computer over the weekend, but am now seeing what you're seeing. I'm giving the thread a new subject to better cover what I see as the problem.

Carson and Victor,

In QGIS the two ways of reaching the Geoprocessing -> Intersection tool are giving very different results. Details are below, but since these should give the same result, something is clearly wrong.

Comments?
Are we using the files incorrectly?

-ramon.

Method:
Using the following files:
http://www.mappinghacks.com/data/TM_WORLD_BORDERS_SIMPL-0.2.zip
and 
http://lists.osgeo.org/pipermail/qgis-user/attachments/20120622/8b8559cf/attachment.zip
(Note: second file has no projection details, and needs to be set to WGS84)

Using the Vector -> Geoprocessing Tools -> Intersection (point in first field, polygon in second)
     Gives an invalid geometry warning, and an empty shape file. (attached VectorIntersction.zip)

Using Sextante -> Ftools -L Geoprocessing Tools -> Intersection  (also point in first field, polygon in second)
     Gives no warinings and a shape file which is essentially a one to many join. (attached SextanteIntersection.zip)


----- Original Message -----
From: "Sergio A Estay" <sergio.estay at uach.cl>
To: qgis-user at lists.osgeo.org, custard at westnet.com.au
Sent: Saturday, 23 June, 2012 5:07:49 AM GMT +08:00 Beijing / Chongqing / Hong Kong / Urumqi
Subject: Re: Invalid geometry

Hi,

I used the intersection function simply to add the information from the polygon layer table to my point layer table. I used this fuction in all gis software without problems (Qgis old version, arcgis, sextante, gvsig, etc). When I use the function intersection in the main vectorial menu of Qgis I obtain a shp file empty (also the table is empty) and the message of invalid geometry just in my polygon layer (not in my point layer). In the 1.7.4 version and all other softwares I obtained the table with all the attributes (from the original polygon and point layer) without errors for every point (also works fine in gvsig, arcgis and others).

In reference to the invalid geometry of my polygon layers, I checked my shp files (link below) in GRASS, arcgis and gvsig and no one detect any error in the geometry.

sorry for series of e-mail but I am newbie trying to learn Qgis.

Sergio



Hi Everybody and Ramon,

  From the last actualization from QGIS 1.7.4 to 1.8.0 all my shp files
have "invalid geometry". For that reason now I can't make intersection
between vector layers. Previous to the actualization everything works
fine (using the same vector files).

As a polygons shp files I use this cover:

http://www.mappinghacks.com/data/TM_WORLD_BORDERS_SIMPL-0.2.zip

As a points vector layer I use the attached shp file.

If I try to make the intersection from Qgis/vectorial/geoprocess menu I
obtain "invalid geometry", but If I install the sextante python
complement, open the Toolbox and run intersection from the ftools
submenu everything is OK.

Any advice will be very useful

Thanks

Sergio









Hi,

As a start, the c1.shp file in the attached zip has no projection details. It has projection files, but they're empty, so QGIS will either assume a projection or ask, depending on what setting you've used. This will also cause problems later.

I'm not what you're expecting out of an intersect between a point layer and a polygon layer. QGIS is going to get confused somewhere as it needs 3 points to make a polygon, and in effect you're asking it to make a polygon of one point. (Which is why you're being warned about the geometry error). It will still make a file, but it might not be what you want.

Looking at the results I'd guess Sextante is just not telling you about this. They look very similar to me.

You could make a (very small buffer) around the points and then work with that...

Could you explain what you're expecting QGIS to do?

-ramon.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: VectorIntersection.zip
Type: application/zip
Size: 849 bytes
Desc: not available
URL: <http://lists.osgeo.org/pipermail/qgis-user/attachments/20120625/5f624a00/attachment.zip>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: SextanteIntersection.zip
Type: application/zip
Size: 1933 bytes
Desc: not available
URL: <http://lists.osgeo.org/pipermail/qgis-user/attachments/20120625/5f624a00/attachment-0001.zip>


More information about the Qgis-user mailing list