1

I'm trying to calculate the average house price within different sized buffers using MapInfo.

I have thousands of properties on my map as points (in one layer) and around 60 different sized buffers. Individually I can click each buffer using the boundary select, and then open the statistics tab and manually write down the number of points within the buffer and the average price.

But it's extremely slow, is there an export tool that will allow me to export the statistics tab figures into a table, for all 60 buffers?

1

You can use SQL to calculate these values for all 60 buffers.

You basically need to join the two tables using a spatial condition and aggregate the number of points and the average values.

You also need to group the result by an ID of the buffer, so they need to have been assigned unique IDs

The query can look like this:

Select BUFFERS.ID, Count(*) "Num_Houses", Avg(HOUSEPRICE.VALUE) "AVG_HousePrice"
From BUFFERS, HOUSEPRICE
Where BUFFERS.OBJ Contains HOUSEPRICE.OBJ
Group By BUFFERS.ID 

Copy it and run it via the MapBasic window. Do remember to change the table and column names to match your names.

You can also run it via the SQL Select dialog: enter image description here

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.