PostGIS  2.1.10dev-r@@SVN_REVISION@@
rt_api.c File Reference
#include <math.h>
#include <stdio.h>
#include <stdarg.h>
#include <string.h>
#include <assert.h>
#include <time.h>
#include "rt_api.h"
#include "gdal_vrt.h"
Include dependency graph for rt_api.c:

Go to the source code of this file.

Data Structures

struct  rt_context_t
 Struct definition here. More...
 
struct  _rti_warp_arg_t
 
struct  _rti_rasterize_arg_t
 
struct  _rti_iterator_arg_t
 
struct  _rti_colormap_arg_t
 

Macros

#define SWAP(x, y)   { double t; t = x; x = y; y = t; }
 
#define ORDER(x, y)   if (x > y) SWAP(x, y)
 
#define CHECK_BINPTR_POSITION(ptr, end, size, pos)   ((void)0);
 
#define BANDTYPE_FLAGS_MASK   0xF0
 
#define BANDTYPE_PIXTYPE_MASK   0x0F
 
#define BANDTYPE_FLAG_OFFDB   (1<<7)
 
#define BANDTYPE_FLAG_HASNODATA   (1<<6)
 
#define BANDTYPE_FLAG_ISNODATA   (1<<5)
 
#define BANDTYPE_FLAG_RESERVED3   (1<<4)
 
#define BANDTYPE_PIXTYPE(x)   ((x)&BANDTYPE_PIXTYPE_MASK)
 
#define BANDTYPE_IS_OFFDB(x)   ((x)&BANDTYPE_FLAG_OFFDB)
 
#define BANDTYPE_HAS_NODATA(x)   ((x)&BANDTYPE_FLAG_HASNODATA)
 
#define BANDTYPE_IS_NODATA(x)   ((x)&BANDTYPE_FLAG_ISNODATA)
 
#define RT_WKB_HDR_SZ   (sizeof(struct rt_raster_serialized_t)-4+1)
 

Typedefs

typedef struct _rti_warp_arg_t_rti_warp_arg
 
typedef struct _rti_rasterize_arg_t_rti_rasterize_arg
 
typedef struct _rti_iterator_arg_t_rti_iterator_arg
 
typedef struct _rti_colormap_arg_t_rti_colormap_arg
 

Functions

static void swap_char (uint8_t *a, uint8_t *b)
 
static void flip_endian_16 (uint8_t *d)
 
static void flip_endian_32 (uint8_t *d)
 
static void flip_endian_64 (uint8_t *d)
 
uint8_t rt_util_clamp_to_1BB (double value)
 
uint8_t rt_util_clamp_to_2BUI (double value)
 
uint8_t rt_util_clamp_to_4BUI (double value)
 
int8_t rt_util_clamp_to_8BSI (double value)
 
uint8_t rt_util_clamp_to_8BUI (double value)
 
int16_t rt_util_clamp_to_16BSI (double value)
 
uint16_t rt_util_clamp_to_16BUI (double value)
 
int32_t rt_util_clamp_to_32BSI (double value)
 
uint32_t rt_util_clamp_to_32BUI (double value)
 
float rt_util_clamp_to_32F (double value)
 
static double pivot (double *left, double *right)
 
static double * partition (double *left, double *right, double pivot)
 
static void quicksort (double *left, double *right)
 
GDALResampleAlg rt_util_gdal_resample_alg (const char *algname)
 Convert cstring name to GDAL Resample Algorithm. More...
 
GDALDataType rt_util_pixtype_to_gdal_datatype (rt_pixtype pt)
 Convert rt_pixtype to GDALDataType. More...
 
rt_pixtype rt_util_gdal_datatype_to_pixtype (GDALDataType gdt)
 Convert GDALDataType to rt_pixtype. More...
 
const char * rt_util_gdal_version (const char *request)
 
rt_extenttype rt_util_extent_type (const char *name)
 
char * rt_util_gdal_convert_sr (const char *srs, int proj4)
 
