rasterlite.h | rasterlite.h | |||
---|---|---|---|---|
/* | /* | |||
/ rasterlite.h | / rasterlite.h | |||
/ | / | |||
/ public RasterLite declarations | / public RasterLite declarations | |||
/ | / | |||
/ version 1.0, 2009 June 1 | / version 1.1a, 2011 November 12 | |||
/ | / | |||
/ Author: Sandro Furieri a.furieri@lqt.it | / Author: Sandro Furieri a.furieri@lqt.it | |||
/ | / | |||
/ Copyright (C) 2009 Alessandro Furieri | / ------------------------------------------------------------------------- ----- | |||
/ | / | |||
/ This program is free software: you can redistribute it and/or modify | / Version: MPL 1.1/GPL 2.0/LGPL 2.1 | |||
/ it under the terms of the GNU General Public License as published by | ||||
/ the Free Software Foundation, either version 3 of the License, or | ||||
/ (at your option) any later version. | ||||
/ | / | |||
/ This program is distributed in the hope that it will be useful, | / The contents of this file are subject to the Mozilla Public License Versi | |||
/ but WITHOUT ANY WARRANTY; without even the implied warranty of | on | |||
/ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | / 1.1 (the "License"); you may not use this file except in compliance with | |||
/ GNU General Public License for more details. | / the License. You may obtain a copy of the License at | |||
/ http://www.mozilla.org/MPL/ | ||||
/ | / | |||
/ You should have received a copy of the GNU General Public License | / Software distributed under the License is distributed on an "AS IS" basis | |||
/ along with this program. If not, see <http://www.gnu.org/licenses/>. | , | |||
/ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License | ||||
/ for the specific language governing rights and limitations under the | ||||
/ License. | ||||
/ | ||||
/ The Original Code is the RasterLite library | ||||
/ | ||||
/ The Initial Developer of the Original Code is Alessandro Furieri | ||||
/ | ||||
/ Portions created by the Initial Developer are Copyright (C) 2009 | ||||
/ the Initial Developer. All Rights Reserved. | ||||
/ | ||||
/ Alternatively, the contents of this file may be used under the terms of | ||||
/ either the GNU General Public License Version 2 or later (the "GPL"), or | ||||
/ the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), | ||||
/ in which case the provisions of the GPL or the LGPL are applicable instea | ||||
d | ||||
/ of those above. If you wish to allow use of your version of this file onl | ||||
y | ||||
/ under the terms of either the GPL or the LGPL, and not to allow others to | ||||
/ use your version of this file under the terms of the MPL, indicate your | ||||
/ decision by deleting the provisions above and replace them with the notic | ||||
e | ||||
/ and other provisions required by the GPL or the LGPL. If you do not delet | ||||
e | ||||
/ the provisions above, a recipient may use your version of this file under | ||||
/ the terms of any one of the MPL, the GPL or the LGPL. | ||||
/ | / | |||
*/ | */ | |||
#ifdef DLL_EXPORT | #ifdef DLL_EXPORT | |||
#define RASTERLITE_DECLARE __declspec(dllexport) | #define RASTERLITE_DECLARE __declspec(dllexport) | |||
#else | #else | |||
#define RASTERLITE_DECLARE extern | #define RASTERLITE_DECLARE extern | |||
#endif | #endif | |||
#ifndef _RASTERLITE_H | #ifndef _RASTERLITE_H | |||
#define _RASTERLITE_H | #define _RASTERLITE_H | |||
#ifdef __cplusplus | #ifdef __cplusplus | |||
extern "C" | extern "C" | |||
{ | { | |||
#endif | #endif | |||
#define GAIA_RGB_ARRAY 1001 | #define GAIA_RGB_ARRAY 1001 | |||
#define GAIA_RGBA_ARRAY 1002 | ||||
#define GAIA_ARGB_ARRAY 1003 | ||||
#define GAIA_BGR_ARRAY 1004 | ||||
#define GAIA_BGRA_ARRAY 1005 | ||||
#define RASTERLITE_OK 0 | #define RASTERLITE_OK 0 | |||
#define RASTERLITE_ERROR 1 | #define RASTERLITE_ERROR 1 | |||
RASTERLITE_DECLARE void *rasterliteOpen (const char *path, | RASTERLITE_DECLARE void *rasterliteOpen (const char *path, | |||
const char *table_prefix); | const char *table_prefix); | |||
RASTERLITE_DECLARE void rasterliteClose (void *handle); | RASTERLITE_DECLARE void rasterliteClose (void *handle); | |||
RASTERLITE_DECLARE int rasterliteHasTransparentColor (void *handle); | RASTERLITE_DECLARE int rasterliteHasTransparentColor (void *handle); | |||
RASTERLITE_DECLARE void rasterliteSetTransparentColor (void *handle, | RASTERLITE_DECLARE void rasterliteSetTransparentColor (void *handle, | |||
unsigned char red , | unsigned char red , | |||
skipping to change at line 96 | skipping to change at line 118 | |||
RASTERLITE_DECLARE int rasterliteGetRasterByRect2 (void *handle, double x1, | RASTERLITE_DECLARE int rasterliteGetRasterByRect2 (void *handle, double x1, | |||
double y1, double x2, | double y1, double x2, | |||
double y2, | double y2, | |||
double pixel_x_size, | double pixel_x_size, | |||
double pixel_y_size, | double pixel_y_size, | |||
int width, int height , | int width, int height , | |||
int image_type, | int image_type, | |||
int quality_factor, | int quality_factor, | |||
void **raster, | void **raster, | |||
int *size); | int *size); | |||
RASTERLITE_DECLARE int rasterliteGetRawImage (void *handle, double cx, | ||||
double cy, double pixel_si | ||||
ze, | ||||
int width, int height, | ||||
int raw_format, | ||||
void **raster, int *size); | ||||
RASTERLITE_DECLARE int rasterliteGetRawImage2 (void *handle, double cx, | ||||
double cy, | ||||
double pixel_x_size, | ||||
double pixel_y_size, | ||||
int width, int height, | ||||
int raw_format, | ||||
void **raster, int *size) | ||||
; | ||||
RASTERLITE_DECLARE int rasterliteGetRawImageByRect (void *handle, doubl | ||||
e x1, | ||||
double y1, double x2 | ||||
, | ||||
double y2, | ||||
double pixel_size, | ||||
int width, int heigh | ||||
t, | ||||
int raw_format, | ||||
void **raster, | ||||
int *size); | ||||
RASTERLITE_DECLARE int rasterliteGetRawImageByRect2 (void *handle, | ||||
double x1, double y | ||||
1, | ||||
double x2, double y | ||||
2, | ||||
double pixel_x_size | ||||
, | ||||
double pixel_y_size | ||||
, | ||||
int width, int heig | ||||
ht, | ||||
int raw_format, | ||||
void **raster, | ||||
int *size); | ||||
RASTERLITE_DECLARE int rasterliteIsError (void *handle); | RASTERLITE_DECLARE int rasterliteIsError (void *handle); | |||
RASTERLITE_DECLARE const char *rasterliteGetPath (void *handle); | RASTERLITE_DECLARE const char *rasterliteGetPath (void *handle); | |||
RASTERLITE_DECLARE const char *rasterliteGetTablePrefix (void *handle); | RASTERLITE_DECLARE const char *rasterliteGetTablePrefix (void *handle); | |||
RASTERLITE_DECLARE const char *rasterliteGetLastError (void *handle); | RASTERLITE_DECLARE const char *rasterliteGetLastError (void *handle); | |||
RASTERLITE_DECLARE const char *rasterliteGetSqliteVersion (void *handle ); | RASTERLITE_DECLARE const char *rasterliteGetSqliteVersion (void *handle ); | |||
RASTERLITE_DECLARE const char *rasterliteGetSpatialiteVersion (void | RASTERLITE_DECLARE const char *rasterliteGetSpatialiteVersion (void | |||
*handle); | *handle); | |||
RASTERLITE_DECLARE int rasterliteGetLevels (void *handle); | RASTERLITE_DECLARE int rasterliteGetLevels (void *handle); | |||
RASTERLITE_DECLARE int rasterliteGetResolution (void *handle, int level , | RASTERLITE_DECLARE int rasterliteGetResolution (void *handle, int level , | |||
double *pixel_x_size, | double *pixel_x_size, | |||
double *pixel_y_size, | double *pixel_y_size, | |||
int *tile_count); | int *tile_count); | |||
RASTERLITE_DECLARE int rasterliteGetSrid (void *handle, int *srid, | RASTERLITE_DECLARE int rasterliteGetSrid (void *handle, int *srid, | |||
const char **auth_name, | const char **auth_name, | |||
int *auth_srid, | int *auth_srid, | |||
const char **ref_sys_name, | const char **ref_sys_name, | |||
const char **proj4text); | const char **proj4text); | |||
RASTERLITE_DECLARE int rasterliteGetExtent (void *handle, double *min_x , | RASTERLITE_DECLARE int rasterliteGetExtent (void *handle, double *min_x , | |||
double *min_y, double *max_x , | double *min_y, double *max_x , | |||
double *max_y); | double *max_y); | |||
RASTERLITE_DECLARE int rasterliteWaveletToPng (const void *blob, | ||||
int blob_size, | ||||
void **png_blob, | ||||
int *png_size); | ||||
RASTERLITE_DECLARE int rasterliteExportGeoTiff (void *handle, | RASTERLITE_DECLARE int rasterliteExportGeoTiff (void *handle, | |||
const char *img_path, | const char *img_path, | |||
void *raster, int size, | void *raster, int size, | |||
double cx, double cy, | double cx, double cy, | |||
double pixel_x_size, | double pixel_x_size, | |||
double pixel_y_size, | double pixel_y_size, | |||
int width, int height); | int width, int height); | |||
RASTERLITE_DECLARE int rasterliteGetBestAccess (void *handle, | RASTERLITE_DECLARE int rasterliteGetBestAccess (void *handle, | |||
double pixel_size, | double pixel_size, | |||
double *pixel_x_size, | double *pixel_x_size, | |||
double *pixel_y_size, | double *pixel_y_size, | |||
sqlite3_stmt ** stmt, | sqlite3_stmt ** stmt, | |||
int *use_rtree); | int *use_rtree); | |||
/* | ||||
/ utility functions returning a Raw image | ||||
*/ | ||||
RASTERLITE_DECLARE int rasterliteJpegBlobToRawImage (const void *blob, | ||||
int blob_size, | ||||
int raw_format, | ||||
void **raw, int *wi | ||||
dth, | ||||
int *height); | ||||
RASTERLITE_DECLARE int rasterlitePngBlobToRawImage (const void *blob, | ||||
int blob_size, | ||||
int raw_format, | ||||
void **raw, int *wid | ||||
th, | ||||
int *height); | ||||
RASTERLITE_DECLARE int rasterliteGifBlobToRawImage (const void *blob, | ||||
int blob_size, | ||||
int raw_format, | ||||
void **raw, int *wid | ||||
th, | ||||
int *height); | ||||
RASTERLITE_DECLARE int rasterliteTiffBlobToRawImage (const void *blob, | ||||
int blob_size, | ||||
int raw_format, | ||||
void **raw, int *wi | ||||
dth, | ||||
int *height); | ||||
/* | ||||
/ utility functions generating an image file from a Raw Image | ||||
*/ | ||||
RASTERLITE_DECLARE int rasterliteRawImageToJpegFile (const void *raw, | ||||
int raw_format, | ||||
int width, int heig | ||||
ht, | ||||
const char *path, | ||||
int quality); | ||||
RASTERLITE_DECLARE int rasterliteRawImageToPngFile (const void *raw, | ||||
int raw_format, | ||||
int width, int heigh | ||||
t, | ||||
const char *path); | ||||
RASTERLITE_DECLARE int rasterliteRawImageToGifFile (const void *raw, | ||||
int raw_format, | ||||
int width, int heigh | ||||
t, | ||||
const char *path); | ||||
RASTERLITE_DECLARE int rasterliteRawImageToGeoTiffFile (const void *raw | ||||
, | ||||
int raw_format, | ||||
int width, | ||||
int height, | ||||
const char *path | ||||
, | ||||
double x_size, | ||||
double y_size, | ||||
double xllcorner | ||||
, | ||||
double yllcorner | ||||
, | ||||
const char | ||||
*proj4text); | ||||
/* | ||||
/ utility functions generating an image mem-buffer from a Raw Image | ||||
*/ | ||||
RASTERLITE_DECLARE unsigned char *rasterliteRawImageToJpegMemBuf (const | ||||
void | ||||
*raw, | ||||
int | ||||
raw_fo | ||||
rmat, | ||||
int wi | ||||
dth, | ||||
int | ||||
height | ||||
, | ||||
int *s | ||||
ize, | ||||
int | ||||
qualit | ||||
y); | ||||
RASTERLITE_DECLARE unsigned char *rasterliteRawImageToPngMemBuf (const | ||||
void | ||||
*raw, | ||||
int | ||||
raw_for | ||||
mat, | ||||
int wid | ||||
th, | ||||
int hei | ||||
ght, | ||||
int *si | ||||
ze); | ||||
RASTERLITE_DECLARE unsigned char *rasterliteRawImageToGifMemBuf (const | ||||
void | ||||
*raw, | ||||
int | ||||
raw_for | ||||
mat, | ||||
int wid | ||||
th, | ||||
int hei | ||||
ght, | ||||
int *si | ||||
ze); | ||||
RASTERLITE_DECLARE unsigned char *rasterliteRawImageToTiffMemBuf (const | ||||
void | ||||
*raw, | ||||
int | ||||
raw_fo | ||||
rmat, | ||||
int wi | ||||
dth, | ||||
int | ||||
height | ||||
, | ||||
int | ||||
*size) | ||||
; | ||||
#ifdef __cplusplus | #ifdef __cplusplus | |||
} | } | |||
#endif | #endif | |||
#endif /* _RASTERLITE_H */ | #endif /* _RASTERLITE_H */ | |||
End of changes. 9 change blocks. | ||||
16 lines changed or deleted | 200 lines changed or added | |||