[OSM-dev] osm.xml: r16190 mocks up XML parser/Mapnik?

Tom Hughes tom at compton.nu
Thu Jul 30 16:43:40 BST 2009


On 30/07/09 16:31, Jan-Benedict Glaw wrote:

> The first one is that the SQL is kind of incomplete:
>
> @@ -6990,7 +6990,14 @@
>         <Parameter name="user">postgres</Parameter>
>         <Parameter name="dbname">osm</Parameter>
>         <Parameter name="table">
> -      (select * from planet_osm_line order by z_order) as roads
> +      (select way,highway,aeroway,railway,layer,horse,bicycle,foot,bridge
> +       from planet_osm_line
> +       where (highway is not null
> +              or aeroway in ('runway','taxiway')
> +              or railway in ('light_rail','subway'))
> +         and bridge not in ('no','false','0')
> +       order by z_order
> +      ) as roads
>
> The last "and bridge not in (...)" should be guarded with a NULL check
> for bridge:
>
> 	and (bridge is null or bridge not in ('no','false','0'))
>
> This was checked by manually issueing the SQL to psql, which now
> outputted a lot more:)

You haven't said which layer that is, but it looks like it is a layer 
that is only supposed to be selecting bridges in which case your fix is 
wrong as it will cause it to select things with no bridge tag.

Tom

-- 
Tom Hughes (tom at compton.nu)
http://www.compton.nu/




More information about the dev mailing list