int rt_util_gdal_supported_sr (const char *srs)
 
rt_errorstate rt_util_gdal_sr_auth_info (GDALDatasetH hds, char **authname, char **authcode)
 Get auth name and code. More...
 
int rt_util_gdal_configured (void)
 
int rt_util_gdal_register_all (int force_register_all)
 
int rt_util_gdal_driver_registered (const char *drv)
 
GDALDatasetH rt_util_gdal_open (const char *fn, GDALAccess fn_access, int shared)
 
void rt_util_from_ogr_envelope (OGREnvelope env, rt_envelope *ext)
 
void rt_util_to_ogr_envelope (rt_envelope ext, OGREnvelope *env)
 
LWPOLYrt_util_envelope_to_lwpoly (rt_envelope env)
 
int rt_util_same_geotransform_matrix (double *gt1, double *gt2)
 
rt_errorstate rt_util_rgb_to_hsv (double rgb[3], double hsv[3])
 
rt_errorstate rt_util_hsv_to_rgb (double hsv[3], double rgb[3])
 
void * default_rt_allocator (size_t size)
 The default memory/logging handlers installed by lwgeom_install_default_allocators() More...
 
void * default_rt_reallocator (void *mem, size_t size)
 
void default_rt_deallocator (void *mem)
 
void default_rt_error_handler (const char *fmt, va_list ap)
 
void default_rt_warning_handler (const char *fmt, va_list ap)
 
void default_rt_info_handler (const char *fmt, va_list ap)
 
void rt_install_default_allocators (void)
 Useful in raster core testing and in the (future) loader, when we need to use raster core functions but we don't have PostgreSQL backend behind. More...
 
void rt_set_handlers (rt_allocator allocator, rt_reallocator reallocator, rt_deallocator deallocator, rt_message_handler error_handler, rt_message_handler info_handler, rt_message_handler warning_handler)
 This function is called when the PostgreSQL backend is taking care of the memory and we want to use palloc family. More...
 
void * rtalloc (size_t size)
 Raster core memory management functions. More...
 
void * rtrealloc (void *mem, size_t size)
 
void rtdealloc (void *mem)
 
void rterror (const char *fmt,...)
 Raster core error and info handlers. More...
 
void rtinfo (const char *fmt,...)
 
void rtwarn (const char *fmt,...)
 
int rt_util_dbl_trunc_warning (double initialvalue, int32_t checkvalint, uint32_t checkvaluint, float checkvalfloat, double checkvaldouble, rt_pixtype pixtype)
 
int rt_pixtype_size (rt_pixtype pixtype)
 Return size in bytes of a value in the given pixtype. More...
 
int rt_pixtype_alignment (rt_pixtype pixtype)
 Return alignment requirements for data in the given pixel type. More...
 
rt_pixtype rt_pixtype_index_from_name (const char *pixname)
 
const char * rt_pixtype_name (rt_pixtype pixtype)
 
double rt_pixtype_get_min_value (rt_pixtype pixtype)
 Return minimum value possible for pixel type. More...
 
rt_errorstate rt_pixtype_compare_clamped_values (rt_pixtype pixtype, double val, double refval, int *isequal)
 Returns 1 if clamped values are equal, 0 if not equal, -1 if error. More...
 
rt_errorstate rt_pixel_set_to_array (rt_pixel npixel, int count, int x, int y, uint16_t distancex, uint16_t distancey, double ***value, int ***nodata, int *dimx, int *dimy)
 
rt_band rt_band_new_inline (uint16_t width, uint16_t height, rt_pixtype pixtype, uint32_t hasnodata, double nodataval, uint8_t *data)
 Create an in-db rt_band with no data. More...
 
rt_band rt_band_new_offline (uint16_t width, uint16_t height, rt_pixtype pixtype, uint32_t hasnodata, double nodataval, uint8_t bandNum, const char *path)
 Create an out-db rt_band. More...
 
rt_band rt_band_duplicate (rt_band band)
 Create a new band duplicated from source band. More...
 
