I was wondering if anyone could shed a light on why this behavior is happening in QGIS?

alt text

I'm pretty confident that the issue here is not due to centroids within polygon.


Added a detailed image

alt text

  • is there multipolygons or geometry collections that might be spread from eachother. as it looks, that explanation would not make sense if the image show the whole dataset though. – Nicklas Avén Nov 18 '10 at 20:16
  • @Nicklas Avén - I just added another image – dassouki Nov 18 '10 at 20:25
  • 4
    It looks like a projection issue to me. Does the polygon layer have a projection defined? Can you provide more detail on the projection of the polygon layer, the projection for the QGIS data frame, whether you have 'On the fly reprojection' turned on? – Sean Nov 18 '10 at 20:47
  • Could you share a data sample? – underdark Nov 19 '10 at 8:20

QGIS does not reproject data on the fly automatically. It's not unusual to have a Coordinate Reference System (CRS) defined for a project and have data added to the map with a different projection that displays but has not been transformed to the CRS of the map. If the CRS of the map and the CRS of the data are close enough, the data will display but be in a slightly different position.

Your centroids and polygons are in different CRSs. The solution is to either:

  • project one of the datasets into the same CRS as the other or
  • check the "Enable 'on the fly' CRS transformation" box on Coordinate Reference System (CRS) tab of the Project Properties window.

Be aware that the second option does not affect your data, it only projects it for the display. The underlying data is not changed.


You just need a new QGis plugin to create polygon centroids, you can check out "Centroid Maker" from here

edit: It is more efficient/accurate for the problem of "island" geometries, which confuses traditional centroids makers.

  • how is it different, better, or worse than the QGIS one (aka cfarmer's one)? – dassouki Nov 19 '10 at 14:48

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.