-2

I am a meteorologist and I make my own weather maps. There are some products that come to me as shapefiles. My main contouring program handles shapefiles, but poorly and slowly.

I'm looking for a command line solution I can run in Linux which will overlay a shapefile to a navigated map image. I'm willing to change my basemaps to conform if necessary.

  • 3
    Any information on what software you're currently working with, how you process your data and what exactly your desired output should contain are not only appreciated but mandatory. Because right now I'd say "use QGIS" and you'd be none the wiser. – Erik Mar 29 at 9:14
  • 4
    Why dont you convert the shapefile to a format your program handles better? – BERA Mar 29 at 9:40
  • gdal_rasterize will add a Vector file (shapefile) to an existing image. Runs on Linux. – klewis Mar 29 at 12:52
  • Erik - My basemaps are made in QGIS, but all my contouring is done in GrADS. In GrADS my basemaps are used as images (it can't read in navigated imagery). GrADS can process shapefiles but only grudgingly and slowly. Bera - I'd not thought of that because I had no idea you could do that. Program recommendation? – Geoff Fox Mar 30 at 6:20
  • klewis -- That looks exactly like what I want! Thank you. – Geoff Fox Mar 30 at 6:24
1

Can you build contours directly from a raster dataset?

GDAL_contour "Builds vector contour lines from a raster elevation model". This is not strictly limited to raster elevation models but will also work with other continuous raster datasets, such as air pressure.

You can find more here: https://www.gdal.org/gdal_contour.html

A basic example as provided by gdal is:

gdal_contour -a elev dem.tif contour.shp -i 10.0

where -a is the name of the attribute and -i is the contour interval. You can install gdal on any platform and run this in the command line

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.