asking_science

u/asking_science


r/QGIS•

The algorithm/s used to produce a hillshade raster from a DEM surely must be a reversible process, and it should (in theory) be possible to obtain elevation data by running the hillshade process 'backwards'. The actual, original elevation data might not be recoverable but relative elevation should be preserved, and the loss of fidelity should be within acceptable limits.

Any suggestions? Are there plugins or extensions that do this?

14

r/QGIS•

I have recently discovered this amazing plugin and it kinda saved my ass on a recent project, so I like it more than I probably would have, but it is definitely worth checking out if you haven't used it before.

It's probably one of the most feature-rich, useful, complex QGIS plugins and so it does have quite a learning curve, but it does a heck of a lot more than just semi-automatic classification.

Here's its subreddit: https://www.reddit.com/r/semiauto_class/

Also, it's frikken' free.

Disclaimer: I have no vested interest in this plugin other than being an ordinary (and highly impressed) user.

252

r/QGIS•
  • One way is to just add a column to the table which includes the pre-calculated area, but this requires a trigger (any changes or addition requires an update) and it uses additional space

  • What I am looking for is a way to structure the query (or filter) in such a way that the area is calculated on-the-fly just prior to composing the label. I tried with format('%1 (%2 m^2), name, area(geom::geography)) but QGIS cannot see the geom column (for some reason not obvious to a noob)

  • In pgAdmin4, the query SELECT ST_Area(geom::geography) FROM local_parks; has the desired results, showing a column of areas (in square meters)

69

r/arduino•

This was originally posted as a reply in a thread, but I thought it might be of more general interest.

Pastebin

Here's a very simple, watered-down explanation of a State Machine. In this example I'm working with the ATMega328 (Arduino UNO, etc.), and you can find its user manual here.

A finite-state machine can only be in one state at any given time. Each state is associated with some action.

Let's take your

212

r/u_asking_science•

The image

Central to this picture is an image of the SRAM of the ATMega328 which was programmed to produce the image.

Each little square represents a single bit of SRAM. The bits are arranged in 8-bit (1 byte) wide columns of which there are 24. Each column is 96 bytes high. There are a total of 2304 bytes of addressable memory, of which 256 are reserved for special use, and the remaining 2048 bytes make up the SRAM available to the firmware.

A few of the better known I/O registers are highlighted and pointed out (see page 428 of the datasheet for a complete register summary).

ADC 0x078 to 0x07C ADC settings and values are stored here

**PORT B,C,D 0x0

21

r/arduino•

This post refers to the ATMega328P on which the code was tested, but should also apply to many/most Atmel mcus. Page and section references refer to the ATMega328P User's Manual. 'MCU' means 'microprocessor'.

#Timers gonna time

The ATMega328P MCU (Arduino UNO, ProMini, etc.) has 3 built-in timers, aptly named TIMER0 (p.125), TIMER1 (p.149) and TIMER2 (p.189). TIMER0 and TIMER2 are 8-bit, and TIMER1 is 16-bit. Among other purposes, these timers are used in ADC operations, for generating PWM and for raising interrupts. It is often the case that not all timers are being used at

2112

r/arduino•

This post refers to the ATMega328P on which the code was tested, but should also apply to many/most Atmel mcus. The code is in plain C and is (obviously) compatible with, but not specific to the Arduino IDE. Inspired by recent discussions in this forum. Learn from it what you didn't know, add to it if you can.

<-Part 1 | Part 2 | Part 3->

#Serialization

In simple and naive terms: When a software construct/object is converted to its byte-array equivalent, the construct has been serialized. When the construct is re-constructed from that byte-array, it has been deserialized.

11