mirror of
https://github.com/ivabus/pantry
synced 2024-11-26 10:25:05 +03:00
github.com/OSGeo/libgeotiff
This commit is contained in:
parent
42042ae155
commit
0a98a34ab3
2 changed files with 66 additions and 0 deletions
42
projects/github.com/OSGeo/libgeotiff/package.yml
Normal file
42
projects/github.com/OSGeo/libgeotiff/package.yml
Normal file
|
@ -0,0 +1,42 @@
|
||||||
|
distributable:
|
||||||
|
url: https://github.com/OSGeo/libgeotiff/releases/download/{{version}}/libgeotiff-{{version}}.tar.gz
|
||||||
|
strip-components: 1
|
||||||
|
|
||||||
|
versions:
|
||||||
|
github: OSGeo/libgeotiff
|
||||||
|
|
||||||
|
dependencies:
|
||||||
|
libjpeg-turbo.org: '*'
|
||||||
|
simplesystems.org/libtiff: '*'
|
||||||
|
proj.org: '*'
|
||||||
|
|
||||||
|
build:
|
||||||
|
dependencies:
|
||||||
|
tea.xyz/gx/cc: c99
|
||||||
|
tea.xyz/gx/make: '*'
|
||||||
|
|
||||||
|
script:
|
||||||
|
- ./configure $ARGS
|
||||||
|
- make --jobs {{ hw.concurrency }}
|
||||||
|
- make --jobs {{ hw.concurrency }} install
|
||||||
|
|
||||||
|
env:
|
||||||
|
ARGS:
|
||||||
|
- --prefix="{{prefix}}"
|
||||||
|
- --with-jpeg
|
||||||
|
- --disable-debug
|
||||||
|
- --disable-dependency-tracking
|
||||||
|
- --disable-silent-rules
|
||||||
|
|
||||||
|
provides:
|
||||||
|
- bin/applygeo
|
||||||
|
- bin/geotifcp
|
||||||
|
- bin/listgeo
|
||||||
|
|
||||||
|
test:
|
||||||
|
dependencies:
|
||||||
|
tea.xyz/gx/cc: c99
|
||||||
|
script:
|
||||||
|
- cc test.c -ltiff -lgeotiff -o test
|
||||||
|
- ./test test.tiff
|
||||||
|
- listgeo test.tiff | grep GeogInvFlatteningGeoKey
|
24
projects/github.com/OSGeo/libgeotiff/test.c
Normal file
24
projects/github.com/OSGeo/libgeotiff/test.c
Normal file
|
@ -0,0 +1,24 @@
|
||||||
|
#include "geotiffio.h"
|
||||||
|
#include "xtiffio.h"
|
||||||
|
#include <stdlib.h>
|
||||||
|
#include <string.h>
|
||||||
|
|
||||||
|
int main(int argc, char* argv[]) {
|
||||||
|
TIFF *tif = XTIFFOpen(argv[1], "w");
|
||||||
|
GTIF *gtif = GTIFNew(tif);
|
||||||
|
TIFFSetField(tif, TIFFTAG_IMAGEWIDTH, (uint32_t) 10);
|
||||||
|
GTIFKeySet(gtif, GeogInvFlatteningGeoKey, TYPE_DOUBLE, 1, (double)123.456);
|
||||||
|
|
||||||
|
int i;
|
||||||
|
char buffer[20L];
|
||||||
|
|
||||||
|
memset(buffer,0,(size_t)20L);
|
||||||
|
for (i=0;i<20L;i++){
|
||||||
|
TIFFWriteScanline(tif, buffer, i, 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
GTIFWriteKeys(gtif);
|
||||||
|
GTIFFree(gtif);
|
||||||
|
XTIFFClose(tif);
|
||||||
|
return 0;
|
||||||
|
}
|
Loading…
Reference in a new issue