generate_image.py - blank image with custom XML

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

generate_image.py - blank image with custom XML

Styp

Hi,

I'm working on a custom xml to work with a navteq dataset. But I'm already
struggling with getting any kind of data visualized by rendering with
mapnik2.

my Layer specification looks like this:

<Layer name="myLayer" status="on" srs="+init=epsg:4326">
    <StyleName>myLayer_style</StyleName>
    <Datasource>
      <Parameter name="table">
        (select the_geom, 'true' as "water", polygon_nm as "name"
      from waterseg )
        as myLayer
</Parameter>
      <!--
Settings for your postgres setup.

Note: feel free to leave password, host, port, or use blank
-->

<Parameter name="type">postgis</Parameter>
<Parameter name="password"/>
<Parameter name="host"/>
<Parameter name="port"/>
<Parameter name="user">postgres</Parameter>
<Parameter name="dbname">navteq_static</Parameter>
<!-- this should be 'false' if you are manually providing the 'extent' -->
<Parameter name="estimate_extent">false</Parameter>
<!-- manually provided extent in epsg 900913 for whole globe -->
<!-- providing this speeds up Mapnik database queries -->
<!-- <Parameter
name="extent">-20037508,-19929239,20037508,19929239</Parameter> -->
<Parameter name="extent">5.95, 45.86, 10.48, 47.75</Parameter>
    </Datasource>
</Layer>

and the stylesheet is very simple. I'd like to see anykind of result before
messing around with the parameters!

<Style name="myLayer_style">
    <Rule>
      <Filter>[water]='true'</Filter>
      <MaxScaleDenominator>250000000000</MaxScaleDenominator>
      <MinScaleDenominator>2500</MinScaleDenominator>
      <LineSymbolizer stroke="#b5d0d0" stroke-width="5.0"/></Rule>
</Style>

My geometries are in EPSG:4326

Thank you!
Martin
--
View this message in context: http://old.nabble.com/generate_image.py---blank-image-with-custom-XML-tp33008667p33008667.html
Sent from the Mapnik - Users mailing list archive at Nabble.com.

_______________________________________________
Mapnik-users mailing list
[hidden email]
https://lists.berlios.de/mailman/listinfo/mapnik-users
Reply | Threaded
Open this post in threaded view
|

Re: generate_image.py - blank image with custom XML

Dane Springmeyer
Hi Martin,

We now use Google groups for the mailing list: http://mapnik.org/contact/

This one is retired, so please post to the new list.

But, a hint would be to use nik2img.py to test rendering. generate_image.py is hardcoded to zoom to Britain and may not be a proper way to display your own data in a custom projection. Also, try removing the Min/Max 'ScaleDenominator' limitation.

Dane

On Dec 20, 2011, at 2:26 AM, Styp wrote:

>
> Hi,
>
> I'm working on a custom xml to work with a navteq dataset. But I'm already
> struggling with getting any kind of data visualized by rendering with
> mapnik2.
>
> my Layer specification looks like this:
>
> <Layer name="myLayer" status="on" srs="+init=epsg:4326">
>    <StyleName>myLayer_style</StyleName>
>    <Datasource>
>      <Parameter name="table">
> (select the_geom, 'true' as "water", polygon_nm as "name"
>      from waterseg )
> as myLayer
> </Parameter>
>      <!--
> Settings for your postgres setup.
>
> Note: feel free to leave password, host, port, or use blank
> -->
>
> <Parameter name="type">postgis</Parameter>
> <Parameter name="password"/>
> <Parameter name="host"/>
> <Parameter name="port"/>
> <Parameter name="user">postgres</Parameter>
> <Parameter name="dbname">navteq_static</Parameter>
> <!-- this should be 'false' if you are manually providing the 'extent' -->
> <Parameter name="estimate_extent">false</Parameter>
> <!-- manually provided extent in epsg 900913 for whole globe -->
> <!-- providing this speeds up Mapnik database queries -->
> <!-- <Parameter
> name="extent">-20037508,-19929239,20037508,19929239</Parameter> -->
> <Parameter name="extent">5.95, 45.86, 10.48, 47.75</Parameter>
>    </Datasource>
> </Layer>
>
> and the stylesheet is very simple. I'd like to see anykind of result before
> messing around with the parameters!
>
> <Style name="myLayer_style">
>    <Rule>
>      <Filter>[water]='true'</Filter>
>      <MaxScaleDenominator>250000000000</MaxScaleDenominator>
>      <MinScaleDenominator>2500</MinScaleDenominator>
>      <LineSymbolizer stroke="#b5d0d0" stroke-width="5.0"/></Rule>
> </Style>
>
> My geometries are in EPSG:4326
>
> Thank you!
> Martin
> --
> View this message in context: http://old.nabble.com/generate_image.py---blank-image-with-custom-XML-tp33008667p33008667.html
> Sent from the Mapnik - Users mailing list archive at Nabble.com.
>
> _______________________________________________
> Mapnik-users mailing list
> [hidden email]
> https://lists.berlios.de/mailman/listinfo/mapnik-users

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