ECW or TIFF to Tiles

14 messages Options
Embed this post
Permalink
Tyler Durden

ECW or TIFF to Tiles

Reply Threaded More More options
Print post
Permalink
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
[hidden email]
http://openlayers.org/mailman/listinfo/tilecache
Dane Springmeyer

Re: ECW or TIFF to Tiles

Reply Threaded More More options
Print post
Permalink
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
> [hidden email]
> http://openlayers.org/mailman/listinfo/tilecache

_______________________________________________
Tilecache mailing list
[hidden email]
http://openlayers.org/mailman/listinfo/tilecache
Tyler Durden

Re: ECW or TIFF to Tiles

Reply Threaded More More options
Print post
Permalink
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 <[hidden email]> 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
>> [hidden email]
>> http://openlayers.org/mailman/listinfo/tilecache
>
>
_______________________________________________
Tilecache mailing list
[hidden email]
http://openlayers.org/mailman/listinfo/tilecache
Jeffrey Johnson

Re: ECW or TIFF to Tiles

Reply Threaded More More options
Print post
Permalink
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 <[hidden email]> 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 <[hidden email]> 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
>>> [hidden email]
>>> http://openlayers.org/mailman/listinfo/tilecache
>>
>>
> _______________________________________________
> Tilecache mailing list
> [hidden email]
> http://openlayers.org/mailman/listinfo/tilecache
>
_______________________________________________
Tilecache mailing list
[hidden email]
http://openlayers.org/mailman/listinfo/tilecache
Dane Springmeyer

Re: ECW or TIFF to Tiles

Reply Threaded More More options
Print post
Permalink
In reply to this post by Tyler Durden
If you can either merge all your tiffs into one large file using  
gdal_merge.py or you can use Gdal to build a VRT file and point a  
single Mapnik layer at that VRT:

http://www.gdal.org/gdalbuildvrt.html

Dane


On Nov 2, 2009, at 8:33 AM, Tyler Durden 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  
> <[hidden email]> 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
>>> [hidden email]
>>> http://openlayers.org/mailman/listinfo/tilecache
>>
>>
> _______________________________________________
> Tilecache mailing list
> [hidden email]
> http://openlayers.org/mailman/listinfo/tilecache

_______________________________________________
Tilecache mailing list
[hidden email]
http://openlayers.org/mailman/listinfo/tilecache
Josh Livni

Re: ECW or TIFF to Tiles

Reply Threaded More More options
Print post
Permalink
And if you wanted to skip mapnik, you can also have tilecache just read a GDAL layer directly with it's GDAL driver ... eg 

[mylayer]
type=GDAL
file=/tmp/myimage.tif_or.vrt
spherical_mercator=true
tms_type=google
metatile=yes

As noted before, you need to have your images already transformed to the appropriate projection for your tiles.

 -Josh


On Mon, Nov 2, 2009 at 8:50 AM, Dane Springmeyer <[hidden email]> wrote:
If you can either merge all your tiffs into one large file using
gdal_merge.py or you can use Gdal to build a VRT file and point a
single Mapnik layer at that VRT:

http://www.gdal.org/gdalbuildvrt.html

Dane


On Nov 2, 2009, at 8:33 AM, Tyler Durden 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
> <[hidden email]> 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
>>> [hidden email]
>>> http://openlayers.org/mailman/listinfo/tilecache
>>
>>
> _______________________________________________
> Tilecache mailing list
> [hidden email]
> http://openlayers.org/mailman/listinfo/tilecache

_______________________________________________
Tilecache mailing list
[hidden email]
http://openlayers.org/mailman/listinfo/tilecache


_______________________________________________
Tilecache mailing list
[hidden email]
http://openlayers.org/mailman/listinfo/tilecache
Tyler Durden

Re: ECW or TIFF to Tiles

Reply Threaded More More options
Print post
Permalink
Thanks all.
I will do that.

