systemapic / pile

PostGIS tile server
0 stars 2 forks source link

Provide a script to dump Mapnik configuration of a layer #22

Open strk opened 8 years ago

strk commented 8 years ago

It is useful for debugging to have a script that given a layer (UUID?) dumps the corresponding XML passed to mapnik for rendering.

Having such script would allow putting the XML in a standalone file and trying the mapnik tools for rendering it.

Or is a similar script already existing ?

knutole commented 8 years ago

There is currently no such script, but added simple console.log and dumping to /pile/tmp/layer_id-randomuuid.debug.xml (see here)

Currently yields:

<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE Map[]>
<Map srs="+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0.0 +k=1.0 +units=m +nadgrids=@null +wktext +no_defs +over">

<Style name="layer" filter-mode="first">
  <Rule>
    <RasterSymbolizer opacity="1" />
  </Rule>
</Style>
<Layer name="layer"
  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 +nadgrids=@null +wktext +no_defs +over">
    <StyleName>layer</StyleName>  </Layer>

</Map>