1

Ultimately I would like to automate the process of generating clusters from points (representing buildings and amenities within a neighbourhood), and placing points at street intersections which are nearest the centres of the clusters. The data would imported from OSM, which represent buildings, amenities and other desired data. I am not sure which workflow is best, of QGIS, FME, or with Python (or a combination of).

The simplified workflow would be as follows;

  1. Importing data from OSM, which are points representing buildings and amenities in a neighbourhood
  2. Creating a grid overlaying the points.
  3. Counting the points in each section of the grid
  4. Slightly move the grid, first in the x then y direction
  5. Repeat step 3 and 4 (similar idea to a for loop in Python); this is to catch "stray points", or to verify the existence of clusters.
  6. Over the series of loops, determine which sections of the grid have the greatest number of points
  7. Place points at street intersections nearest the centre of clusters with greatest weight.

Another thing I would like to implement is an option to toggle OSM tags to be included in the points, such as amenity or tourism, but I'm not sure how to implement that as well.

So far I have been using mostly FME (and QGIS to generate shape boundary of the neighbourhood to test). My current issues are that I am not sure how to implement a looping system and counting system, as well as isolating each section in a grid. I have used NeighborhoodAggregator, but I am struggling a bit with counting points in each section of a grid, and I find that there is no way to move the grid around, and I don't know if it's possible to do a for loop.enter image description here

If there is a better set of components to use in FME, or if this task is better suited to either QGIS or with Python, then I would be interested to know.

I am new to spatial analysis, and I have used FME because I have heard it is good for cleaning data regarding spatial analysis. The reason I ask is that while I have started this project using FME, I have noticed questions regarding automation being asked in the context of QGIS.

1 Answer 1

0

Interesting question. In FME, there are often multiple transformers that can carry out a certain task, and that is true here. The PointOnAreaOverlayer transformer is the most obvious one, but you can also get similar results with the Clipper, the SpatialFilter, or the SpatialRelator.

The PointOnAreaOverlayer is probably the most suited. It counts the number of overlaps directly. The others will merge attributes and you'd have to count them next. So PointOnAreaOverlayer.

As to looping and moving the grid... well, there are two methods there too. Either you add a loop to your workspace (it has to be inside a custom transformer) or you use a two-workspace solution, where a parent workspace moves the grid and passes it on to the child workspace to process.

I'd go with the second option. I think looping inside a single workspace is fairly complex for a new user to try. The other way is better. You should be able to find examples in articles on the FME Community (community.safe.com) of how it works.

Having said all that, are you sure that this is the best method of creating clustering information? I don't think I've seen it done like that before. I think FME is probably the best solution to the steps you've outlined, but a true GIS tool like QGIS might have spatial clustering functionality built directly into it.

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.