On Mon, Nov 2, 2009 at 4:56 PM, Josh Livni <[hidden email]> wrote:

> And if you wanted to skip mapnik, you can also have tilecache just read a
> GDAL layer directly with it's GDAL driver ... eg
> [mylayer]
> type=GDAL
> file=/tmp/myimage.tif_or.vrt
> spherical_mercator=true
> tms_type=google
> metatile=yes
> As noted before, you need to have your images already transformed to the
> appropriate projection for your tiles.
>  -Josh
>
> On Mon, Nov 2, 2009 at 8:50 AM, Dane Springmeyer <[hidden email]> wrote:
>>
>> If you can either merge all your tiffs into one large file using
>> gdal_merge.py or you can use Gdal to build a VRT file and point a
>> single Mapnik layer at that VRT:
>>
>> http://www.gdal.org/gdalbuildvrt.html
>>
>> Dane
>>
>>
>> On Nov 2, 2009, at 8:33 AM, Tyler Durden 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
>> > <[hidden email]> 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
>> >>> [hidden email]
>> >>> http://openlayers.org/mailman/listinfo/tilecache
>> >>
>> >>
>> > _______________________________________________
>> > Tilecache mailing list
>> > [hidden email]
>> > http://openlayers.org/mailman/listinfo/tilecache
>>
>> _______________________________________________
>> Tilecache mailing list
>> [hidden email]
>> http://openlayers.org/mailman/listinfo/tilecache
>
>
_______________________________________________
Tilecache mailing list
[hidden email]
http://openlayers.org/mailman/listinfo/tilecache
Tyler Durden

Re: ECW or TIFF to Tiles

Reply Threaded More More options
Print post
Permalink
In reply to this post by Jeffrey Johnson
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 <[hidden email]> 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 <[hidden email]> 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 <[hidden email]> 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
>>>> [hidden email]
>>>> http://openlayers.org/mailman/listinfo/tilecache
>>>
>>>
>> _______________________________________________
>> Tilecache mailing list
>> [hidden email]
>> http://openlayers.org/mailman/listinfo/tilecache
>>
>
_______________________________________________
Tilecache mailing list
[hidden email]
http://openlayers.org/mailman/listinfo/tilecache
Jeffrey Johnson

Re: ECW or TIFF to Tiles

Reply Threaded More More options
Print post
Permalink
It would seem to me that if you are not combining vector data and
raster data into a single tiled layer, then using mapserver as opposed
to mapnik would be the way to go? If mapserver was used, there is no
reason to merge your files or reproject, just let mapserver handle
those things for you.

http://mapserver.org/input/raster.html

What is the projection of the source data, and what projection do you
want the tiles in?

Jeff

On Mon, Nov 2, 2009 at 9:59 AM, Tyler Durden <[hidden email]> 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 <[hidden email]> 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 <[hidden email]> 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 <[hidden email]> 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
>>>>> [hidden email]
>>>>> http://openlayers.org/mailman/listinfo/tilecache
>>>>
>>>>
>>> _______________________________________________
>>> Tilecache mailing list
>>> [hidden email]
>>> http://openlayers.org/mailman/listinfo/tilecache
>>>
>>
> _______________________________________________
> Tilecache mailing list
> [hidden email]
> http://openlayers.org/mailman/listinfo/tilecache
>
_______________________________________________
Tilecache mailing list
[hidden email]
http://openlayers.org/mailman/listinfo/tilecache
Tyler Durden

Re: ECW or TIFF to Tiles

