 	SELECT 
 		roadsnodeslist.node_id, ST_SetSRID(ST_MakePoint((lon::double precision)/100,(lat::double precision)/100),900913) as geom
 
-	FROM
-		planet_osm_nodes,
-
-		(
-			SELECT DISTINCT
-				node_id
-			FROM
-				roadsnodesinorder
-		) AS roadsnodeslist
-
-		WHERE
-			planet_osm_nodes.id=roadsnodeslist.node_id
-;
-		
+	FROM planet_osm_nodes,
+	     ( SELECT DISTINCT node_id
+	       FROM roadsnodesinorder
+	     ) AS roadsnodeslist
+	WHERE planet_osm_nodes.id=roadsnodeslist.node_id
+;
 
 ALTER TABLE roadsnodesdata ALTER COLUMN node_id SET NOT NULL;
 ALTER TABLE roadsnodesdata ALTER COLUMN geom SET NOT NULL;


CREATE TABLE roadslist AS




	SELECT DISTINCT ON (osm_id)

	FROM roadsnodesinorder
	GROUP BY node_id
	/* bool_or is needed, because we are interested in nodes that are endpoints in *at least one* road */
	/* RKM: Only 1 road_id, so IS the bool_or really needed?? Should be just one node. */
	HAVING COUNT(road_id) = 1 AND bool_or(is_endpoint) IS TRUE

	UNION
