[gdal-dev] Build GDAL OGR with GEOS

Jeff McKenna jmckenna at gatewaygeomatics.com
Tue May 7 15:27:39 PDT 2013


On 2013-05-07 7:02 AM, MARION VIOLOT wrote:
> Hi again everyone.
> 
> Does someone could please detail me the steps to follow in order to
> build GDAL-OGR with GEOS on Windows, with Visual Studio 2008 please? I
> found the following link ;
> 
> http://trac.osgeo.org/gdal/wiki/MakeFileProjects
> 
> http://trac.osgeo.org/gdal/wiki/BuildingOnWindows
> 
> http://vterrain.org/Distrib/gdal.html
> 
> At the end, do I have to create a Make File Project or use a Visual
> Studio solution? I already managed to build GDAL-OGR (using the command
> prompt) and used it, but I don't know if it was the proper way. Plus, I
> need OGR to be built with GEOS.
> 
> Besides, I don't know which version of GEOS I should use from this link
> : http://trac.osgeo.org/geos/ ?
> 
> To finish, how can I do to build them together? I already found the
> following discussion but it doesn't really help me :
> 
> http://lists.osgeo.org/pipermail/gdal-dev/2009-October/022241.html
> 
> I'm quite lost, so any help would be very appreciate. Thank you in advance.
> 
> Marion.
> 
> 

Hi Marion,

It's actually very straightforward to compile GEOS on windows.  Since
you're already familiar with commandline through your GDAL build, here
are my steps (note that others likely use cmake or other methods, but
this is what works for me).

- download 3.3.8 from http://trac.osgeo.org/geos/
- in MSVC command window:
  - cd to geos-3.3.8
  - autogen.bat
  - nmake /f makefile.vc MSVC_VER=1500
- output is in /src/
- cd into gdal
- edit nmake.opt
  - change GEOS_DIR, GEOS_CFLAGS, GEOS_LIB variables for your local paths
- nmake /f makefile.vc clean
- nmake /f makefile.vc

(this is what I've been doing for MS4W for many years)

Enjoy,

-jeff

-- 
Jeff McKenna
MapServer Consulting and Training Services
http://www.gatewaygeomatics.com/






More information about the gdal-dev mailing list