[Gdal-dev] Ogr and Postgis support

Brian Hamlin maplabs at light42.com
Sat Sep 29 11:54:31 EDT 2007


for what it is worth, I built a PostGIS environment on Mac OSX and it  
works fine. The stock python is I think 2.3. I would have to look up  
the exact order, but I followed some instructions and it all worked -  
install proj, PostgreSQL, GEOS, PostGIS, and build GDAL. Some of the  
environment was picked up by configure, and others I had to help out a  
bit. Looking in the output of configure it was very plain what was  
detected and what was not.

For python, I have since upgraded to 2.5.1, leaving me with two python  
installs, which causes me grief now and then. But basically, the GDAL  
bindings work fine. I installed Numeric and that works fine. I do not  
follwo the talk of NumPy and new Python bindings. I expect that will  
clear up as time goes on, meanwhile I use what I have. A version of  
1.4.2 with my own changes to it.

best regards
   -Brian

On Sep 29, 2007, at 3:41 AM, Lucian Canacheu wrote:

> Hi Gus,
> In short, no. PostGIS support is disabled by default and if you user  
> the binary distro fromgdal.org, that it is a "minimalist" build.  
> Whatever Python bindings you add to it you won't get PostGIS support -  
> it is not "enabled" in that distribution.
> I passed over your messages. I'm using Python bindings for  
> GDAL/OGR/OSR with PostGIS and  a couple of years  ago (I think with  
> version 1.3.0 or so) I had very  tough times trying to install GDAL  
> binaries into a Python "clean" environment. I've tried lots of things  
> and in my opinion it was not the right way to do it. So, it may sound  
> scary, you have to build yourself most of the needed libraries from  
> sources (in this order) - proj4.5, libecw3.3, install Postgresql and  
> PostGIS, geos2.2.3. The GDAL compilation works flawlessly on Win32  
> with VS 2003 and on Linux with compiler gcc 3.4.6.
> I used these setup procedures ever since GDAL v 1.3.x. Give it a try  
> and you'll see it works.
> If you work this way, you'll have the chance to enable PostGIS  
> extensions on Win32 platform. These are disabled by default:
>
> # PostGIS Libraries
> #PG_INC_DIR = n:\pkg\libpq_win32\include
> #PG_LIB = n:\pkg\libpq_win32\lib\libpqdll.lib wsock32.lib
> in the nmake.opt file
>
> On Linux, you have to do something like this:
> ./configure --with-python=/opt/python-2.4.4/bin/python  
> --with-postgres-includes=/usr/include/pgsql  
> --with-postgres-libraries=/usr/lib
>
> in order to enable PostGIS.
>
> Cheers,
> Lucian
>
>
> --  
>
> Lucian Canacheu
>
> Glipco Srl Deva
> IT/GIS/Tech
> Mobile: +40 788 503 385
> E-mail: lcanacheu at glipco.ro
>
>
>
>
> Gustavo Ces wrote:
>> Hi all,
>>      I¡Zve posted a few weeks ago about gdal installing in a python  
>> 2.4 "clean" version. I¡Zve achieved to install
>> python, gdal ( win bin & python bindings ), and other stuff ( with  
>> your help). But now i¡Zve got a problem. I can connect to Posgis with  
>> pygresql, but i can¡Zt do the same with gdal. Running 'ogrinfo  
>> --formats', there isn¡Zt a postgis one. So i supose there isn¡Zt  
>> support in Gdal¡Zs ogr distribution for this DBMS. Maybe i¡Zm wrog. Any  
>> help?
>>     Thanks in advance,
>>  Gus
>>
>>
>> __________ NOD32 2556 (20070928) Information __________
>>
>> This message was checked by NOD32 antivirus system.
>> http://www.eset.com
>> ---------------------------------------------------------------------- 
>> --
>>
>> _______________________________________________
>> Gdal-dev mailing list
>> Gdal-dev at lists.maptools.org
>> http://lists.maptools.org/mailman/listinfo/gdal-dev
>>
>>
>> __________ NOD32 2556 (20070928) Information __________
>>
>> This message was checked by NOD32 antivirus system.
>> http://www.eset.com
>>
>
>
> -- 
>
> Lucian Canacheu
>
> Glipco Srl Deva
> IT/GIS/Tech
> Mobile: +40 788 503 385
> E-mail: lcanacheu at glipco.ro
>
>
>
> _______________________________________________
> Gdal-dev mailing list
> Gdal-dev at lists.maptools.org
> http://lists.maptools.org/mailman/listinfo/gdal-dev





More information about the Gdal-dev mailing list