int rt_band_is_offline (rt_band band)
 Return non-zero if the given band data is on the filesystem. More...
 
void rt_band_destroy (rt_band band)
 Destroy a raster band. More...
 
const char * rt_band_get_ext_path (rt_band band)
 Return band's external path (only valid when rt_band_is_offline returns non-zero). More...
 
rt_errorstate rt_band_get_ext_band_num (rt_band band, uint8_t *bandnum)
 Return bands' external band number (only valid when rt_band_is_offline returns non-zero). More...
 
void * rt_band_get_data (rt_band band)
 Get pointer to raster band data. More...
 
rt_errorstate rt_band_load_offline_data (rt_band band)
 Load offline band's data. More...
 
rt_pixtype rt_band_get_pixtype (rt_band band)
 Return pixeltype of this band. More...
 
uint16_t rt_band_get_width (rt_band band)
 Return width of this band. More...
 
uint16_t rt_band_get_height (rt_band band)
 Return height of this band. More...
 
int rt_band_get_ownsdata_flag (rt_band band)
 Return 0 (FALSE) or non-zero (TRUE) indicating if rt_band is responsible for managing the memory for band data. More...
 
void rt_band_set_ownsdata_flag (rt_band band, int flag)
 
int rt_band_get_hasnodata_flag (rt_band band)
 Get hasnodata flag value. More...
 
void rt_band_set_hasnodata_flag (rt_band band, int flag)
 Set hasnodata flag value. More...
 
rt_errorstate rt_band_set_isnodata_flag (rt_band band, int flag)
 Set isnodata flag value. More...
 
int rt_band_get_isnodata_flag (rt_band band)
 Get isnodata flag value. More...
 
rt_errorstate rt_band_set_nodata (rt_band band, double val, int *converted)
 Set nodata value. More...
 
rt_errorstate rt_band_set_pixel_line (rt_band band, int x, int y, void *vals, uint32_t len)
 Set values of multiple pixels. More...
 
rt_errorstate rt_band_set_pixel (rt_band band, int x, int y, double val, int *converted)
 Set single pixel's value. More...
 
rt_errorstate rt_band_get_pixel_line (rt_band band, int x, int y, uint16_t len, void **vals, uint16_t *nvals)
 Get values of multiple pixels. More...
 
rt_errorstate rt_band_get_pixel (rt_band band, int x, int y, double *value, int *nodata)
 Get pixel value. More...
 
int rt_band_get_nearest_pixel (rt_band band, int x, int y, uint16_t distancex, uint16_t distancey, int exclude_nodata_value, rt_pixel *npixels)
 Get nearest pixel(s) with value (not NODATA) to specified pixel. More...
 
int rt_band_get_pixel_of_value (rt_band band, int exclude_nodata_value, double *searchset, int searchcount, rt_pixel *pixels)
 Search band for pixel(s) with search values. More...
 
rt_errorstate rt_band_get_nodata (rt_band band, double *nodata)
 Get NODATA value. More...
 
double rt_band_get_min_value (rt_band band)
 Returns the minimal possible value for the band according to the pixel type. More...
 
int rt_band_check_is_nodata (rt_band band)
 Returns TRUE if the band is only nodata values. More...
 
int rt_band_clamped_value_is_nodata (rt_band band, double val)
 Compare clamped value to band's clamped NODATA value. More...
 
rt_errorstate rt_band_corrected_clamped_value (rt_band band, double val, double *newval, int *corrected)
 Correct value when clamped value is equal to clamped NODATA value. More...
 
rt_bandstats rt_band_get_summary_stats (rt_band band, int exclude_nodata_value, double sample, int inc_vals, uint64_t *cK, double *cM, double *cQ)
 Compute summary statistics for a band. More...
 
rt_histogram rt_band_get_histogram (rt_bandstats stats, int bin_count, double *bin_width, int bin_width_count, int right, double min, double max, uint32_t *rtn_count)
 Count the distribution of data. More...
 
