[gdal-dev] how to convert shapefile to netcdf?
pcreso at pcreso.com
pcreso at pcreso.com
Mon May 28 12:31:38 PDT 2012
I guess somewhat off topic for a devel list.... but my 02c
I'd use ogr2ogr to convert the shapefile to a GMT (Generic Mapping Tools) format vector file & use GMT to create the (COARDS compliant) netCDF grid file from the vector data.
GMT has several approaches possible, including triangulation, splines with tension, nearest neighbour, etc. You can use tools to convert polygons to grid values (much like gdalrasterize), or treat all the vertices as scattered point values...
If your global grid is also COARDS compliant, you can probably use GMT tools & some relatively simple scripting, to carry out the grid math/overlay operations as well.
Cheers,
Brent Wood
--- On Tue, 5/29/12, Chao YUE <chaoyuejoy at gmail.com> wrote:
From: Chao YUE <chaoyuejoy at gmail.com>
Subject: [gdal-dev] how to convert shapefile to netcdf?
To: gdal-dev at lists.osgeo.org
Date: Tuesday, May 29, 2012, 5:16 AM
Dear all,
I have a shapefile of boreal foest (which further contains some ecoregion types) in North America and I want to like convert it to a NetCDF file (or numpy masked array) with a desired spatial resolution (let's say 0.5 degree) and then use this information to extract corresponding data from a global NetCDF file. I spent past two days trying to find information online but still have no clues. If anybody has done something similar, any hints or suggestions are greatly appreciated. Thanks a lot.
best regards,
Chao
--
***********************************************************************************
Chao YUE
Laboratoire des Sciences du Climat et de l'Environnement (LSCE-IPSL)
UMR 1572 CEA-CNRS-UVSQ
Batiment 712 - Pe 119
91191 GIF Sur YVETTE Cedex
Tel: (33) 01 69 08 29 02; Fax:01.69.08.77.16
************************************************************************************
-----Inline Attachment Follows-----
_______________________________________________
gdal-dev mailing list
gdal-dev at lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/gdal-dev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20120528/1a461dad/attachment.html>
More information about the gdal-dev
mailing list