Distance Measure using QGIS Field Calculator?

A QGIS newbie who can't for the life of them work out the expression needed to represent distance from a point.

I want to show how a walkable a neighbourhood is. I need do to this by showing what areas are zoned residential and within 500m of parks and transport.

I have a map of a city and I want to show which areas are walkable (i.e close to parks and transport) both Parks and Transport land use has been identified show its just about showing which residential areas are within 500m of a park or transport.

I am following the second half of this tutorial (http://docs.aurin.org.au/tutorials-and-use-cases/abpl90366-urban-informatics-tutorials/geodesign-density-and-constraints/)

Almost every expression in geometry has given me an error!

Sorry! This what I've tried

CASE WHEN "MB_CAT11" ='Residential' >= 400m from 'Transport' THEN 0 END

• Welcome to GIS SE! As a new user please take the Tour. You say that "Almost every expression in geometry has given me an error!" so to understand why that might be I think your first step should be to edit your question to include a precise description of just one such expression and the error you received when running it.
– PolyGeo
Oct 18, 2015 at 0:07
• Something to be aware of is that precisely what you did should be included in your question because many potential answerers do not follow links to try and reconstruct what you may have done.
– PolyGeo
Oct 18, 2015 at 1:27

In GIS, we often do two types of queries: attribute queries and spatial queries. An attribute query is where you select certain records based on a nonspatial column, which is what you are trying to do with the first part of your query, `"MB_CAT11" ='Residential'`. A spatial query is where you select certain records based on a spatial relationship between the record's geometry (including its location) and geometries of the same or a different dataset. This is the second part of your query, where you are trying to select "areas" (not clear what these areas represent) that are within 500m of parks and transport.
Note that this is fairly straightforward, and can be accomplished, as indicated in the tutorial, by going to the `Vector→Spatial Query` menu (but note that Spatial Query is a plugin and therefore this tutorial is presuming, perhaps from earlier instructions, that the plugin is installed and enabled). It can also be accomplished in code, but not in the manner you are attempting. It requires the use of spatial SQL (such as the `ST_DWithin()` function).