rt_quantile rt_band_get_quantiles (rt_bandstats stats, double *quantiles, int quantiles_count, uint32_t *rtn_count)
 Compute the default set of or requested quantiles for a set of data the quantile formula used is same as Excel and R default method. More...
 
static struct quantile_llist_elementquantile_llist_search (struct quantile_llist_element *element, double needle)
 
static struct quantile_llist_elementquantile_llist_insert (struct quantile_llist_element *element, double value, uint32_t *idx)
 
static int quantile_llist_delete (struct quantile_llist_element *element)
 
int quantile_llist_destroy (struct quantile_llist **list, uint32_t list_count)
 
static void quantile_llist_index_update (struct quantile_llist *qll, struct quantile_llist_element *qle, uint32_t idx)
 
static void quantile_llist_index_delete (struct quantile_llist *qll, struct quantile_llist_element *qle)
 
static struct quantile_llist_elementquantile_llist_index_search (struct quantile_llist *qll, double value, uint32_t *index)
 
static void quantile_llist_index_reset (struct quantile_llist *qll)
 
rt_quantile rt_band_get_quantiles_stream (rt_band band, int exclude_nodata_value, double sample, uint64_t cov_count, struct quantile_llist **qlls, uint32_t *qlls_count, double *quantiles, int quantiles_count, uint32_t *rtn_count)
 Compute the default set of or requested quantiles for a coverage. More...
 
rt_valuecount rt_band_get_value_count (rt_band band, int exclude_nodata_value, double *search_values, uint32_t search_values_count, double roundto, uint32_t *rtn_total, uint32_t *rtn_count)
 Count the number of times provided value(s) occur in the band. More...
 
rt_band rt_band_reclass (rt_band srcband, rt_pixtype pixtype, uint32_t hasnodata, double nodataval, rt_reclassexpr *exprset, int exprcount)
 Returns new band with values reclassified. More...
 
rt_raster rt_raster_new (uint32_t width, uint32_t height)
 Construct a raster with given dimensions. More...
 
void rt_raster_destroy (rt_raster raster)
 Release memory associated to a raster. More...
 
static void _rt_raster_geotransform_warn_offline_band (rt_raster raster)
 
uint16_t rt_raster_get_width (rt_raster raster)
 
uint16_t rt_raster_get_height (rt_raster raster)
 
void rt_raster_set_scale (rt_raster raster, double scaleX, double scaleY)
 Set scale in projection units. More...
 
double rt_raster_get_x_scale (rt_raster raster)
 Get scale X in projection units. More...
 
double rt_raster_get_y_scale (rt_raster raster)
 Get scale Y in projection units. More...
 
void rt_raster_set_skews (rt_raster raster, double skewX, double skewY)
 Set skews about the X and Y axis. More...
 
double rt_raster_get_x_skew (rt_raster raster)
 Get skew about the X axis. More...
 
double rt_raster_get_y_skew (rt_raster raster)
 Get skew about the Y axis. More...
 
void rt_raster_set_offsets (rt_raster raster, double x, double y)
 Set insertion points in projection units. More...
 
double rt_raster_get_x_offset (rt_raster raster)
 Get raster x offset, in projection units. More...
 
double rt_raster_get_y_offset (rt_raster raster)
 Get raster y offset, in projection units. More...
 
void rt_raster_get_phys_params (rt_raster rast, double *i_mag, double *j_mag, double *theta_i, double *theta_ij)
 Calculates and returns the physically significant descriptors embodied in the geotransform attached to the provided raster. More...
 
void rt_raster_calc_phys_params (double xscale, double xskew, double yskew, double yscale, double *i_mag, double *j_mag, double *theta_i, double *theta_ij)
 Calculates the physically significant descriptors embodied in an arbitrary geotransform. More...
 
void rt_raster_set_phys_params (rt_raster rast, double i_mag, double j_mag, double theta_i, double theta_ij)
 Calculates the geotransform coefficients and applies them to the supplied raster. More...
 
