Skip to content

Instantly share code, notes, and snippets.

View rouault's full-sized avatar

Even Rouault rouault

View GitHub Profile
@rouault
rouault / gist:99bcff990100fcaa3058
Last active January 17, 2016 22:22
Smallest GDAL compatible GeoPackage contest
The purpose of this contest is to create the smallest possible file that is
recognized as a valid raster GeoPackage by GDAL.
The following rules must be followed:
- the file must be readable with "gdalinfo -checksum contest.gpkg" (exactly this commandline)
where contest.gpkg is the candidate file.
- the above command must report that the driver used to open the file is the GeoPackage driver.
- the above command must report, without any displayed warning or error, at least one raster
band and the checksum of the band(s)
- any GDAL version with GeoPackage raster support can be used (i.e. GDAL 2.0 or later) at the
@rouault
rouault / gist:2babfb4e25b41db11688
Created May 25, 2015 09:22
gdalinfo speaks json
$ gdalinfo -json byte.tif
{
"description":"byte.tif",
"driverShortName":"GTiff",
"driverLongName":"GeoTIFF",
"files":[
"byte.tif",
"byte.tif.ovr",
"byte.tif.aux.xml"
],
@rouault
rouault / gist:862de9a1691f59f5a814
Created June 7, 2014 21:29
Mandelbrot fractal with OGR
Credits to http://www.sqlite.org/lang_with.html#mandelbrot
$ LD_LIBRARY_PATH=/home/even/install-sqlite-3.8.5/lib:$LD_LIBRARY_PATH ogrinfo :memory: -sql "WITH RECURSIVE xaxis(x) AS (VALUES(-2.0) UNION ALL SELECT x+0.05 FROM xaxis WHERE x<1.2),yaxis(y) AS (VALUES(-1.0) UNION ALL SELECT y+0.1 FROM yaxis WHERE y<1.0),m(iter, cx, cy, x, y) AS (SELECT 0, x, y, 0.0, 0.0 FROM xaxis, yaxis UNION ALL SELECT iter+1, cx, cy, x*x-y*y + cx, 2.0*x*y + cy FROM m WHERE (x*x + y*y) < 4.0 AND iter<28 ), m2(iter, cx, cy) AS (SELECT max(iter), cx, cy FROM m GROUP BY cx, cy), a(t) AS (SELECT group_concat( substr(' .+*#', 1+min(iter/7,4), 1), '') FROM m2 GROUP BY cy) SELECT x'0a' || group_concat(rtrim(t),x'0a') as mandelbrot FROM a" -dialect sqlite
INFO: Open of `:memory:'
using driver `SQLite' successful.
Layer name: SELECT
Geometry: None
Feature Count: 1
@rouault
rouault / gist:c281d32b4ac62a5af641
Created May 19, 2014 21:51
Status of OGR MapInfo driver w.r.t MITAB github
Submitted as pull request:
@27367 [27367] 26 minutes rouault MIFFILE: Remove duplicate OLCSequentialWrite test and report …
@26120 [26120] 11 months rouault MITAB: support reading MIF file with no associated MID file (when MIF file …
@25343 [25343] 17 months rouault MITAB: avoid negative zeros in TOWGS84 read from TAB file (#4931)
@25033 [25033] 20 months rcoup #481 - add datum mapping between EPSG/authority codes and the MapInfo? …
@24647 [24647] 23 months rouault Fix double free in OGRTABDataSource::Create() when exiting with error …
@24368 [24368] 2 years rouault MITAB: missing break when dealing with Mollweide projection (#4628)
Non submitted --> buggy http://trac.osgeo.org/gdal/ticket/3853 :
@24135 [24135] 2 years chaitanya #3853. Fix the unwanted changes in data types while converting a …