1

I'm trying to compute the area of green surface for cities with QGis from open data found online. I have polygons on a layer for the cities boundaries and polygons on another layer for the parks.

I first decided to clip the polygons of the parks but as the boundaries of the cities are adjacent, the parks are not cut along the boundaries.

I then chose to intersect both layers as it would cut the parks alongside the boundaries. But the result is empty! Any clue?

I've already checked the CSR which are the same for both layers.

Example of what I would like to have

For example, in this picture, there are two parks (North one foret communale du canton du Cerisier and South one foret communale) and two cities (376 West and 519 East). As the limits of the parks are not the same as the ones of the cities, it should return 4 green areas: two for the North forest (one for each city) and two for the South forest (one for each city).

Here are the files I'm using: https://files.fm/f/cpuyqu2f.

Edit: Seems like the problem comes from park layer. I tried with new layers and the polygons intersection works.

  • 1
    I have had this occur too when trying to perform the operation on a layer that is being edited. – RomaH Jan 18 '18 at 14:05
4

The answer was quite simple in fact: my parks layer is a 3D layer (Polygon with XYZ) and the cities layer is a 2D layer (Polygon with XY). The intersection was not happening for obvious reasons (the 3D layer being litteraly above the 2D layer and not intersecting it).

I saved my parks layer as a new layer without checking include Z dimension and it worked.

3

I had a similar problem some time ago. My solution was to use the SAGA intersection tool that comes in QGIS instead of the QGIS Geoprocessing tool and it worked out. I still don´t know why the other tool didn´t do the job. So search in the toolbox panel for the SAGA intersection and see if that one works out.

I´m using QGIS 2.14

  • Thank you, using SAGA intersection did work. I think that SAGA is converting the third dimension or ignoring it. I am going to look into the code of saga (if it's available somewhere) to make sure about this. – kogexo Jan 18 '18 at 13:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.