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.
-
1Did you try using the Save As... option on the points layer and saving it with the same CRS as your polygon layer?Joseph– Joseph2015年10月19日 13:00:36 +00:00Commented Oct 19, 2015 at 13:00
-
2Sounds 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– Generic Wevers2015年10月19日 13:05:35 +00:00Commented Oct 19, 2015 at 13:05
-
1Thanks Joseph and Generic. I have set the CRS and it the points layer has been aligned with the polygons. Thanks guys.mapperx– mapperx2015年10月19日 13:11:22 +00:00Commented Oct 19, 2015 at 13:11
-
@mapperx - Glad you got it working buddy!Joseph– Joseph2015年10月19日 13:18:55 +00:00Commented Oct 19, 2015 at 13:18
-
@GenericMilitzer - Post an answer buddy, I will upvote it :)Joseph– Joseph2015年10月19日 13:19:13 +00:00Commented Oct 19, 2015 at 13:19
2 Answers 2
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.
- Check if your polygon file has a CRS at all
- If 1. is true, check if your QGIS project set to the same CRS
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.
-
1Just 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– Joseph2015年10月19日 13:38:52 +00:00Commented Oct 19, 2015 at 13:38