[gdal-dev] netCDF to Shapefile

Andreas Forø Tollefsen andreasft at gmail.com
Wed Mar 16 07:05:18 EDT 2011


I have done this but not to a shapefile direct, but into a postgis database.
Use for loops to loop through the temporal dimension, then the lon and lat
as sub loops.
Then you create an insert string to input each line of data into the sql
database.
In our NetCDF we have 720x360 observations spatially and 1308 temporal
dimension observations.
Thats a lot of data!

Andreas


2011/3/16 Paolo Corti <pcorti at gmail.com>

> On Wed, Mar 16, 2011 at 3:51 AM, Manuel Rainer <manuelrainer at hotmail.com>
> wrote:
> > Hi,
> >
> > I would like to convert certain time slices (records) out of a netCDF
> file
> > to a Shapefile.
> > The netCDF file has 7> GB, so what is the best proceed to get an
> appropriate
> > performance?
> > I mean, should the data be cached (e.g. in an ASCII file, ...)
> > before writing a Shapefile or can the shp directly be generated?
> > Perhaps you have some experiences...
>
> Hi
> I don't know what you mean with performance (maybe the time needed to
> make the export or the subsequent access to them?), but as far as I
> remember shapefile has a file size
> limit of 2 Gb, I personally would avoid that approach.
> Here PostGis seems to well suit in the scenario, but if you don't have
> the possibility to access/create a PostGis infrastructure, I
> personally would give a try to Spatialite.
>
> If performance are really a concern, you could instead opt for a NoSQL
> database: CouchDb has a nice spatial module [0] as far as I have
> heard.
> You could use the shp2geocouch approach utility [1] (first export to json
> with
> ogr2ogr then json to couchdb) for loading your data.
> Please note that if you opt for the latest, I am not sure if you will
> have tools for symbology and map creation at this time, neither you
> can use the GDAL API.
>
> best regards
> Paolo
>
> [0] http://vmx.cx/blog/2009-11-17/geodata-and-couchdb.htm
> [1] https://github.com/maxogden/shp2geocouch/blob/master/bin/shp2geocouch
>
> --
> Paolo Corti
> Geospatial software developer
> web: http://www.paolocorti.net
> twitter: @paolo_corti
> _______________________________________________
> 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/20110316/adf77726/attachment.html


More information about the gdal-dev mailing list