Opened 13 years ago

Closed 13 years ago

Last modified 13 years ago

#1016 closed patch (fixed)

[raster] make raster2pgsql accept user-specified padding value

Reported by: bnordgren Owned by: pracine
Priority: medium Milestone: PostGIS 2.0.0
Component: raster Version: master
Keywords: Cc:

Description

My nodata value was 255. I was using a file format which didn't record nodata values (ENVI). The loader pads with 0 when it cannot locate a nodata value for the band.

So I needed a way to specify the padding value.

Attachments (1)

raster2pgsql.patch (3.3 KB ) - added by bnordgren 13 years ago.
patch adds ability to specify padding value when loading raster.

Download all attachments as: .zip

Change History (6)

comment:1 by robe, 13 years ago

did you mean to attach a patch to this ticket. You marked it as patch, but I see no patch attached.

by bnordgren, 13 years ago

Attachment: raster2pgsql.patch added

patch adds ability to specify padding value when loading raster.

comment:2 by bnordgren, 13 years ago

Yup, was still attaching the patch. (a 90 second response time is pretty good.) patch should apply clean against r7357 or equivilent.

comment:3 by Bborie Park, 13 years ago

Resolution: fixed
Status: newclosed

In the new default raster2pgsql loader, use -N to specify the NODATA value.

comment:4 by pracine, 13 years ago

One question: What happen if the raster being loaded has nodata values equal to 0 and I do "-N -1" when loading? Are the 0 converted to -1?

comment:5 by Bborie Park, 13 years ago

No. The value provided for -N is only applied for bands without NODATA values.

Note: See TracTickets for help on using tickets.