[postgis-users] raster2pgsql, netcdf, and windows

Mike T mtmail at optonline.net
Mon Mar 3 10:27:48 PST 2014


Thanks for the feedback.  At least I know I understood the problem 
correctly.  I'll try converting the data as you suggest, or teasing 
it with SciPy, at least until I can move the project onto a Linux box.

Is there a list of any other differences between the full PostGIS, 
and what's in the Win executables?  That would be good info to have.

Thanks again!

At 10:13 AM 3/3/2014, you wrote:
>You are correct the PostGIS windows GDAL lib for raster support 
>(which includes raster2pgsql) is not built with netcdf support.  We 
>built it to not require extra dependencies beyond what gdal includes,
>what you could do is use MS4W 
>and use gdal_translate to convert to a supported format.  Though 
>this may not be an option depending on what you want to read from it.
>I recall trying once to build in with netcdf and ran into issues 
>(mostly with additional dependencies required like hdf this 
>that)  so put it aside as a non-trivial bit of effort to include that.
>If there is enough interest and people are willing to subsidize our 
>effort, we'd be willing to put in the work to add it and maintain it 
>as part of PostGIS windows distribution.
>Windows PostGIS Stack Builder maintainer
>From: postgis-users-bounces at lists.osgeo.org 
>[mailto:postgis-users-bounces at lists.osgeo.org] On Behalf Of Mike T
>Sent: Thursday, February 27, 2014 1:28 PM
>To: PostGIS Users Discussion
>Subject: [postgis-users] raster2pgsql, netcdf, and windows
>Hi all,
>I'm new to PostGIS, so I apologize in advance if this has been asked 
>and answered, or if this the wrong place.
>I've just installed Postgres 9.3 on Windows 8.1 from pre-built 
>binaries, and had installed PostGIS 2.1.1 via Stack Builder .  I'm 
>trying to use raster2pgsql on a netcdf file.  Does anyone know if 
>this is supported on Windows?  All I get is "unable to read raster file".
>raster2pgsql -G yields a long list with nothing that looks like 
>netcdf.  From what I've able to gather from the docs, there's some 
>underlying dependency with GDAL stuff.  But on Windows, installing 
>from pre-built binaries, there's no separate gdal toolkit I can 
>see.  I believe it's all already baked into the distributed 
>executable.  If I need to alter the underlying tools, or rebuild 
>with a netcdf library, I'm not sure how I'd go about that.  I can 
>probably build from sources if I have to, but I'd really rather not 
>go down that rabbit hole.
>I tried reinstalling PostGIS from the latest dev binary 
>distribution, but there's no difference.
>I was able to install MS4W, which includes a version of gdal tools 
>for Windows, and, using that, I can read the netcdf metadata, so I 
>know the file itself is good.
>Does anyone know how I can get raster2pgsql to recognize it?  Did I 
>miss a step, or is this just not possible on Windows?
>Any suggestions, or pointers to additional info would be a big help!
>postgis-users mailing list
>postgis-users at lists.osgeo.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20140303/e2113b68/attachment.html>

More information about the postgis-users mailing list