[gdal-dev] compiling GDAL with GEOS on Windows
Peter J Halls
P.Halls at york.ac.uk
Fri Oct 2 02:24:21 EDT 2009
Yilmaz,
I'll leave the GEOS / Windows compilation bit to those who know! However, I
can help on the nearest neighbour issue as I have done some research in this
area. To do it properly is non-trivial: indeed, it is effectively a Dirichlet /
Voronoi tessellation problem. For an outline and some bibliography see
Halls, P.J, Bulling, M., White, P.C.L., Garland, L., Harris, S., 2001, Dirichlet
neighbours: revisiting Dirichlet tessellation for neighbourhood analysis,
Computers, Environment and Urban Systems (CEUS) 25 pp105-117.
This is based on Robin Sibson and Peter Green's 'Natural Neighbours' algorithm,
Green, P., & Sibson, R, 1978, Computing Dirichlet tessellations in the plane;
Computer Journal 21 pp168-173.
This approach appears to be one of the fastest and most reliable algorithms for
computing a Dirichlet Tessellation. Once you have that tessellation, the
neighbours of each point are easy to identify - indeed, they 'fall out' of the
structure used by the Green and Sibson algorithm.
My software is written in Simula (the 'original' object programming
language), using the CIM Open Source Simula cross-compiler from the University
of Oslo and the OGR library via c calls. My 'neighbours' program computes for
each point in a dataset the set of 'natural neighbours' for each point,
identifies that which is nearest and reports the distances and angles to each
neighbour. CIM is written in c and cross compiles into c. I use the Cygwin
interface on Windows and the gcc compilers: I cannot comment on building CIM in
Visual Studio. However, should you wish, I would be willing to supply you with
my source.
Best wishes,
Peter
Yilmaz Arslanoglu wrote:
> Hi;
>
> I am trying to build and install the GDAL library on Windows XP
> using the following commands:
>
> nmake /f makefile.vc
> nmake /f makefile.vc install
> nmake /f makefile.vc devinstall
>
> In order to build with GEOS support, I uncommented the lines
> in the "nmake.opt" as follows:
>
> GEOS_DIR=C:\geos-3.1.1
> GEOS_CFLAGS = -I$(GEOS_DIR)/capi -I$(GEOS_DIR)/source/headers -DHAVE_GEOS
> GEOS_LIB = $(GEOS_DIR)/source/geos_c_i.lib
>
> However, I still get the same .dll and .lib files as if no GEOS
> support was turned on
> (the sizes are exactly the same). When I try to call
> "OGRGeometry::Contains()" method,
> I also get the error:
>
> "ERROR 6: GEOS support not enabled."
>
> What could be wrong?
>
> 2) I was also wondering whether OGR library provides a kind of nearest
> neighbour finding facilities?
> If not, does anybody know any library that could be integrated with
> OGR for this purpose?
> I plan to use it to find the n nearest sounding points (SOUNDG)
> given a point, to make a prediction
> about its depth.
>
> 3) Finally, is there any facility in OGR for querying a layer such that
> it will only return the features on it, which contain a given
> point as parameter?
> Because I could not come up with an SQL statement to perform this task.
> Actually I was planning to use this on the DEPARE (depth area) layer on
> an S-57 file to find the depth area polygon that covers the given point.
>
> Any idea or references about these issues would greatly be appreciated.
>
> Best regards,
> Yilmaz
> _______________________________________________
> gdal-dev mailing list
> gdal-dev at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/gdal-dev
--
--------------------------------------------------------------------------------
Peter J Halls, GIS Advisor, University of York
Telephone: 01904 433806 Fax: 01904 433740
Snail mail: Computing Service, University of York, Heslington, York YO10 5DD
This message has the status of a private and personal communication
--------------------------------------------------------------------------------
More information about the gdal-dev
mailing list