I discovered why WMS as 4326 was slower than WMS as 900913.

The processed_p.shp shape file which I had converted to 4326 was slowing
down the rendering.

Once I had the coast-poly layer point to original shape file instead of the
4326 shape file then it comes back just as fast in fact at world to medium
scale it comes back faster because the shoreline_300_4326.shp is faster than
shoreline_300.shp.
I have copied the referenced areas with the before version commented out:

John

<Layer name="world" status="on" srs="+proj=longlat +ellps=WGS84 +datum=WGS84
+no_defs">
    <StyleName>world</StyleName>
    <Datasource>
      <Parameter name="type">shape</Parameter>
      <Parameter
name="file">c:/mapnik_0_6_1/world_boundaries/shoreline_300_4326</Parameter>
    </Datasource>
</Layer>
<Layer name="coast-poly" status="on" srs="+proj=merc +a=6378137 +b=6378137
+lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgri...@null
+no_defs +over">
    <StyleName>coast-poly</StyleName>
    <Datasource>
      <Parameter name="type">shape</Parameter>
      <Parameter
name="file">c:/mapnik_0_6_1/world_boundaries/processed_p</Parameter>
    </Datasource>
</Layer>
<!--
<Layer name="coast-poly" status="on" srs="+proj=longlat +ellps=WGS84
+datum=WGS84 +no_defs">
    <StyleName>coast-poly</StyleName>
    <Datasource>
      <Parameter name="type">shape</Parameter>
      <Parameter
name="file">c:/mapnik_0_6_1/world_boundaries/processed_p_4326</Parameter>
    </Datasource>
</Layer>
-->

On Sun, Nov 8, 2009 at 6:55 PM, John Mitchell <[email protected]>wrote:

> Actually I did import my data with "osm2pgsl -l" and I also reprojected 2
> out of 3 shape files from 900913 to 4326 using OGR2OGR.
>
> John
>
>
> On Sun, Nov 8, 2009 at 5:59 PM, Frederik Ramm <[email protected]> wrote:
>
>> John,
>>
>>
>> John Mitchell wrote:
>>
>>> When using Mapnik WMS using the ogcserver component with WSGI as a
>>> standalone server why is 900913 (Spherical Mercator) projection faster than
>>> 4326 (WGS84) projection for displaying data?
>>>
>>
>> This is not generally the case. The general rule ist that something where
>> Mapnik has to do a reprojection is slower than something where it doesn't.
>> So if you have imported OSM data with osm2pgsl without any extra flags then
>> you have 900913 projected data in the database and it does not have to be
>> reprojected.
>>
>> For the fastest 4326 results, import your data with "osm2pgsl -l".
>>
>> Bye
>> Frederik
>>
>> --
>> Frederik Ramm  ##  eMail [email protected]  ##  N49°00'09" E008°23'33"
>>
>
>
>
> --
> John J. Mitchell
>



-- 
John J. Mitchell
_______________________________________________
Mapnik-users mailing list
[email protected]
https://lists.berlios.de/mailman/listinfo/mapnik-users

Reply via email to