Skip to content
Archive of entries posted on

gdal_retile retooled

Recently the task of combining and tiling some large GeoTIFFs came up.. so began an investigation of adding threading support to gdal_retile.py Unfortunately, it is widely known that python is not the best environment for multithreaded work, due to the global interpreter lock (GIL). However, while building threading support for some routine postgis tasks recently, […]

Variable Buffers in PostGIS

Some problems in PostGIS are naturally parallelizable. Many problems involving a grid as a base or reference data set fall into this category; when each grid cell is visited and some operation is done there, each grid cell is uniquely referenced in its own set of calculations, and invariant, then it is likely that the […]

PostGIS subtraction

Threading in python and calling out to PostGIS in each thread can work well. Here is an example of using python’s Queue and threading.Thread to break up a large spatial workload into pieces. It turns out that many spatial data problems are naturally parallelizable, and this is one of them. Per the PostGIS manual, subtraction […]

KNN GIST Index in Postgresql

With version 9.1 of PostgreSQL and above, the KNN GIST Index is available. There are two new operators defined:  <-> and <#>  With version 2.0 of PostGIS and above, the KNN GIST Index functionality is exposed for PostGIS geometry types. <-> – Returns the distance between two points. For point / point checks it uses […]

PostGIS Topology of Berkeley Streets

       

list schemas the low level way

SELECT n.nspname AS “Name”, pg_catalog.pg_get_userbyid(n.nspowner) AS “Owner” FROM pg_catalog.pg_namespace n WHERE n.nspname !~ ‘^pg_’ AND n.nspname ‘information_schema’ ORDER BY 1;