Update content
This commit is contained in:
parent
28ad68cf46
commit
36beefd0dd
|
@ -14,7 +14,7 @@ In this article, we walk through the process of obtaining and downloading raster
|
|||
|
||||
We split these rasters into tiles and import them into a local Postgres database using PostGIS.
|
||||
|
||||
We then use this database and construct a query using PostGIS functions to generate a single DEM raster of Singapore and import this into QGIS.
|
||||
We then use tiles from this database to construct a query using PostGIS functions to generate a single DEM raster of Singapore and import this into QGIS.
|
||||
|
||||
The final image looks like this:
|
||||
|
||||
|
@ -26,7 +26,7 @@ It's possible to download the entire SRTM (Shuttle Radar Topography Mission) sat
|
|||
The SRTM is a near-global dataset of elevation data with a resolution of 1-arc-second (30m). More information is available from [USGS](https://www.usgs.gov/centers/eros/science/usgs-eros-archive-digital-elevation-shuttle-radar-topography-mission-srtm?qt-science_center_objects=0#qt-science_center_objects).
|
||||
In this guide we will go through downloading the data, inserting it into a Postgres database with PostGIS, then querying the final result to create a DEM for any country or region.
|
||||
|
||||
This guide assumes you are using Linux (this may also apply to other Unix like systems such as MacOS) and have a Postgres database with the PostGIS extension installed. More information [here](https://postgis.net/documentation/getting_started/).
|
||||
This guide assumes you are using Linux (this may also apply to other Unix like systems such as MacOS) and have a Postgres database with the PostGIS extension installed. More information on how to do this can be found on the [PostGIS](https://postgis.net/documentation/getting_started/) website.
|
||||
|
||||
## Download data
|
||||
|
||||
|
@ -104,7 +104,7 @@ I already have countries vector data in my Postgres database that I extracted fr
|
|||
|
||||
To create our table, we'll use the following SQL. I'll break down each section step-by-step.
|
||||
|
||||
First we'll use the `st_intersects` command to select all of the raster tiles that intersect with the Singapore. Note, we'll need to create a table, spatial index then apply constraints for this to work in QGIS.
|
||||
First we'll use the `st_intersects` command to select all of the raster tiles that intersect with the Singapore polygon. Note, we'll need to create a table, spatial index then apply constraints for this to work in QGIS.
|
||||
|
||||
{{< highlight sql >}}
|
||||
-- drop existing table and create a new table
|
||||
|
@ -139,7 +139,7 @@ select count(*) from dem.singapore_srtm
|
|||
|
||||
Here we have 153 of our 128x128 tiles.
|
||||
|
||||
We visualise these tiles in QGIS:
|
||||
We can visualise these tiles in QGIS:
|
||||
{{< figure src="/pics/blog/batch-import-postgis-rasters/singapore-intersects.webp" width="600">}}
|
||||
|
||||
Note, you can use the `st_convexhull` command to generate an outline of the raster tiles as seen in the previous figure:
|
||||
|
|
|
@ -7,6 +7,7 @@ header_image: "/pics/blog/install-artix/artix-logo.webp"
|
|||
draft: False
|
||||
summary: "This guide will run through the process of installing Artix Linux with runit as the init system on an encrypted disk partition."
|
||||
toc: true
|
||||
tags: ["Linux", "Arch"]
|
||||
---
|
||||
|
||||
This guide will run through the process of installing Artix Linux, which is a
|
||||
|
|
|
@ -6,6 +6,7 @@ author:
|
|||
header_image: "/pics/charts/feerate-percentile.webp"
|
||||
summary: "Bar chart showing historical median daily feerate percentiles for the Bitcoin protocol."
|
||||
chart: "/js/feerate_percentile.js"
|
||||
tags: ["Bitcoin", "Stats"]
|
||||
---
|
||||
|
||||
This chart shows historical median daily feerate percentiles for the Bitcoin
|
||||
|
|
|
@ -4,12 +4,16 @@ date: 2024-04-04T09:16:33+01:00
|
|||
author:
|
||||
name: "Sam Chance"
|
||||
header_image: "/pics/charts/growth.webp"
|
||||
summary: "Growth of bitcoin businesses based on OSM data"
|
||||
summary: "This analysis uses OpenStreetMaps data to chart the yearly growth of bitcoin-accepting businesses worldwide."
|
||||
tags: ["Bitcoin", "Stats", "OpenStreetMaps"]
|
||||
---
|
||||
The following table shows bitcoin business growth around the world for the selected period in the dropdown. The chart displays yearly cumulative number of bitcoin businesses for the countries selected in the table.
|
||||
|
||||
Data is obtained from Openstreetmaps and is updated roughly every 2 hours.
|
||||
<br/>
|
||||
The table below illustrates growth of businesses worldwide that accept bitcoin as payment for products or services. The accompanying chart displays the yearly cumulative number of bitcoin-accepting businesses for the countries selected in the table. The data is sourced from OpenStreetMaps and is updated approximately every 2 hours.
|
||||
|
||||
You can select the growth period of interest from the drop-down, which updates the values in the table. The table shows the ***Previous*** value, which was the number of businesses *n* days ago specified in the drop-down. The ***Current*** value is the number of businesses as of the latest update. The table also shows the ***Absolute Difference***, and the ***Percent Difference*** between this period.
|
||||
|
||||
The chart always reflects the countries selected in the table. There is a zoom feature on the chart to focus in on a period of interest.
|
||||
|
||||
<br/>
|
||||
Select growth period: {{< dropdown-filter id=cumulative_period_type select="365 day,28 day,7 day,1 day" >}}
|
||||
{{< chart src="/js/bitcoin-business-growth-chart.js" >}}
|
||||
|
|
|
@ -5,6 +5,7 @@ author:
|
|||
name: "Sam Chance"
|
||||
header_image: "/pics/charts/hashrate.webp"
|
||||
summary: "Timeseries chart showing the Bitcoin network hashrate and difficulty."
|
||||
tags: ["Bitcoin", "Stats", "Hashrate"]
|
||||
---
|
||||
|
||||
The estimated hashrate and difficulty of the Bitcoin network, accompanied by the 28-day moving average.
|
||||
|
|
|
@ -6,7 +6,7 @@ author:
|
|||
summary: "Miner rewards"
|
||||
header_image: "/pics/charts/rewards.webp"
|
||||
draft: false
|
||||
chart: "/js/miner-rewards.js"
|
||||
tags: ["Bitcoin", "Stats"]
|
||||
---
|
||||
|
||||
Total daily aggregated miner income denominated in USD for that day.
|
||||
|
|
|
@ -5,6 +5,7 @@ author:
|
|||
name: "Sam Chance"
|
||||
header_image: "/pics/charts/price.webp"
|
||||
summary: "Daily bitcoin price. Data is obtained from CoinGecko using their public API."
|
||||
tags: ["Bitcoin", "Stats"]
|
||||
---
|
||||
|
||||
Daily bitcoin price. Data is obtained from CoinGecko using their
|
||||
|
|
Loading…
Reference in New Issue