systemapic / pile

PostGIS tile server
0 stars 2 forks source link

pgraster_wkb_reader: grayscale band type 10 unsupported #30

Open knutole opened 8 years ago

knutole commented 8 years ago

Uploading a certain raster .tif yields empty tiles and an error:

{ err_id: 2,
 err_msg: 'render vector',
 error: 'pgraster_wkb_reader: grayscale band type 10 unsupported',
stack: undefined 
}

gdalinfo of raster:

Driver: GTiff/GeoTIFF
Files: r-ae704b82-4f2e-4e1b-af2a-36fef188b812-adjet_SBAS_5x5_mean_velocity_stacking.tif
Size is 2640, 2670
Coordinate System is:
PROJCS["WGS 84 / UTM zone 33N",
    GEOGCS["WGS 84",
        DATUM["WGS_1984",
            SPHEROID["WGS 84",6378137,298.257223563,
                AUTHORITY["EPSG","7030"]],
            AUTHORITY["EPSG","6326"]],
        PRIMEM["Greenwich",0],
        UNIT["degree",0.0174532925199433],
        AUTHORITY["EPSG","4326"]],
    PROJECTION["Transverse_Mercator"],
    PARAMETER["latitude_of_origin",0],
    PARAMETER["central_meridian",15],
    PARAMETER["scale_factor",0.9996],
    PARAMETER["false_easting",500000],
    PARAMETER["false_northing",0],
    UNIT["metre",1,
        AUTHORITY["EPSG","9001"]],
    AUTHORITY["EPSG","32633"]]
Origin = (708257.500000000000000,7709532.500000000000000)
Pixel Size = (5.000000000000000,-5.000000000000000)
Metadata:
  AREA_OR_POINT=Area
  TIFFTAG_IMAGEDESCRIPTION=mean-deformation-velocity-stacking-[mm/year]

BandNames:
Band 1
  TIFFTAG_RESOLUTIONUNIT=1 (unitless)
  TIFFTAG_XRESOLUTION=1
  TIFFTAG_YRESOLUTION=1
Image Structure Metadata:
  INTERLEAVE=BAND
Corner Coordinates:
Upper Left  (  708257.500, 7709532.500) ( 20d18'46.03"E, 69d24'49.09"N)
Lower Left  (  708257.500, 7696182.500) ( 20d17' 0.49"E, 69d17'39.94"N)
Upper Right (  721457.500, 7709532.500) ( 20d38'51.16"E, 69d24'10.99"N)
Lower Right (  721457.500, 7696182.500) ( 20d36'59.06"E, 69d17' 2.08"N)
Center      (  714857.500, 7702857.500) ( 20d27'54.18"E, 69d20'55.82"N)
Band 1 Block=256x256 Type=Float32, ColorInterp=Gray
  NoData Value=-9999
knutole commented 8 years ago

This is data from a client, thus it's high priority to support this data type.

strk commented 8 years ago

That error comes from mapnik, filing a ticket there, with a sample of that data, should help

knutole commented 8 years ago

This has nothing to do with lacking support in pgraster.input? https://github.com/mapnik/mapnik/blob/master/plugins/input/pgraster/TODO

strk commented 8 years ago

It does: PT_32BF grayscale unsupported (hey, that's my TODO!!)

knutole commented 8 years ago

Haha I KNOW! :)

https://github.com/mapnik/mapnik/blob/master/plugins/input/pgraster/pgraster_wkb_reader.cpp#L324

knutole commented 8 years ago

How much work to add support for this?

strk commented 8 years ago

On Fri, Feb 26, 2016 at 06:52:59AM -0800, knutole wrote:

How much work to add support for this?

I don't remeber how much depends on mapnik core and how much on caller, but I can take a look, just attach a 32BF grayscale sample on a mapnik ticket, and link from here.

knutole commented 8 years ago

Filed ticket on mapnik: https://github.com/mapnik/mapnik/issues/3324