New answers tagged


If you have a PostgreSQL BD with PostGIS, you can do the following query : SELECT a.*, ST_GeneratePoints(b.geom, 1, floor(random() * 5000 + 1)::int) AS new_address_geom FROM addresses a, buildings b WHERE ST_CONTAINS(b.geom, a.geom) ; It generates for each address point a new location within the building ST_GeneratePoints documentation


Probably not as good as the approach offered by @MrXsquared, however, it does not require scripting and purely based on domestic tools&functions. Let's assume we have five features in 'poly_test' (purplish) and ten in 'points' (orange) accordingly, see image below. As you can see there once in a while several point per same location. Here are several ...


Here is how you can do this using a PyQGIS script. Open the Python-Console, copy paste the code, change your settings at the top of the code and hit run. You can also cancel the execution via QGIS-Task-Manger (video showing how to use it) if you want to. See the example-GIF below. Comments in the script explain how it works. ### SETTINGS ### POINT_LAYERNAME =...

Top 50 recent answers are included