int rt_raster_calc_gt_coeff (double i_mag, double j_mag, double theta_i, double theta_ij, double *xscale, double *xskew, double *yskew, double *yscale)
 Calculates the coefficients of a geotransform given the physically significant parameters describing the transform. More...
 
int32_t rt_raster_get_srid (rt_raster raster)
 Get raster's SRID. More...
 
void rt_raster_set_srid (rt_raster raster, int32_t srid)
 Set raster's SRID. More...
 
int rt_raster_get_num_bands (rt_raster raster)
 
rt_band rt_raster_get_band (rt_raster raster, int n)
 Return Nth band, or NULL if unavailable. More...
 
int rt_raster_add_band (rt_raster raster, rt_band band, int index)
 Add band data to a raster. More...
 
int rt_raster_generate_new_band (rt_raster raster, rt_pixtype pixtype, double initialvalue, uint32_t hasnodata, double nodatavalue, int index)
 Generate a new inline band and add it to a raster. More...
 
rt_errorstate rt_raster_get_inverse_geotransform_matrix (rt_raster raster, double *gt, double *igt)
 Get 6-element array of raster inverse geotransform matrix. More...
 
void rt_raster_get_geotransform_matrix (rt_raster raster, double *gt)
 Get 6-element array of raster geotransform matrix. More...
 
void rt_raster_set_geotransform_matrix (rt_raster raster, double *gt)
 Set raster's geotransform using 6-element array. More...
 
rt_errorstate rt_raster_cell_to_geopoint (rt_raster raster, double xr, double yr, double *xw, double *yw, double *gt)
 Convert an xr, yr raster point to an xw, yw point on map. More...
 
rt_errorstate rt_raster_geopoint_to_cell (rt_raster raster, double xw, double yw, double *xr, double *yr, double *igt)
 Convert an xw,yw map point to a xr,yr raster point. More...
 
rt_geomval rt_raster_gdal_polygonize (rt_raster raster, int nband, int exclude_nodata_value, int *pnElements)
 Returns a set of "geomval" value, one for each group of pixel sharing the same value for the provided band. More...
 
rt_errorstate rt_raster_get_convex_hull (rt_raster raster, LWGEOM **hull)
 Get raster's convex hull. More...
 
rt_errorstate rt_raster_get_envelope (rt_raster raster, rt_envelope *env)
 Get raster's envelope. More...
 
rt_raster rt_raster_compute_skewed_raster (rt_envelope extent, double *skew, double *scale, double tolerance)
 
static uint8_t isMachineLittleEndian (void)
 
static uint8_t read_uint8 (const uint8_t **from)
 
static int8_t read_int8 (const uint8_t **from)
 
static uint16_t read_uint16 (const uint8_t **from, uint8_t littleEndian)
 
static void write_uint16 (uint8_t **to, uint8_t littleEndian, uint16_t v)
 
static int16_t read_int16 (const uint8_t **from, uint8_t littleEndian)
 
static uint32_t read_uint32 (const uint8_t **from, uint8_t littleEndian)
 
static int32_t read_int32 (const uint8_t **from, uint8_t littleEndian)
 
static float read_float32 (const uint8_t **from, uint8_t littleEndian)
 
static double read_float64 (const uint8_t **from, uint8_t littleEndian)
 
static rt_band rt_band_from_wkb (uint16_t width, uint16_t height, const uint8_t **ptr, const uint8_t *end, uint8_t littleEndian)
 
rt_raster rt_raster_from_wkb (const uint8_t *wkb, uint32_t wkbsize)
 Construct an rt_raster from a binary WKB representation. More...
 
rt_raster rt_raster_from_hexwkb (const char *hexwkb, uint32_t hexwkbsize)
 Construct an rt_raster from a text HEXWKB representation. More...
 
static uint32_t rt_raster_wkb_size (rt_raster raster, int outasin)
 
