Questions tagged [gdal-contour]

Command line utility to generate vector contour lines from a raster elevation model.

Filter by
Sorted by
Tagged with
1
vote
2answers
53 views

Split long lines in PostGIS

I would like to render contours using Mapnik. The problem is that some contours are very long which makes rendering too slow and so I decided to spling long contours to multiple smaller segments. ...
1
vote
2answers
24 views

How to use gdal_contour to APPEND data?

I'm trying to import contours from SRTM HGT files. First try (nice): gdal_contour -f PostgreSQL -a elevation -i 10 srtm/S01W069.hgt "PG:host=volcano-db user=postgres password=guesswhat dbname=...
0
votes
0answers
13 views

Create an SLD style for contour curves [duplicate]

I have a database with controur curves generated by gdal_contour -f PostgreSQL -a elevation -nln contour_gdal -i 10 srtm/S23W043.hgt "PG:host=volcano-db user=johndoo password=guesswhat dbname=volcano"...
1
vote
1answer
84 views

File not found error using Contour in QGIS 3.4

CSV file load failure in "Contour" procedure, even though the same file will load and display from Layers>Add Layer>. This has not previously been true. The problem could be related to the use of ...
1
vote
0answers
331 views

Removing contour artifacts from low slope regions

I am generating contour lines from a DEM using QGIS and the python console. The process generates many small circles in regions of low slope (little black circles) that detract from the long connected ...
0
votes
0answers
279 views

How could I avoid extracting incorrectly closed contours from a raster with angled sides?

I'm updating a Python script which currently calls gdal_contour as a subprocess to extract contours. I'd like to replace gdal_contour with skimage.find_contours. However the output of the GDAL script ...
2
votes
1answer
146 views

Correctly scale topographic SRTM data in OSM

I am trying to create contour maps in OSM with scales of 1:50,000 and 1:250,000 using 30-meter NASA SRTM data from here. Examples of what I'm trying to achieve can be seen on LINZ NZ Contours 1:50k ...
2
votes
2answers
1k views

How can I extract contours from a raster with Python?

I currently run gdal_contour as a Python subprocess to extract contours from a raster file, but would like to achieve the same function with a combination of Rasterio, Shapely and Fiona. However, ...
0
votes
0answers
93 views

How to cut contour lines at coast line?

I have successful created a shapefile from an island with contours by downloading the data from http://srtm.csi.cgiar.org, converted it with gdal and imported it in TileMill. Everything is working ...
6
votes
0answers
219 views

GDAL contour line generation at DEM edges

In a Python application I use gdal.ContourGenerate() to generate contour lines (GDAL version 1.11.4 and 2.2.1) from DTED tiles. DTED tiles overlap at the top and the right with neighboring tiles. ...
2
votes
1answer
1k views

Calling Gdal contour from python/ipython

Hello I am trying to patch process a folder full of ASCs to contours using Gdal from python. here is my code; import os import glob PATH1 = raw_input("folder containing ASCs path please:") ...
3
votes
0answers
107 views

gdal_translate bilevel tiff output

I have a geotiff image that rings in at about 290MB. However, once I smooth it using a gaussian filter I'm unable to get it back to that size, it ends up being 1720MB. The size isn't really the ...
1
vote
0answers
215 views

How can I render heatmap contours from QGIS into tiles?

I have a heatmap and contours in QGIS, and I want to export these heatmaps as tiles. This works well with tiff, but I want to include contours into images, to make them look better. In QGIS, I can ...
1
vote
1answer
687 views

Grid-type shapefile from raster GeoTIFF

I need to produce a shapefile from a raster. I need to be able to specify either an interval, or manually define the intervals. The input file is a GeoTIFF. I would like to use GDAL and/or Python. ...
0
votes
1answer
139 views

How to cut contour lines at the edge of a data source

I have calculated some contour-lines using gdal-contour for two elevation model into a Postgis database. One is high res and the other lower res. Now I am seeing problems at the edge of my high ...
1
vote
1answer
274 views

gdal_contour is missing lines below a certain elevation

I have a very strange problem with gdal_contour. I have a very large GeoTif of Europe and would like to generate contour-lines for that region. Everything worked fine when I had lines every 25m but ...
1
vote
1answer
2k views

Convert .xyz to contours?

Can anyone help me convert .xyz file to a contours? I have recieved some .xyz files from the local council and am hoping to turn them into a terrain for 3d modelling. I have tried the ASCII to feature ...
6
votes
1answer
590 views

Merging GeoTiffs with GDAL causes grid-like artifacts?

I'm processing ASTER DEM tiles, merging them into larger blocks (to minimize visible tile edges) and importing the contours into a postgis database. Workflow: gdal_merge.py -of GTiff -o merged.tif ...
4
votes
1answer
375 views

artifacts in SRTM contour layers processed with GDAL tools and rendered with mapnik?

Here is my workflow for importing individual SRTM tiles into postgis using the GDAL utils and rendering a png using mapnik: gdal_fillnodata.py -srcnodata -32768 gdal_contour -i 10 -a ele -snodata -...
2
votes
2answers
463 views

QGIS Contour plugin: Creating complex isolines leads to isolated areas

I use the contour plugin (v1.1) within QGIS 2.4 to create contour lines. I have streets with different travel costs. I observe problems for streets with low travel costs if they are surrounded by ...
5
votes
2answers
574 views

Optimize Tilemill export of project with contour-lines (and fix out of memory problems)

I have a project in Tilemill (based on OSM-Bright) that covers Europe and also displays Contour-Lines. My problem is that the performance of Tilemill is pretty bad when displaying the contour lines ...
1
vote
1answer
89 views

gdalcontour output not aligned with the DEM

I use gdalcontour to generate the contour lines of a DEM in shapefile format. However the shapefile is not aligned with the DEM. Someone have a solution for this? GDAL version is 1.10 im using thins ...
4
votes
1answer
314 views

Suggestions for vector format for contour map

I've been trying to create a contour map of a DEM and I've been running into some technical problems. I want to avoid artifacts, so I'm using a DEM of the entire area. This means the size is rather ...