[Tilecache] ECW or TIFF to Tiles

Dane Springmeyer blake at hailmail.net
Mon Nov 2 13:30:23 EST 2009


Tyler,

You should post questions specific to Mapnik to the mapnik-users list.  
I'd recommend getting things to render first using something like  
nik2img.py.

But, at least one error below is that you need to attach a  
RasterSymbolizer to a raster type layer, so create a new style like:

<Style name="raster">
   <Rule>
     <RasterSymbolizer />
   </Rule>
</Style>

And attach that to your raster layer.

Dane

On Nov 2, 2009, at 9:59 AM, Tyler Durden wrote:

> Hi,
> I've tried the gdaltindex and created a shapefile, but the tiff  
> doesn't appear.
> I've tried two approaches, gdal and shape, in both only appears the
> border of the style.
> Any idea what I'm doing wrong?
>
> <?xml version="1.0" encoding="utf-8"?>
> <!DOCTYPE Map>
> <Map bgcolor="steelblue" srs="+proj=latlong +datum=WGS84">
>  <Style name="nw_border">
>    <Rule>
>      <LineSymbolizer>
>        <CssParameter name="stroke">#ab9f8a</CssParameter>
>        <CssParameter name="stroke-width">1</CssParameter>
>        <CssParameter name="stroke-linejoin">round</CssParameter>
>        <CssParameter name="stroke-linecap">round</CssParameter>
>      </LineSymbolizer>
>    </Rule>
>  </Style>
>
>  <Layer name="po" status="on" srs="+proj=latlong +datum=WGS84">
>    <StyleName>nw_border</StyleName>
>    <Datasource>
>      <Parameter name="type">shape</Parameter>
>      <Parameter
> name="file">/home/tyler/Projects/Python/tile_tests/shapes/ortho.shp</ 
> Parameter>
>    </Datasource>
>  </Layer>
>
>  <Layer name="pogdal" status="on">
>    <StyleName>nw_border</StyleName>
>    <Datasource>
>      <Parameter name="type">gdal</Parameter>
>      <Parameter
> name="file">/home/tyler/Projects/Python/tile_tests/tiffs/044374.tif</ 
> Parameter>
>      <Parameter name="format">tiff</Parameter>
>    </Datasource>
>  </Layer>
> </Map>
>
> On Mon, Nov 2, 2009 at 4:35 PM, Jeffrey Johnson <ortelius at gmail.com>  
> wrote:
>> This would be most easily accomplished with Mapserver and by using
>> gdaltindex to generate a tile index.
>>
>> http://www.gdal.org/gdaltindex.html
>>
>> On Mon, Nov 2, 2009 at 8:33 AM, Tyler Durden  
>> <tylersticky at gmail.com> wrote:
>>> Thanks for the tip.
>>> One question, the example on the page is for one tiff, how can I
>>> accomplish with multiple tiffs?
>>> I've got to add one by one?
>>> Right now I have the TIFF files with one .tfw file with metadata,  
>>> I've
>>> got to add all of them?
>>>
>>> Thanks
>>>
>>> On Mon, Nov 2, 2009 at 4:25 PM, Dane Springmeyer  
>>> <blake at hailmail.net> wrote:
>>>> Use the Mapnik GDAL driver and a RasterSymbolizer:
>>>> http://trac.mapnik.org/wiki/RasterSymbolizer
>>>>
>>>> However, be aware that Mapnik does not support reprojection of  
>>>> Rasters, so
>>>> you'll need to use gdalwarp to project them into your target  
>>>> projection
>>>> first.
>>>>
>>>> If you need complex stylization of the rasters or on-the-fly  
>>>> reprojection
>>>> I'd recommend MapServer.
>>>>
>>>> Dane
>>>>
>>>> On Nov 2, 2009, at 7:58 AM, Tyler Durden wrote:
>>>>
>>>>> Hi all,
>>>>> Right now I'm using TileCache + Mapnik for my vector data.
>>>>> But now, I have various orthos in ECW or TIFF format that I want  
>>>>> to
>>>>> make tiles and serve with TileCache.
>>>>> I'm kind of lost how I accomplish this.
>>>>> Someone can point me directions?
>>>>>
>>>>> Thanks
>>>>> _______________________________________________
>>>>> Tilecache mailing list
>>>>> Tilecache at openlayers.org
>>>>> http://openlayers.org/mailman/listinfo/tilecache
>>>>
>>>>
>>> _______________________________________________
>>> Tilecache mailing list
>>> Tilecache at openlayers.org
>>> http://openlayers.org/mailman/listinfo/tilecache
>>>
>>
> _______________________________________________
> Tilecache mailing list
> Tilecache at openlayers.org
> http://openlayers.org/mailman/listinfo/tilecache




More information about the Tilecache mailing list