Category Archives: code

Geo Django Raster Metadata

I’ve been using GeoDjango for some time now, and found myself in a situation where I wanted to retrieve raster metadata using the ST_MetaData function on some datasets stored in PostGIS.

To do so, you can of course use the raw function from the db Manager, but for this I went the extra mile (although, it’s more like the extra half-mile, since it’s very easy)

the ST_Metadata in GeoDjango

Leave a comment

Filed under code, curious, tips

Hugo static website on S3

You are in for a treat, static websites are back from the dead (they never left, but were not prominent nor sexy). Combine this with the cheapness of file hostings like S3 and you have a winner here.

more

Leave a comment

Filed under code, tips, tools

Color2Attribute for Qgis3.x

Well, it didn’t take that much. I ported the small Qgis plugin to Qgis version 3.x. Luckily the renderer classes did not change, so the biggest thing to do was reorganize the code for PyQt5 and all the Qgis2 to Qgis3 API breaking changes. Just one coffee and a morning was enough :-).

It should be available from the qgis repository itself.

Related

Original Post
2.X update
Plugin at the Qgis plugin website
Plugin source

Leave a comment

Filed under code, gis

Color2attribute in QGIS Plugin servers

Something like 7 years ago I created a very small plugin for Qgis (V1.x and V2.x later on).

This plugin was available via my github on a clone and copy fashion.

Yesterday I stopped being lazy and fixed that, The plugin is now available directly from the QGis plugin servers. And can be installed from Qgis itself.

Although I’m late as always since It does not work on 3.x versions.. oh well (look at this changelist!).

QGIS Color to Layer

Related

Original Post
2.X update
Plugin at the Qgis plugin website
Plugin source

Leave a comment

Filed under code, gis, tools

Memcached and Django

Here a quickie, since I’ve been silent for so long.

I find myself with a REST service taking way too long to process one of its queries, it’s not bad per se, but it will get bad when this query gets hit more often.

Memcached to the rescue.

more

Leave a comment

Filed under code, tools

Tenma72-2540 Linux serial control

I daily work with a DC power supply to run different boards and prototypes. One day, plugging in the power supply I realized there was a USB and a COM port!
It is not correct from a tinkerer’s to avoid this option. So this day ended up with a small Python program (also golang, but that’s a different story) to use this feature.

more

6 Comments

Filed under code, tools