From bbd906de4bf23188ac93d0e3ad7fae9552be6e01 Mon Sep 17 00:00:00 2001 From: Sam Date: Tue, 13 Aug 2024 18:57:54 +0100 Subject: [PATCH] Small modifications to article --- content/blog/batch-import-postgis-rasters.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/content/blog/batch-import-postgis-rasters.md b/content/blog/batch-import-postgis-rasters.md index 437be0b..212f5ba 100644 --- a/content/blog/batch-import-postgis-rasters.md +++ b/content/blog/batch-import-postgis-rasters.md @@ -24,7 +24,7 @@ The final image looks like this: It's possible to download the entire SRTM (Shuttle Radar Topography Mission) satellite imagery dataset and insert it into a Postgres database for personal use. This can be helpful for if you need global elevation data for your analysis and don't want to be limited by third-parties APIs. 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. +In this guide we will go through the process of 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 on how to do this can be found on the [PostGIS](https://postgis.net/documentation/getting_started/) website. @@ -51,6 +51,8 @@ Next we can run the following command to download the rasters. This will take so aws s3 cp s3://raster/SRTM_GL1/ . --recursive --endpoint-url https://opentopography.s3.sdsc.edu --no-sign-request {{}} +If you'd prefer to download specific rasters or rasters for a region instead, you can checkout this [website](https://dwtkns.com/srtm30m/). + ## Using raster2pgsql to import raster tiles into PostGIS Now we have the data downloaded on our system, we can import it into our database. If we look inside the SRTM_GL1_srtm directory, we can see all of the 14280 raster files: @@ -218,7 +220,7 @@ vacuum analyze "dem"."singapore_srtm"; Looks much better! -This DEM raster of Singapore is available for download from our downloads page [here](/data-downloads/singapore-srtm) +This DEM raster of Singapore is available for download from the downloads page [here](/data-downloads/singapore-srtm) #### Citations NASA Shuttle Radar Topography Mission (SRTM)(2013). Shuttle Radar Topography Mission (SRTM) Global. Distributed by OpenTopography. https://doi.org/10.5069/G9445JDF. Accessed: 2024-08-06