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