I'm currently trying to create polygons that represent the areas surrounded by roads. The roads are stored in PostGIS as points / lines so I have flexibility over what I can do with them.
I'm basically trying to turn the white areas of this example line output into polygons:
Any ideas?
Here is the PostGIS to achieve this (assuming you have a road table full of lines):
SELECT (ST_Dump(ST_Polygonize(roads.geom))).geom AS the_geom FROM
(SELECT ST_Transform(ST_SetSRID(geom, 27700), 4326) AS geom FROM road_lines) AS roads