uint8_t * rt_raster_to_wkb (rt_raster raster, int outasin, uint32_t *wkbsize)
 Return this raster in WKB form. More...
 
char * rt_raster_to_hexwkb (rt_raster raster, int outasin, uint32_t *hexwkbsize)
 Return this raster in HEXWKB form (null-terminated hex) More...
 
static uint32_t rt_raster_serialized_size (rt_raster raster)
 
void * rt_raster_serialize (rt_raster raster)
 Return this raster in serialized form. More...
 
rt_raster rt_raster_deserialize (void *serialized, int header_only)
 Return a raster from a serialized form. More...
 
int rt_raster_is_empty (rt_raster raster)
 Return TRUE if the raster is empty. More...
 
int rt_raster_has_band (rt_raster raster, int nband)
 Return TRUE if the raster has a band of this number. More...
 
int rt_raster_copy_band (rt_raster torast, rt_raster fromrast, int fromindex, int toindex)
 Copy one band from one raster to another. More...
 
rt_raster rt_raster_from_band (rt_raster raster, uint32_t *bandNums, int count)
 Construct a new rt_raster from an existing rt_raster and an array of band numbers. More...
 
rt_band rt_raster_replace_band (rt_raster raster, rt_band band, int index)
 Replace band at provided index with new band. More...
 
rt_raster rt_raster_clone (rt_raster raster, uint8_t deep)
 Clone an existing raster. More...
 
uint8_t * rt_raster_to_gdal (rt_raster raster, const char *srs, char *format, char **options, uint64_t *gdalsize)
 Return formatted GDAL raster from raster. More...
 
rt_gdaldriver rt_raster_gdal_drivers (uint32_t *drv_count, uint8_t cancc)
 Returns a set of available GDAL drivers. More...
 
GDALDatasetH rt_raster_to_gdal_mem (rt_raster raster, const char *srs, uint32_t *bandNums, int *excludeNodataValues, int count, GDALDriverH *rtn_drv, int *destroy_rtn_drv)
 Return GDAL dataset using GDAL MEM driver from raster. More...
 
rt_raster rt_raster_from_gdal_dataset (GDALDatasetH ds)
 Return a raster from a GDAL dataset. More...
 
static _rti_warp_arg _rti_warp_arg_init ()
 
static void _rti_warp_arg_destroy (_rti_warp_arg arg)
 
rt_raster rt_raster_gdal_warp (rt_raster raster, const char *src_srs, const char *dst_srs, double *scale_x, double *scale_y, int *width, int *height, double *ul_xw, double *ul_yw, double *grid_xw, double *grid_yw, double *skew_x, double *skew_y, GDALResampleAlg resample_alg, double max_err)
 Return a warped raster using GDAL Warp API. More...
 
static _rti_rasterize_arg _rti_rasterize_arg_init ()
 
static void _rti_rasterize_arg_destroy (_rti_rasterize_arg arg)
 
rt_raster rt_raster_gdal_rasterize (const unsigned char *wkb, uint32_t wkb_len, const char *srs, uint32_t num_bands, rt_pixtype *pixtype, double *init, double *value, double *nodata, uint8_t *hasnodata, int *width, int *height, double *scale_x, double *scale_y, double *ul_xw, double *ul_yw, double *grid_xw, double *grid_yw, double *skew_x, double *skew_y, char **options)
 Return a raster of the provided geometry. More...
 
static int rt_raster_intersects_algorithm (rt_raster rast1, rt_raster rast2, rt_band band1, rt_band band2, int hasnodata1, int hasnodata2, double nodata1, double nodata2)
 
rt_errorstate rt_raster_intersects (rt_raster rast1, int nband1, rt_raster rast2, int nband2, int *intersects)
 Return zero if error occurred in function. More...
 
static rt_errorstate rt_raster_geos_spatial_relationship (rt_raster rast1, int nband1, rt_raster rast2, int nband2, rt_geos_spatial_test testtype, int *testresult)
 