Reply Threaded More More options
Print post
Permalink
Hi,
Right now I'm only trying to use Tilecache + Mapnik and not going for Mapserver.
I'm using WGS84(not projected), at the moment I'm focused only to
render the tiles(I'm not worried about the distortions), in the future
the projection will be in EPSG:900913 (Google Mercator)

Thanks

On Mon, Nov 2, 2009 at 6:10 PM, Jeffrey Johnson <[hidden email]> wrote:

> It would seem to me that if you are not combining vector data and
> raster data into a single tiled layer, then using mapserver as opposed
> to mapnik would be the way to go? If mapserver was used, there is no
> reason to merge your files or reproject, just let mapserver handle
> those things for you.
>
> http://mapserver.org/input/raster.html
>
> What is the projection of the source data, and what projection do you
> want the tiles in?
>
> Jeff
>
> On Mon, Nov 2, 2009 at 9:59 AM, Tyler Durden <[hidden email]> 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 <[hidden email]> 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 <[hidden email]> 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 <[hidden email]> 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
>>>>>> [hidden email]
>>>>>> http://openlayers.org/mailman/listinfo/tilecache
>>>>>
>>>>>
>>>> _______________________________________________
>>>> Tilecache mailing list
>>>> [hidden email]
>>>> http://openlayers.org/mailman/listinfo/tilecache
>>>>
>>>
>> _______________________________________________
>> Tilecache mailing list
>> [hidden email]
>> http://openlayers.org/mailman/listinfo/tilecache
>>
>
_______________________________________________
Tilecache mailing list
[hidden email]
http://openlayers.org/mailman/listinfo/tilecache
Jeffrey Johnson

Re: ECW or TIFF to Tiles

Reply Threaded More More options
Print post
Permalink
Then you will want to use gdaltindex to make the index shapefile and
then use gdal_translate to make one big tiff out of the individual
images. If you want to reproject to 900913 then you will need to use
gdal_translate to do that because mapnik will NOT reproject for you.

Jeff

On Mon, Nov 2, 2009 at 10:22 AM, Tyler Durden <[hidden email]> wrote:

> Hi,
> Right now I'm only trying to use Tilecache + Mapnik and not going for Mapserver.
> I'm using WGS84(not projected), at the moment I'm focused only to
> render the tiles(I'm not worried about the distortions), in the future
> the projection will be in EPSG:900913 (Google Mercator)
>
> Thanks
>
> On Mon, Nov 2, 2009 at 6:10 PM, Jeffrey Johnson <[hidden email]> wrote:
>> It would seem to me that if you are not combining vector data and
>> raster data into a single tiled layer, then using mapserver as opposed
>> to mapnik would be the way to go? If mapserver was used, there is no
>> reason to merge your files or reproject, just let mapserver handle
>> those things for you.
>>
>> http://mapserver.org/input/raster.html
>>
>> What is the projection of the source data, and what projection do you
>> want the tiles in?
>>
>> Jeff
>>
>> On Mon, Nov 2, 2009 at 9:59 AM, Tyler Durden <[hidden email]> 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 <[hidden email]> 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 <[hidden email]> 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 <[hidden email]> 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
>>>>>>> [hidden email]
>>>>>>> http://openlayers.org/mailman/listinfo/tilecache
>>>>>>
>>>>>>
>>>>> _______________________________________________
>>>>> Tilecache mailing list
>>>>> [hidden email]
>>>>> http://openlayers.org/mailman/listinfo/tilecache
>>>>>
>>>>
>>> _______________________________________________
>>> Tilecache mailing list
>>> [hidden email]
>>> http://openlayers.org/mailman/listinfo/tilecache
>>>
>>
>
_______________________________________________
Tilecache mailing list
[hidden email]
http://openlayers.org/mailman/listinfo/tilecache
Jeffrey Johnson

Re: ECW or TIFF to Tiles

Reply Threaded More More options
Print post
Permalink
I've never tried to use the tilecache gdal_driver with an
indexshapefile, but that may work too.

On Mon, Nov 2, 2009 at 10:28 AM, Jeffrey Johnson <[hidden email]> wrote:

> Then you will want to use gdaltindex to make the index shapefile and
> then use gdal_translate to make one big tiff out of the individual
> images. If you want to reproject to 900913 then you will need to use
> gdal_translate to do that because mapnik will NOT reproject for you.
>
> Jeff
>
> On Mon, Nov 2, 2009 at 10:22 AM, Tyler Durden <[hidden email]> wrote:
>> Hi,
>> Right now I'm only trying to use Tilecache + Mapnik and not going for Mapserver.
>> I'm using WGS84(not projected), at the moment I'm focused only to
>> render the tiles(I'm not worried about the distortions), in the future
>> the projection will be in EPSG:900913 (Google Mercator)
>>
>> Thanks
>>
>> On Mon, Nov 2, 2009 at 6:10 PM, Jeffrey Johnson <[hidden email]> wrote:
>>> It would seem to me that if you are not combining vector data and
>>> raster data into a single tiled layer, then using mapserver as opposed
>>> to mapnik would be the way to go? If mapserver was used, there is no
>>> reason to merge your files or reproject, just let mapserver handle
>>> those things for you.
>>>
>>> http://mapserver.org/input/raster.html
>>>
>>> What is the projection of the source data, and what projection do you
>>> want the tiles in?
>>>
>>> Jeff
>>>
>>> On Mon, Nov 2, 2009 at 9:59 AM, Tyler Durden <[hidden email]> 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 <[hidden email]> 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 <[hidden email]> 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 <[hidden email]> 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
>>>>>>>> [hidden email]
>>>>>>>> http://openlayers.org/mailman/listinfo/tilecache
>>>>>>>
>>>>>>>
>>>>>> _______________________________________________
>>>>>> Tilecache mailing list
>>>>>> [hidden email]
>>>>>> http://openlayers.org/mailman/listinfo/tilecache
>>>>>>
>>>>>
>>>> _______________________________________________
>>>> Tilecache mailing list
>>>> [hidden email]
>>>> http://openlayers.org/mailman/listinfo/tilecache
>>>>
>>>
>>
>
_______________________________________________
Tilecache mailing list
[hidden email]
http://openlayers.org/mailman/listinfo/tilecache
Dane Springmeyer

Re: ECW or TIFF to Tiles

Reply Threaded More More options
Print post
Permalink
In reply to this post by Tyler Durden
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 <[hidden email]>  
> 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  
>> <[hidden email]> 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  
>>> <[hidden email]> 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
>>>>> [hidden email]
>>>>> http://openlayers.org/mailman/listinfo/tilecache
>>>>
>>>>
>>> _______________________________________________
>>> Tilecache mailing list
>>> [hidden email]
>>> http://openlayers.org/mailman/listinfo/tilecache
>>>
>>
> _______________________________________________
> Tilecache mailing list
> [hidden email]
> http://openlayers.org/mailman/listinfo/tilecache

_______________________________________________
Tilecache mailing list
[hidden email]
http://openlayers.org/mailman/listinfo/tilecache
Tyler Durden

Re: ECW or TIFF to Tiles

Reply Threaded More More options
Print post
Permalink
Hi,

On Mon, Nov 2, 2009 at 6:30 PM, Dane Springmeyer <[hidden email]> wrote:
> 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.

Sorry, I'll do that.

> 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.

Ok, thanks

> 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 <[hidden email]>
>> 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 <[hidden email]>
>>> 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 <[hidden email]>
>>>> 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
>>>>>> [hidden email]
>>>>>> http://openlayers.org/mailman/listinfo/tilecache
>>>>>
>>>>>
>>>> _______________________________________________
>>>> Tilecache mailing list
>>>> [hidden email]
>>>> http://openlayers.org/mailman/listinfo/tilecache
>>>>
>>>
>> _______________________________________________
>> Tilecache mailing list
>> [hidden email]
>> http://openlayers.org/mailman/listinfo/tilecache
>
>
_______________________________________________
Tilecache mailing list
[hidden email]
http://openlayers.org/mailman/listinfo/tilecache