Claire,

Your debug paste shows that no features are being processed:

ENCODING = utf-8
query size=0
0 features

I'm not sure whether this is due a problem with extents/projections or perhaps a lurking problem with the PPC endian bug/fix you previously experienced.

I downloaded the shapefile, noted that is seems to be in this projection: http://www.spatialreference.org/ref/epsg/54004/ and then ran your XML map (with a few changes to the rgb code and srs settings) with this script:

#!/usr/bin/env python
from mapnik import *
mapfile = "boundaries.xml"
m = Map(1400, 600)
load_map(m, mapfile)
bbox = Envelope(Coord(-20037400.000000, -19929239.110000), Coord(20037400.000000, 18375854.709643))
m.zoom_to_box(bbox)
render_to_file(m, 'world.png', 'png')

and here's the XML:

<Map bgcolor="steelblue" srs="+proj=merc +lon_0=0 +k=1 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs">
 <Style name="world-1">
   <Rule>
     <MaxScaleDenominator>250000000000</MaxScaleDenominator>
     <MinScaleDenominator>6000000</MinScaleDenominator>
     <PolygonSymbolizer>
       <CssParameter name="fill">#f2eff9</CssParameter>
     </PolygonSymbolizer>
     <LineSymbolizer>
       <CssParameter name="stroke">blue</CssParameter>
       <CssParameter name="stroke-width">0.5</CssParameter>
     </LineSymbolizer>
   </Rule>
 </Style>
 <Layer name="world-1" status="on">
   <StyleName>world-1</StyleName>
   <Datasource>
     <Parameter name="type">shape</Parameter>
     <Parameter name="file">world_boundaries_m</Parameter>
   </Datasource>
 </Layer>
</Map>

I get a correctly rendered map back (small graphic attached). Debug output below...


Dane





[The attachment Picture 1.png has been manually removed]




# Debug output #

springmeyer:world_boundaries spring$ python draw_world.py ; open world.png
registered datasource : gdal
registered datasource : postgis
registered datasource : raster
registered datasource : shape
size = 2
file=world_boundaries_m
type=shape
Envelope(-20037400,-19929239.11,20037400,18375854.70964293)
file_length=3334676
shape_type=5
datasource=0x32ab00 type=1
scale=63841.8
start map processing bbox = Envelope (-44689276.12291683,-19929239.11,44689276.12291683,18375854.709643)
scale denominator = 2.28007e+08
start layer processing : world-1
datasource = 0x32ab00
ENCODING = utf-8
query size=3807
3807 features
end layer processing
end map processing
2.70 s

destroyed singleton
destroyed singleton
destroyed singleton





On May 7, 2008, at 4:29 PM, Claire McLister wrote:

Thanks. Sorry for being so obtuse, but after a day of struggling with
this, I am still unable to understand what's going on. I am trying a
simple case starting from the getting started with XML guide, and
hoping to use the world_boundaries_m shape file.

I am able to get the map from the world_borders file, but not from the
world_boundaries_m file that is in the OSM/Mapnik rendering guide.

Here's the XML file:

<Map bgcolor="steelblue" 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 [EMAIL PROTECTED]
+no_defs +over">
 <Style name="world-1">
   <Rule>
     <MaxScaleDenominator>250000000000</MaxScaleDenominator>
     <MinScaleDenominator>6000000</MinScaleDenominator>
     <PolygonSymbolizer>
       <CssParameter name="fill">#f2eff9</CssParameter>      </
PolygonSymbolizer>
     <LineSymbolizer>
       <CssParameter name="stroke">rgb(0.5,0.5,0.5)</CssParameter>
       <CssParameter name="stroke-width">0.5</CssParameter>
     </LineSymbolizer>
   </Rule>
 </Style>
 <Layer name="world-1" status="on" srs="+proj=merc +datum=WGS84
+over">
   <StyleName>world-1</StyleName>
   <Datasource>
     <Parameter name="type">shape</Parameter>
     <Parameter name="file">/Users/mclister/OSM/mapnik/
world_boundaries/world_boundaries_m</Parameter>
   </Datasource>
 </Layer>
</Map>

I use this to try to get the map to draw for the same bounding box:
ll = (-154.07, 10.66, -52.47, 57.98)

All I'm getting is a blank image.

Here's the mapnik debug output:

file=/Users/mclister/OSM/mapnik/world_boundaries/world_boundaries_m
type=shape
Envelope(-20037400,-19929239.11,20037400,18375854.70964293)
file_length=3334676
shape_type=5
datasource=0x54d530
type=1
scale=11310.1
start map processing
bbox
=
Envelope
(-17150993.94651966
,-1076685.582020581,-5840933.681923064,10233374.68257601)
scale denominator = 4.03931e+07
start layer processing : world-1
datasource = 0x54d530
ENCODING = utf-8
query size=0
0 features
end layer processing
end map processing
0.01 s


On May 6, 2008, at 2:57 PM, Martijn van Oosterhout wrote:
On Tue, May 6, 2008 at 8:20 PM, Claire McLister <[EMAIL PROTECTED]
wrote:
The result of generate-image.py with a 1000x1000 pixel image of the
area
for

ll = (-154.07, 10.66, -52.47, 57.98)

is located at: http://dev.zeesource.net/image.png

The background color is: #b5d0d0 and the coast-line fill color is
#5481fb

I would think the region is big enough?

Sure, it will have a scaledenominator of a few million I guess, and
you have

 <MaxScaleDenominator>600000</MaxScaleDenominator>

And so it won't draw anything. At that scale it will use the other
shapefiles...

Have a nice day,
--
Martijn van Oosterhout <[EMAIL PROTECTED]> http://svana.org/kleptog/

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


On May 7, 2008, at 4:29 PM, Claire McLister wrote:

Thanks. Sorry for being so obtuse, but after a day of struggling with
this, I am still unable to understand what's going on. I am trying a
simple case starting from the getting started with XML guide, and
hoping to use the world_boundaries_m shape file.

I am able to get the map from the world_borders file, but not from the
world_boundaries_m file that is in the OSM/Mapnik rendering guide.

Here's the XML file:

 <Map bgcolor="steelblue" 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 [EMAIL PROTECTED]
+no_defs +over">
  <Style name="world-1">
    <Rule>
      <MaxScaleDenominator>250000000000</MaxScaleDenominator>
      <MinScaleDenominator>6000000</MinScaleDenominator>
      <PolygonSymbolizer>
        <CssParameter name="fill">#f2eff9</CssParameter>      </
PolygonSymbolizer>
      <LineSymbolizer>
        <CssParameter name="stroke">rgb(0.5,0.5,0.5)</CssParameter>
        <CssParameter name="stroke-width">0.5</CssParameter>
      </LineSymbolizer>
    </Rule>
  </Style>
  <Layer name="world-1" status="on" srs="+proj=merc +datum=WGS84
+over">
    <StyleName>world-1</StyleName>
    <Datasource>
      <Parameter name="type">shape</Parameter>
      <Parameter name="file">/Users/mclister/OSM/mapnik/
world_boundaries/world_boundaries_m</Parameter>
    </Datasource>
  </Layer>
</Map>

I use this to try to get the map to draw for the same bounding box:
ll = (-154.07, 10.66, -52.47, 57.98)

All I'm getting is a blank image.

Here's the mapnik debug output:

file=/Users/mclister/OSM/mapnik/world_boundaries/world_boundaries_m
type=shape
Envelope(-20037400,-19929239.11,20037400,18375854.70964293)
file_length=3334676
shape_type=5
datasource=0x54d530
type=1
scale=11310.1
start map processing
bbox
=
Envelope
(-17150993.94651966
,-1076685.582020581,-5840933.681923064,10233374.68257601)
scale denominator = 4.03931e+07
start layer processing : world-1
datasource = 0x54d530
ENCODING = utf-8
query size=0
0 features
end layer processing
end map processing
0.01 s


On May 6, 2008, at 2:57 PM, Martijn van Oosterhout wrote:
On Tue, May 6, 2008 at 8:20 PM, Claire McLister <[EMAIL PROTECTED]
wrote:
The result of generate-image.py with a 1000x1000 pixel image of the
area
for

ll = (-154.07, 10.66, -52.47, 57.98)

is located at: http://dev.zeesource.net/image.png

The background color is: #b5d0d0 and the coast-line fill color is
#5481fb

I would think the region is big enough?

Sure, it will have a scaledenominator of a few million I guess, and
you have

  <MaxScaleDenominator>600000</MaxScaleDenominator>

And so it won't draw anything. At that scale it will use the other
shapefiles...

Have a nice day,
--
Martijn van Oosterhout <[EMAIL PROTECTED]> http://svana.org/kleptog/

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

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

Reply via email to