rt_errorstate rt_raster_overlaps (rt_raster rast1, int nband1, rt_raster rast2, int nband2, int *overlaps)
 Return ES_ERROR if error occurred in function. More...
 
rt_errorstate rt_raster_touches (rt_raster rast1, int nband1, rt_raster rast2, int nband2, int *touches)
 Return ES_ERROR if error occurred in function. More...
 
rt_errorstate rt_raster_contains (rt_raster rast1, int nband1, rt_raster rast2, int nband2, int *contains)
 Return ES_ERROR if error occurred in function. More...
 
rt_errorstate rt_raster_contains_properly (rt_raster rast1, int nband1, rt_raster rast2, int nband2, int *contains)
 Return ES_ERROR if error occurred in function. More...
 
rt_errorstate rt_raster_covers (rt_raster rast1, int nband1, rt_raster rast2, int nband2, int *covers)
 Return ES_ERROR if error occurred in function. More...
 
rt_errorstate rt_raster_coveredby (rt_raster rast1, int nband1, rt_raster rast2, int nband2, int *coveredby)
 Return ES_ERROR if error occurred in function. More...
 
rt_errorstate rt_raster_within_distance (rt_raster rast1, int nband1, rt_raster rast2, int nband2, double distance, int *dwithin)
 Return ES_ERROR if error occurred in function. More...
 
rt_errorstate rt_raster_fully_within_distance (rt_raster rast1, int nband1, rt_raster rast2, int nband2, double distance, int *dfwithin)
 Return ES_ERROR if error occurred in function. More...
 
rt_errorstate rt_raster_same_alignment (rt_raster rast1, rt_raster rast2, int *aligned, char **reason)
 
rt_errorstate rt_raster_from_two_rasters (rt_raster rast1, rt_raster rast2, rt_extenttype extenttype, rt_raster *rtnraster, double *offset)
 
LWPOLYrt_raster_pixel_as_polygon (rt_raster rast, int x, int y)
 Get a raster pixel as a polygon. More...
 
rt_errorstate rt_raster_surface (rt_raster raster, int nband, LWMPOLY **surface)
 Get a raster as a surface (multipolygon). More...
 
static _rti_iterator_arg _rti_iterator_arg_init ()
 
static void _rti_iterator_arg_destroy (_rti_iterator_arg _param)
 
static int _rti_iterator_arg_populate (_rti_iterator_arg _param, rt_iterator itrset, uint16_t itrcount, uint16_t distancex, uint16_t distancey, int *allnull, int *allempty)
 
static int _rti_iterator_arg_empty_init (_rti_iterator_arg _param)
 
static int _rti_iterator_arg_callback_init (_rti_iterator_arg _param)
 
static void _rti_iterator_arg_callback_clean (_rti_iterator_arg _param)
 
rt_errorstate rt_raster_iterator (rt_iterator itrset, uint16_t itrcount, rt_extenttype extenttype, rt_raster customextent, rt_pixtype pixtype, uint8_t hasnodata, double nodataval, uint16_t distancex, uint16_t distancey, void *userarg, int(*callback)(rt_iterator_arg arg, void *userarg, double *value, int *nodata), rt_raster *rtnraster)
 n-raster iterator. More...
 
static rt_errorstate _rti_raster_get_band_perimeter (rt_band band, uint16_t *trim)
 
rt_errorstate rt_raster_get_perimeter (rt_raster raster, int nband, LWGEOM **perimeter)
 Get raster perimeter. More...
 
static _rti_colormap_arg _rti_colormap_arg_init (rt_raster raster)
 
static void _rti_colormap_arg_destroy (_rti_colormap_arg arg)
 
rt_raster rt_raster_colormap (rt_raster raster, int nband, rt_colormap colormap)
 Returns a new raster with up to four 8BUI bands (RGBA) from applying a colormap to the user-specified band of the input raster. More...
 

Variables

char * gdal_enabled_drivers = NULL
 
static struct rt_context_t ctx_t
 
char enable_outdb_rasters = 1