2

I have a polygon layer that has plot layouts of an area.enter image description here

I want to create a random point on each polygon. I tried to use the Random points tool (Vector->Research Tool->Random Points) to create the points but its not creating the points directly over the layer. The polygon layer has 1819 polygons. The tool creates the same number of points but at a different location and a different scale. I could have moved the points layer to the right place but the scales do not match so that method would not work. Can anyone help me out or point me in the right direction.

  • 1
    Did you try using the Save As... option on the points layer and saving it with the same CRS as your polygon layer? – Joseph Oct 19 '15 at 13:00
  • 2
    Sounds like your polygon data and the points have different CRS. Does your polygon file have a CRS at all? And if so, is your QGIS project set to the same CRS? – Generic Wevers Oct 19 '15 at 13:05
  • 1
    Thanks Joseph and Generic. I have set the CRS and it the points layer has been aligned with the polygons. Thanks guys. – mapperx Oct 19 '15 at 13:11
  • @mapperx - Glad you got it working buddy! – Joseph Oct 19 '15 at 13:18
  • @GenericMilitzer - Post an answer buddy, I will upvote it :) – Joseph Oct 19 '15 at 13:19
3

As comments could be deleted at a point, here the answer that helped solve the problem:

Sounds like your polygon data and the points have different CRS.

  1. Check if your polygon file has a CRS at all
  2. If 1. is true, check if your QGIS project set to the same CRS
1

The solution was simple. After creating the random points with the tool (Vector->Reearch Tool->RandomPoints). The CRS (Cordinate Reference System) was not set as the same one as the polygon layer. So i just set this by right clicking the new points layer and clicked SET Layer CRS and chose the appropraite one.

  • 1
    Just for future reference, it's normally best to re-save a layer with the new CRS than using the Set Layer CRS option, particularly if you're going to do spatial analysis :) – Joseph Oct 19 '15 at 13:38

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.