<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Tahoma
}
--></style>
</head>
<body class='hmmessage'>
Ok, here are more details:<BR>
&nbsp;<BR>
I am using Python (2.6) together with netCDF4, numpy and&nbsp;gdal/ogr.<BR>
So far,&nbsp;I am able to read the dimensions, attributes and variables.<BR>
&nbsp;<BR>
I have to&nbsp;choose records depending on certain time slices and export these<BR>
records together with their dimensions into a shapefile.<BR>
So, if four time slices are selected four shp files will be created.<BR>
&nbsp;<BR>
Currently, I am designing a GUI with Tkinter for data I/O and time slice selection.<BR>
For the&nbsp;conversion task i would prefer a direct method&nbsp;without caching&nbsp;into a file.<BR>
I may use normal arrays or pytables....<BR>
&nbsp;<BR>
Just wanted to know what is the more efficient method for caching the data.<BR>
&nbsp;<BR>
Thanks for&nbsp;your support Mike!<BR>
<BR>&nbsp;<BR>
&gt; Date: Wed, 16 Mar 2011 16:21:23 +1100<BR>&gt; Subject: Re: [gdal-dev] netCDF to Shapefile<BR>&gt; From: mdsumner@gmail.com<BR>&gt; To: manuelrainer@hotmail.com<BR>&gt; CC: gdal-dev@lists.osgeo.org<BR>&gt; <BR>&gt; Hi Manuel, I think you will still need to be more specific. You've<BR>&gt; indicated that the data is points, but not what the variables in the<BR>&gt; file are, which variables need to be interrogated for coordinates vs.<BR>&gt; values, what their dimensions are, whether you want several<BR>&gt; shapefiles, or just one with (say) multiple attributes, etc.<BR>&gt; <BR>&gt; There are a number of ways to convert such data to shapefile, but it<BR>&gt; might be best to choose a reasonably easy scripting language to do it,<BR>&gt; such as Python or R - and so there are probably better forums than<BR>&gt; this for your problem.<BR>&gt; <BR>&gt; Either way you'll need to provide a lot more detail - it's likely to<BR>&gt; be a two step process, with converting the NetCDF grids to tables (in<BR>&gt; memory or file), and then those to point shapefiles.<BR>&gt; <BR>&gt; Cheers, Mike.<BR>&gt; <BR>&gt; On Wed, Mar 16, 2011 at 3:17 PM, Manuel Rainer &lt;manuelrainer@hotmail.com&gt; wrote:<BR>&gt; &gt; Thanks for your help,<BR>&gt; &gt; it has to be a Shapefile because we do some&nbsp;further processing (symbology,<BR>&gt; &gt; map creation...).<BR>&gt; &gt; The netCDF file contains hydrodynamics point data.<BR>&gt; &gt;<BR>&gt; &gt; Best regards<BR>&gt; &gt; Manuel<BR>&gt; &gt;<BR>&gt; &gt; ________________________________<BR>&gt; &gt; Date: Wed, 16 Mar 2011 09:32:16 +0530<BR>&gt; &gt; Subject: Re: [gdal-dev] netCDF to Shapefile<BR>&gt; &gt; From: chaitanya.ch@gmail.com<BR>&gt; &gt; To: manuelrainer@hotmail.com<BR>&gt; &gt; CC: gdal-dev@lists.osgeo.org<BR>&gt; &gt;<BR>&gt; &gt; Manuel,<BR>&gt; &gt;<BR>&gt; &gt; Shapefile is for vector formats alone. Try a raster format to convert the<BR>&gt; &gt; netCDF data.<BR>&gt; &gt;<BR>&gt; &gt; As for the performance, you don't need to cache anything. But it may help to<BR>&gt; &gt; tweak the GDAL_CACHEMAX setting.<BR>&gt; &gt; http://trac.osgeo.org/gdal/wiki/FAQRaster#Howtoimprovegdalwarpperfomance<BR>&gt; &gt;<BR>&gt; &gt; On Wed, Mar 16, 2011 at 8:21 AM, Manuel Rainer &lt;manuelrainer@hotmail.com&gt;<BR>&gt; &gt; wrote:<BR>&gt; &gt;<BR>&gt; &gt; Hi,<BR>&gt; &gt;<BR>&gt; &gt; I would like to convert certain time slices (records) out of a netCDF file<BR>&gt; &gt; to a Shapefile.<BR>&gt; &gt; The netCDF file has 7&gt; GB, so what is the best proceed to get an appropriate<BR>&gt; &gt; performance?<BR>&gt; &gt; I mean, should the data be cached (e.g. in an ASCII file, ...)<BR>&gt; &gt; before&nbsp;writing a&nbsp;Shapefile&nbsp;or can the shp directly be generated?<BR>&gt; &gt; Perhaps you have some experiences...<BR>&gt; &gt;<BR>&gt; &gt; Thanks for your help!<BR>&gt; &gt; Best regards<BR>&gt; &gt; Manuel<BR>&gt; &gt;<BR>&gt; &gt;<BR>&gt; &gt;<BR>&gt; &gt; _______________________________________________<BR>&gt; &gt; gdal-dev mailing list<BR>&gt; &gt; gdal-dev@lists.osgeo.org<BR>&gt; &gt; http://lists.osgeo.org/mailman/listinfo/gdal-dev<BR>&gt; &gt;<BR>&gt; &gt;<BR>&gt; &gt;<BR>&gt; &gt; --<BR>&gt; &gt; Best regards,<BR>&gt; &gt; Chaitanya kumar CH.<BR>&gt; &gt; /tʃaɪθənjə/ /kʊmɑr/<BR>&gt; &gt; +91-9494447584<BR>&gt; &gt; 17.2416N 80.1426E<BR>&gt; &gt;<BR>&gt; &gt; _______________________________________________<BR>&gt; &gt; gdal-dev mailing list<BR>&gt; &gt; gdal-dev@lists.osgeo.org<BR>&gt; &gt; http://lists.osgeo.org/mailman/listinfo/gdal-dev<BR>&gt; &gt;<BR>&gt; <BR>&gt; <BR>&gt; <BR>&gt; -- <BR>&gt; Michael Sumner<BR>&gt; Institute for Marine and Antarctic Studies, University of Tasmania<BR>&gt; Hobart, Australia<BR>&gt; e-mail: mdsumner@gmail.com<BR>                                               </body>
</html>