Hi,

I experimenting with different ways of calling some layers within my
osm_4326.xml (map) file to see if I can get better performance for the
"minor-roads-fill" open street map layer.

I have created a materialized view within postgres based on the query that
the osm_4326.xml "minor-roads-fill" layer uses and also a normal view and
also generated a shape file based on the view.  None of the 3 new ways for
the <Datasource> show anything for the "minor-roads-fill" layer.

I have listed below an example where I call the materialized view this one
has the fields listed (I have also tried select *) and below that commented
out is the normal way of calling the <Datasource> which has always worked.

Any ideas why only the "planet_osm_line" table method works?

Thanks,

John

<Layer name="minor-roads-fill" status="on" srs="+proj=longlat +ellps=WGS84
+datum=WGS84 +no_defs">
    <StyleName>minor-roads-fill-links</StyleName>
    <StyleName>minor-roads-fill</StyleName>
    <Datasource>
      <Parameter name="type">postgis</Parameter>
      <Parameter name="user">postgres</Parameter>
      <Parameter name="password">postgres</Parameter>
      <Parameter name="dbname">osm_4326</Parameter>
      <Parameter name="table">
      (select
way,highway,horse,bicycle,foot,construction,railway,aeroway,service,tunnel,bridge
from minor_roads_fill_mv) as roads
      </Parameter>
      <Parameter name="estimate_extent">false</Parameter>
      <Parameter
name="extent">-20037508,-19929239,20037508,19929239</Parameter>
    </Datasource>
</Layer>

<!--
<Layer name="minor-roads-fill" status="on" srs="+proj=longlat +ellps=WGS84
+datum=WGS84 +no_defs">
    <StyleName>minor-roads-fill-links</StyleName>
    <StyleName>minor-roads-fill</StyleName>
    <Datasource>
      <Parameter name="type">postgis</Parameter>
      <Parameter name="user">postgres</Parameter>
      <Parameter name="password">postgres</Parameter>
      <Parameter name="dbname">osm_4326</Parameter>
      <Parameter name="table">
      (select
way,highway,horse,bicycle,foot,construction,railway,aeroway,service,
       case when tunnel in ('yes','true','1') then 'yes'::text else tunnel
end as tunnel,
       case when bridge in ('yes','true','1') then 'yes'::text else bridge
end as bridge
       from planet_osm_line
       where highway is not null
          or aeroway in ('runway','taxiway')
          or railway in
('light_rail','narrow_gauge','funicular','rail','subway','tram','spur','siding','platform')
       order by z_order) as roads
      </Parameter>
      <Parameter name="estimate_extent">false</Parameter>
      <Parameter
name="extent">-20037508,-19929239,20037508,19929239</Parameter>
    </Datasource>
</Layer>
-->
_______________________________________________
Mapnik-users mailing list
[email protected]
https://lists.berlios.de/mailman/listinfo/mapnik-users

Reply via email to