[Tile-serving] [openstreetmap/mod_tile] getting blank tile while using mod_tile with mapnik to serve geotiff file (Issue #432)

Pradeep Singh notifications at github.com
Fri May 3 10:40:24 UTC 2024


Hi, I stuck in one issue where i have geotiff files and i want to use mod_tile but problem is after trying everything i am still getting balnk tile in api response but i tride to generate same tile using python and mapnik i am able to do so.

i am adding all information here

1) mapnik.xml

<?xml version="1.0" encoding="utf-8"?>
<Map srs="+proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs">
<Style name="raster-style">
<Rule>
        <RasterSymbolizer opacity="1.0" scaling="bilinear">
                <Colorizer type="linear" epsilon="0.01">
                        <stop color="black" value="0"/>
                        <stop color="white" value="255"/>
                 </Colorizer>
        </RasterSymbolizer>
</Rule>
</Style>
    <Layer name="GeoTIFF" status="true" srs="+proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs">
        <StyleName>raster-style</StyleName>
        <Datasource>
            <Parameter name="type">gdal</Parameter>
            <Parameter name="file">/usr/share/renderd/mod_tile_poc/AQ.tif</Parameter>
            <Parameter name="estimate_extent">true</Parameter>
            <Parameter name="log">/usr/share/renderd/mod_tile_poc/mapnik.log</Parameter>
            <Parameter name="debug">debug</Parameter>
        </Datasource>
    </Layer>
</Map>


2) /etc/renderd.conf


[renderd]
pid_file=/run/renderd/renderd.pid
socketname=/run/renderd/renderd.sock
stats_file=/run/renderd/renderd.stats
tile_dir=/var/cache/renderd/tiles

[mapnik]
font_dir=/usr/share/fonts
font_dir_recurse=0
plugins_dir=/usr/lib/mapnik/3.0/input

[default]
URI=/osm_tiles/
TILEDIR=/var/lib/mod_tile
XML=/usr/share/renderd/example-map/mapnik.xml
HOST=0.0.0.0
TILESIZE=256

[example-map]
URI=/tiles/renderd-example
XML=/usr/share/renderd/example-map/mapnik.xml

[example-map-jpg]
TYPE=jpg image/jpeg jpeg
URI=/tiles/renderd-example-jpg
XML=/usr/share/renderd/example-map/mapnik.xml

[example-map-png256]
TYPE=png image/png png256
URI=/tiles/renderd-example-png256
XML=/usr/share/renderd/example-map/mapnik.xml

[example-map-png32]
TYPE=png image/png png32
URI=/tiles/renderd-example-png32
XML=/usr/share/renderd/example-map/mapnik.xml

[example-map-webp]
TYPE=webp image/webp webp
URI=/tiles/renderd-example-webp
XML=/usr/share/renderd/example-map/mapnik.xml




3) this is info about geotiff file 

Driver: GTiff/GeoTIFF
Files: AQI.tiff
Size is 7220, 2810
Coordinate System is:
GEOGCRS["WGS 84",
    DATUM["World Geodetic System 1984",
        ELLIPSOID["WGS 84",6378137,298.257223563,
            LENGTHUNIT["metre",1]]],
    PRIMEM["Greenwich",0,
        ANGLEUNIT["degree",0.0174532925199433]],
    CS[ellipsoidal,2],
        AXIS["geodetic latitude (Lat)",north,
            ORDER[1],
            ANGLEUNIT["degree",0.0174532925199433]],
        AXIS["geodetic longitude (Lon)",east,
            ORDER[2],
            ANGLEUNIT["degree",0.0174532925199433]],
    ID["EPSG",4326]]
Data axis to CRS axis mapping: 2,1
Origin = (-180.500000000000000,84.099607528087063)
Pixel Size = (0.050000000000000,-0.050000000000000)
Metadata:
  AREA_OR_POINT=Area
Image Structure Metadata:
  INTERLEAVE=BAND
Corner Coordinates:
Upper Left  (-180.5000000,  84.0996075) (180d30' 0.00"W, 84d 5'58.59"N)
Lower Left  (-180.5000000, -56.4003925) (180d30' 0.00"W, 56d24' 1.41"S)
Upper Right ( 180.5000000,  84.0996075) (180d30' 0.00"E, 84d 5'58.59"N)
Lower Right ( 180.5000000, -56.4003925) (180d30' 0.00"E, 56d24' 1.41"S)
Center      (   0.0000000,  13.8496075) (  0d 0' 0.01"E, 13d50'58.59"N)
Band 1 Block=7220x1 Type=Int32, ColorInterp=Gray
  NoData Value=-255




-- 
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/mod_tile/issues/432
You are receiving this because you are subscribed to this thread.

Message ID: <openstreetmap/mod_tile/issues/432 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/tile-serving/attachments/20240503/430dc242/attachment.htm>


More information about the Tile-serving mailing list