Commit 3bc5d7fa authored by Paul Ramsey's avatar Paul Ramsey

Tag 3.0.1


git-svn-id: http://svn.osgeo.org/geos/tags/3.0.1@2205 5242fede-7e19-0410-aef8-94bd7d2200fb
parents 39353b50 17a62302
$Id$
2008-07-31 Mateusz Loskot <mateusz@loskot.net>
* capi/geos_c.cpp, capi/geos_c.h.in, tests/unit/Makefile.am,
tests/unit/capi/GEOSPolygonizer_getCutEdgesTest.cpp: Patch completing
C API interface with wrapper on Polygonizer::getCutEdges (Ticket #195).
Unit test included in tests/unit/capi/GEOSPolygonizer_getCutEdgeTest.cpp.
2008-07-26 Mateusz Loskot <mateusz@loskot.net>
* r2138 - r2143: Tickets #167, #191, #192
2008-07-25 Mateusz Loskot <mateusz@loskot.net>
* trunk/build/README, trunk/build/msvc80/README trunk/macros/geos.m4,
trunk/source/headers/geos/algorithm/CentralEndpointIntersector.h,
trunk/source/headers/geos/geomPrep.h,
trunk/source/headers/geos/indexIntervalRTree.h,
trunk/source/headers/geos/noding/FastNodingValidator.h,
trunk/source/headers/geos/noding/SingleInteriorIntersectionFinder.h,
trunk/source/noding/FastNodingValidator.cpp,
trunk/source/noding/SingleInteriorIntersectionFinder.cpp,
trunk/source/operation/buffer/OffsetCurveVertexList.h,
trunk/swig/python/tests/TESTING.txt:
tests/unit/operation/IsSimpleOpTest.cpp,
tests/unit/precision/SimpleGeometryPrecisionReducerTest.cpp:
Updated svn:keywords property
2008-07-19 Frank Warmerdam
* r2123 - r2135
2008-07-15 Mateusz Loskot <mateusz@loskot.net>
* source\algorithm\RobustDeterminant.cpp,
source\algorithm\locate\IndexedPointInAreaLocator.cpp,
source\algorithm\ConvexHull.cpp,
source\precision\SimpleGeometryPrecisionReducer.cpp,
source\planargraph\DirectedEdge.cpp,
source\operation\buffer\OffsetCurveSetBuilder.cpp,
source\operation\buffer\BufferBuilder.cpp,
source\operation\buffer\BufferOp.cpp,
source\operation\distance\ConnectedElementPointFilter.cpp,
source\io\ByteOrderValues.cpp, source\index\bintree\Key.cpp,
source\index\quadtree\Key.cpp, source\geomgraph\GeometryGraph.cpp,
source\geomgraph\EdgeEnd.cpp, source\headers\geos\geom\LineSegment.inl,
source\headers\geos\geom\Coordinate.inl, source\headers\geos\io\WKBReader.h,
source\headers\geos\noding\IntersectionAdder.h, source\util\math.cpp,
source\noding\Octant.cpp, tests\xmltester\markup\MarkupSTL.h,
tests\xmltester\XMLTester.cpp, capi\geos_c.cpp: Fixed compilation on
with Sun Studio compiler on Solaris x86 and Sparc (Ticket #189). Thanks
to Magne Mahre for the patch.
2008-05-20 Mateusz Loskot <mateusz@loskot.net>
* bootstrap.bat: Added script generating headers for use with Visual C++
compiler. DO NOT include this script in GEOS source distribution.
* source/makefile.vc: Do not make copies of 3 dynamic headers but let
users to use bootstrap.bat instead. Fixed compilation error by removing
non-existing file entry: source\geom\prep\PreparedPolygonLineIntersection.cpp
* source\headers\geos\util.h: Add UNREFERENCED_PARAMETER macro.
* source\geom\PrecisionModel.cpp, source\geom\GeometryComponentFilter.cpp,
source\geom\util\GeometryTransformer.cpp, source\precision\GeometrySnapper.cpp,
source\precision\CommonBitsRemover.cpp, source\simplify\DouglasPeuckerSimplifier.cpp,
source\operation\overlay\OverlayOp.cpp, source\operation\overlay\FuzzyPointLocator.cpp,
source\index\quadtree\NodeBase.cpp, source\headers\geos\geom\BinaryOp.h,
source\headers\geos\operation\overlay\PointBuilder.h,
source\headers\geos\noding\MCIndexNoder.h,
source\headers\geos\noding\ScaledNoder.h, source\headers\geos\noding\Octant.h,
source\noding\ScaledNoder.cpp, source\noding\snapround\MCIndexPointSnapper.cpp,
source\noding\SegmentString.cpp, tests\unit\geom\DimensionTest.cpp:
Use UNREFERENCED_PARAMETER macro to get rid of C4100 warning when building with Visual C++.
* build\msvc80\geos_lib\geos_lib.vcproj: Remove non-existing source files.
--------- GEOS-3.0.0 release [2007-12-21] --------------------------
......
Changes in 3.0.1
- To be added
Changes in 3.0.0
These are mostly ABI breaking changes.
......
#!/bin/sh
#
# $Id$
#
# GEOS Bootstrapping Script
#
giveup()
{
echo
......@@ -16,7 +12,7 @@ OSTYPE=`uname -s`
for libtoolize in glibtoolize libtoolize; do
LIBTOOLIZE=`which $libtoolize 2>/dev/null`
if test -x "${LIBTOOLIZE}"; then
if test "$LIBTOOLIZE"; then
break;
fi
done
......
@ECHO OFF
REM $Id$
REM
REM This script generates headers for use with Visual C++ only
REM
REM Usage:
REM .\bootstrap.bat
REM nmake -f makefile.vc
REM
REM NOTE: DO NOT include this script in GEOS sources distribution
REM
set GEOS_HEADERS=source\headers\geos
COPY %GEOS_HEADERS%\version.h.vc %GEOS_HEADERS%\version.h
COPY %GEOS_HEADERS%\platform.h.vc %GEOS_HEADERS%\platform.h
COPY capi\geos_c.h.in capi\geos_c.h
$Id$
*** STATUS OF BBv2 CONFIGURATION IS EXPERIMENTAL***
build/bjam provides a set of Jamfiles for Boost Build v2 system and bjam builder tool.
Author: Mateusz Loskot <mateusz@loskot.net>
......@@ -43,12 +43,10 @@ lib libgeos
[ set.difference
[ glob algorithm/*.cpp ] : [ glob algorithm/*RobustLineIntersector.cpp ]
]
[ glob algorithm/locate/*.cpp ]
[ glob geom/*.cpp ]
[ glob geom/util/*.cpp ]
[ glob index/*.cpp ]
[ glob index/chain/*.cpp ]
[ glob index/intervalrtree/*.cpp ]
[ glob index/strtree/*.cpp ]
[ glob index/sweepline/*.cpp ]
[ glob io/*.cpp ]
......
......@@ -16,7 +16,6 @@ EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{8584EE81-D4E9-4EC7-ABF2-389E5F9D0107}"
ProjectSection(SolutionItems) = preProject
..\..\AUTHORS = ..\..\AUTHORS
..\..\bootstrap.bat = ..\..\bootstrap.bat
..\..\ChangeLog = ..\..\ChangeLog
..\..\COPYING = ..\..\COPYING
..\..\INSTALL = ..\..\INSTALL
......
This diff is collapsed.
<?xml version="1.0" encoding="windows-1250"?>
<VisualStudioProject
ProjectType="Visual C++"
Version="8,00"
Version="8.00"
Name="geos_unit"
ProjectGUID="{30461863-CCA4-4A8F-8BEE-1AB57060D5C2}"
RootNamespace="geos_unit"
......@@ -92,7 +92,7 @@
<Tool
Name="VCPostBuildEventTool"
Description="Running regression tests using $(ProjectName)d.exe..."
CommandLine="cd $(OutDir)&#x0D;&#x0A;$(ProjectName)d.exe&#x0D;&#x0A;"
CommandLine="cd $(OutDir)&#x0D;&#x0A;$(ProjectName)d.exe"
/>
</Configuration>
<Configuration
......@@ -280,14 +280,6 @@
>
</File>
</Filter>
<Filter
Name="prep"
>
<File
RelativePath="..\..\..\tests\unit\geom\prep\PreparedGeometryFactoryTest.cpp"
>
</File>
</Filter>
</Filter>
<Filter
Name="noding"
......
......@@ -16,8 +16,6 @@
***********************************************************************/
#include <geos/geom/Geometry.h>
#include <geos/geom/prep/PreparedGeometry.h>
#include <geos/geom/prep/PreparedGeometryFactory.h>
#include <geos/geom/GeometryCollection.h>
#include <geos/geom/Polygon.h>
#include <geos/geom/Point.h>
......@@ -56,7 +54,6 @@
// Some extra magic to make type declarations in geos_c.h work - for cross-checking of types in header.
#define GEOSGeometry geos::geom::Geometry
#define GEOSPreparedGeometry geos::geom::prep::PreparedGeometry
#define GEOSCoordSequence geos::geom::CoordinateSequence
#define GEOSWKTReader_t geos::io::WKTReader
#define GEOSWKTWriter_t geos::io::WKTWriter
......@@ -323,27 +320,31 @@ GEOSRelate(const Geometry *g1, const Geometry *g2)
try {
IntersectionMatrix *im = g1->relate(g2);
std::string s;
char *result;
if (im == NULL)
return NULL;
std::string s(im->toString());
char *result = NULL;
s= im->toString();
result = (char*) std::malloc( s.length() + 1);
std::strcpy(result, s.c_str() );
delete im;
return result;
}
catch (const std::exception &e)
{
ERROR_MESSAGE("%s", e.what());
return NULL;
}
catch (...)
{
ERROR_MESSAGE("Unknown exception thrown");
return NULL;
}
return NULL;
}
......@@ -530,10 +531,11 @@ GEOSGeomToWKT(const Geometry *g1)
try
{
std::string s = g1->toString();
char *result;
result = (char*) std::malloc( s.length() + 1);
std::strcpy(result, s.c_str() );
return result;
return result;
}
catch (const std::exception &e)
{
......@@ -564,7 +566,7 @@ GEOSGeomToWKB_buf(const Geometry *g, size_t *size)
unsigned char *result;
result = (unsigned char*) std::malloc(len);
std::memcpy(result, wkbstring.c_str(), len);
memcpy(result, wkbstring.c_str(), len);
*size = len;
return result;
}
......@@ -626,7 +628,7 @@ GEOSGeomToHEX_buf(const Geometry *g, size_t *size)
char *result;
result = (char*) std::malloc(len);
std::memcpy(result, hexstring.c_str(), len);
memcpy(result, hexstring.c_str(), len);
*size = len;
return (unsigned char*) result;
}
......@@ -1349,54 +1351,6 @@ GEOSPolygonize(const Geometry * const * g, unsigned int ngeoms)
return out;
}
Geometry *
GEOSPolygonizer_getCutEdges(const Geometry * const * g, unsigned int ngeoms)
{
using geos::operation::polygonize::Polygonizer;
unsigned int i;
Geometry *out = NULL;
try{
// Polygonize
Polygonizer plgnzr;
for (i=0; i<ngeoms; i++) plgnzr.add(g[i]);
#if GEOS_DEBUG
NOTICE_MESSAGE("geometry vector added to polygonizer");
#endif
std::vector<const LineString *>*lines = plgnzr.getCutEdges();
#if GEOS_DEBUG
NOTICE_MESSAGE("output polygons got");
#endif
// We need a vector of Geometry pointers, not
// Polygon pointers.
// STL vector doesn't allow transparent upcast of this
// nature, so we explicitly convert.
// (it's just a waste of processor and memory, btw)
std::vector<Geometry*> *linevec =
new std::vector<Geometry *>(lines->size());
for (i=0; i<lines->size(); i++) (*linevec)[i] = (*lines)[i]->clone();
out = geomFactory->createGeometryCollection(linevec);
// the above method takes ownership of the passed
// vector, so we must *not* delete it
}
catch (const std::exception &e)
{
ERROR_MESSAGE("%s", e.what());
return NULL;
}
catch (...)
{
ERROR_MESSAGE("Unknown exception thrown");
return NULL;
}
return out;
}
Geometry *
GEOSLineMerge(const Geometry *g)
{
......@@ -1775,7 +1729,8 @@ GEOSGeom_createLineString(CoordinateSequence *cs)
}
Geometry *
GEOSGeom_createPolygon(Geometry *shell, Geometry **holes, unsigned int nholes)
GEOSGeom_createPolygon(Geometry *shell, Geometry **holes,
unsigned int nholes)
{
using geos::geom::LinearRing;
try
......@@ -2030,7 +1985,8 @@ GEOSWKTWriter_write(WKTWriter *writer, const Geometry *geom)
try
{
std::string s = writer->write(geom);
char *result = NULL;
char *result;
result = (char*) std::malloc( s.length() + 1);
std::strcpy(result, s.c_str() );
return result;
......@@ -2038,13 +1994,14 @@ GEOSWKTWriter_write(WKTWriter *writer, const Geometry *geom)
catch (const std::exception &e)
{
ERROR_MESSAGE("%s", e.what());
return NULL;
}
catch (...)
{
ERROR_MESSAGE("Unknown exception thrown");
return NULL;
}
return NULL;
}
/* WKB Reader */
......@@ -2059,13 +2016,14 @@ GEOSWKBReader_create()
catch (const std::exception &e)
{
ERROR_MESSAGE("%s", e.what());
return NULL;
}
catch (...)
{
ERROR_MESSAGE("Unknown exception thrown");
return NULL;
}
return NULL;
}
void
......@@ -2103,13 +2061,14 @@ GEOSWKBReader_read(WKBReader *reader, const unsigned char *wkb, size_t size)
catch (const std::exception &e)
{
ERROR_MESSAGE("%s", e.what());
return NULL;
}
catch (...)
{
ERROR_MESSAGE("Unknown exception thrown");
return NULL;
}
return NULL;
}
Geometry*
......@@ -2128,13 +2087,14 @@ GEOSWKBReader_readHEX(WKBReader *reader, const unsigned char *hex, size_t size)
catch (const std::exception &e)
{
ERROR_MESSAGE("%s", e.what());
return NULL;
}
catch (...)
{
ERROR_MESSAGE("Unknown exception thrown");
return NULL;
}
return NULL;
}
/* WKB Writer */
......@@ -2149,13 +2109,14 @@ GEOSWKBWriter_create()
catch (const std::exception &e)
{
ERROR_MESSAGE("%s", e.what());
return NULL;
}
catch (...)
{
ERROR_MESSAGE("Unknown exception thrown");
return NULL;
}
return NULL;
}
void
......@@ -2188,21 +2149,23 @@ GEOSWKBWriter_write(WKBWriter *writer, const Geometry *geom, size_t *size)
std::string wkbstring = s.str();
size_t len = wkbstring.length();
unsigned char *result = NULL;
unsigned char *result;
result = (unsigned char*) std::malloc(len);
std::memcpy(result, wkbstring.c_str(), len);
memcpy(result, wkbstring.c_str(), len);
*size = len;
return result;
}
catch (const std::exception &e)
{
ERROR_MESSAGE("%s", e.what());
return NULL;
}
catch (...)
{
ERROR_MESSAGE("Unknown exception thrown");
return NULL;
}
return NULL;
}
/* The owner owns the result */
......@@ -2214,24 +2177,25 @@ GEOSWKBWriter_writeHEX(WKBWriter *writer, const Geometry *geom, size_t *size)
std::ostringstream s(std::ios_base::binary);
writer->writeHEX(*geom, s);
std::string wkbstring = s.str();
const size_t len = wkbstring.length();
size_t len = wkbstring.length();
unsigned char *result = NULL;
unsigned char *result;
result = (unsigned char*) std::malloc(len);
std::memcpy(result, wkbstring.c_str(), len);
memcpy(result, wkbstring.c_str(), len);
*size = len;
return result;
}
catch (const std::exception &e)
{
ERROR_MESSAGE("%s", e.what());
return NULL;
}
catch (...)
{
ERROR_MESSAGE("Unknown exception thrown");
return NULL;
}
return NULL;
}
int
......@@ -2245,8 +2209,8 @@ GEOSWKBWriter_getOutputDimension(const GEOSWKBWriter* writer)
catch (...)
{
ERROR_MESSAGE("Unknown exception thrown");
return NULL;
}
return 0;
}
void
......@@ -2274,8 +2238,8 @@ GEOSWKBWriter_getByteOrder(const GEOSWKBWriter* writer)
catch (...)
{
ERROR_MESSAGE("Unknown exception thrown");
return NULL;
}
return 0;
}
void
......@@ -2322,130 +2286,4 @@ GEOSWKBWriter_setIncludeSRID(GEOSWKBWriter* writer, const char newIncludeSRID)
}
//-----------------------------------------------------------------
// Prepared Geometry
//-----------------------------------------------------------------
const geos::geom::prep::PreparedGeometry*
GEOSPrepare(const Geometry *g)
{
const geos::geom::prep::PreparedGeometry* prep = NULL;
try
{
prep = geos::geom::prep::PreparedGeometryFactory::prepare(g);
}
catch (const std::exception &e)
{
ERROR_MESSAGE("%s", e.what());
}
catch (...)
{
ERROR_MESSAGE("Unknown exception thrown");
}
return prep;
}
void
GEOSPreparedGeom_destroy(const geos::geom::prep::PreparedGeometry *a)
{
try
{
delete a;
}
catch (const std::exception &e)
{
ERROR_MESSAGE("%s", e.what());
}
catch (...)
{
ERROR_MESSAGE("Unknown exception thrown");
}
}
char
GEOSPreparedContains(const geos::geom::prep::PreparedGeometry *pg1, const Geometry *g2)
{
try
{
bool result;
result = pg1->contains(g2);
return result;
}
catch (const std::exception &e)
{
ERROR_MESSAGE("%s", e.what());
return 2;
}
catch (...)
{
ERROR_MESSAGE("Unknown exception thrown");
return 2;
}
}
char
GEOSPreparedContainsProperly(const geos::geom::prep::PreparedGeometry *pg1, const Geometry *g2)
{
try
{
bool result;
result = pg1->containsProperly(g2);
return result;
}
catch (const std::exception &e)
{
ERROR_MESSAGE("%s", e.what());
return 2;
}
catch (...)
{
ERROR_MESSAGE("Unknown exception thrown");
return 2;
}
}
char
GEOSPreparedCovers(const geos::geom::prep::PreparedGeometry *pg1, const Geometry *g2)
{
try
{
bool result;
result = pg1->covers(g2);
return result;
}
catch (const std::exception &e)
{
ERROR_MESSAGE("%s", e.what());
return 2;
}
catch (...)
{
ERROR_MESSAGE("Unknown exception thrown");
return 2;
}
}
char
GEOSPreparedIntersects(const geos::geom::prep::PreparedGeometry *pg1, const Geometry *g2)
{
try
{
bool result;
result = pg1->intersects(g2);
return result;
}
catch (const std::exception &e)
{
ERROR_MESSAGE("%s", e.what());
return 2;
}
catch (...)
{
ERROR_MESSAGE("Unknown exception thrown");
return 2;
}
}
} //extern "C"
......@@ -27,8 +27,8 @@
*
***********************************************************************/
#ifndef GEOS_C_H_INCLUDED
#define GEOS_C_H_INCLUDED
#ifndef GEOS_C_H
#define GEOS_C_H
#ifndef __cplusplus
# include <stddef.h> /* for size_t definition */
......@@ -51,25 +51,15 @@ extern "C" {
#if defined(_MSC_VER)
#include <geos/version.h>
#define GEOS_CAPI_VERSION_MAJOR 1
#define GEOS_CAPI_VERSION_MINOR 5
#define GEOS_CAPI_VERSION_PATCH 0
#define GEOS_CAPI_VERSION "3.1.0-CAPI-1.5.0"
#define GEOS_CAPI_VERSION_MINOR 3
#define GEOS_CAPI_VERSION_PATCH 3
#define GEOS_CAPI_VERSION "3.0.0rc4-CAPI-1.3.3"
#else
#ifndef GEOS_VERSION_MAJOR
#define GEOS_VERSION_MAJOR @VERSION_MAJOR@
#endif
#ifndef GEOS_VERSION_MINOR
#define GEOS_VERSION_MINOR @VERSION_MINOR@
#endif
#ifndef GEOS_VERSION_PATCH