unwanted clipping with WGS84 projection?

54 views
Skip to first unread message

Abe Rodriguez

unread,
Oct 17, 2012, 2:34:15 PM10/17/12
to tiles...@googlegroups.com
I've been banging my head for a week and really hope someone is able to help me with this:

I've imported natural earth data in Postgres. I can render a simple world map with Mapnik (see attached). When I view this using a very simple page with OpenLayers using the XYZ layer pointing to my TileStache instance, But alas, the poor folks in Africa get cut out of the map! I'd like to use an unprojected map (WGS84). My config file is:
{
  "cache": {"name": "Test"},
  "logging":"debug",
  "layers": 
  {
    "world":
    {
        "provider": {"name": "mapnik", "mapfile": "E:\\geo\\test-data\\world_style.xml"},
"projection":"WGS84"
    } 
  }
}
and my Mapnik XML is:

<Map background-color="steelblue" srs="+proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs" >

  <Style name="My Style">
    <Rule>
      <PolygonSymbolizer fill="#f2eff9" />
      <LineSymbolizer stroke="rgb(50%,50%,50%)" stroke-width="0.1" />
    </Rule>
  </Style>
  <Layer name="land" status="on" srs="+proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs">
 <StyleName>My Style</StyleName>
      <Datasource>
        <Parameter name="type">postgis</Parameter>
        <Parameter name="host">localhost</Parameter>
        <Parameter name="dbname">postgis</Parameter>
        <Parameter name="user">postgres</Parameter>      
        <Parameter name="password">***</Parameter>
<Parameter name="geometry_field">geom</Parameter>
        <Parameter name="table">"10m_land"</Parameter>
      </Datasource>
  </Layer>  
</Map>

Instead of seeing the whole world when I zoom out (see attached), it seems to end tragically in eastern Africa on the right. I'm a total noob at GIS and quite frustrated with this problem. 

Any ideas where I could've gone wrong?
openlayers-full-screen.png
world_style.png
Message has been deleted

Christopher Stevens

unread,
Apr 14, 2013, 12:38:53 AM4/14/13
to tiles...@googlegroups.com
I seem to be running into a very similar situation with my map getting cut off in the same way with same settings. Were you able to figure out what was going on? If so, I'd love to hear how. ;)
Reply all
Reply to author
Forward
0 new messages