Skip to content

Commit da5bdb4

Browse files
committed
Improve C API DE-9IM parameter names
1 parent dfdaa76 commit da5bdb4

File tree

3 files changed

+25
-25
lines changed

3 files changed

+25
-25
lines changed

capi/geos_c.cpp

+6-6
Original file line numberDiff line numberDiff line change
@@ -213,15 +213,15 @@ extern "C" {
213213
//------------------------------------------------------------------
214214

215215
char
216-
GEOSRelatePattern(const Geometry* g1, const Geometry* g2, const char* pat)
216+
GEOSRelatePattern(const Geometry* g1, const Geometry* g2, const char* imPattern)
217217
{
218-
return GEOSRelatePattern_r(handle, g1, g2, pat);
218+
return GEOSRelatePattern_r(handle, g1, g2, imPattern);
219219
}
220220

221221
char
222-
GEOSRelatePatternMatch(const char* mat, const char* pat)
222+
GEOSRelatePatternMatch(const char* intMatrix, const char* imPattern)
223223
{
224-
return GEOSRelatePatternMatch_r(handle, mat, pat);
224+
return GEOSRelatePatternMatch_r(handle, intMatrix, imPattern);
225225
}
226226

227227
char*
@@ -1610,9 +1610,9 @@ extern "C" {
16101610
}
16111611

16121612
char
1613-
GEOSPreparedRelatePattern(const geos::geom::prep::PreparedGeometry* pg1, const Geometry* g2, const char* pat)
1613+
GEOSPreparedRelatePattern(const geos::geom::prep::PreparedGeometry* pg1, const Geometry* g2, const char* imPattern)
16141614
{
1615-
return GEOSPreparedRelatePattern_r(handle, pg1, g2, pat);
1615+
return GEOSPreparedRelatePattern_r(handle, pg1, g2, imPattern);
16161616
}
16171617

16181618
CoordinateSequence*

capi/geos_c.h.in

+11-11
Original file line numberDiff line numberDiff line change
@@ -1430,7 +1430,7 @@ extern char GEOS_DLL GEOSRelatePattern_r(
14301430
GEOSContextHandle_t handle,
14311431
const GEOSGeometry* g1,
14321432
const GEOSGeometry* g2,
1433-
const char *pat);
1433+
const char *imPattern);
14341434

14351435
/** \see GEOSRelate */
14361436
extern char GEOS_DLL *GEOSRelate_r(
@@ -1441,8 +1441,8 @@ extern char GEOS_DLL *GEOSRelate_r(
14411441
/** \see GEOSRelatePatternMatch */
14421442
extern char GEOS_DLL GEOSRelatePatternMatch_r(
14431443
GEOSContextHandle_t handle,
1444-
const char *mat,
1445-
const char *pat);
1444+
const char *intMatrix,
1445+
const char *imPattern);
14461446

14471447
/** \see GEOSRelateBoundaryNodeRule */
14481448
extern char GEOS_DLL *GEOSRelateBoundaryNodeRule_r(
@@ -4935,14 +4935,14 @@ extern char GEOS_DLL GEOSEqualsIdentical(
49354935
* \see geos::geom::Geometry::relate
49364936
* \param g1 First geometry in pair
49374937
* \param g2 Second geometry in pair
4938-
* \param pat DE9IM pattern to check
4938+
* \param imPattern DE9IM pattern to check
49394939
* \return 1 on true, 0 on false, 2 on exception
49404940
* \since 2.2
49414941
*/
49424942
extern char GEOS_DLL GEOSRelatePattern(
49434943
const GEOSGeometry* g1,
49444944
const GEOSGeometry* g2,
4945-
const char *pat);
4945+
const char *imPattern);
49464946

49474947
/**
49484948
* Calculate and return the DE9IM pattern for this geometry pair.
@@ -4960,15 +4960,15 @@ extern char GEOS_DLL *GEOSRelate(
49604960
/**
49614961
* Compare two DE9IM patterns and return true if they
49624962
* are consistent.
4963-
* \param mat Complete DE9IM string (does not have "*")
4964-
* \param pat Pattern to match to (may contain "*")
4963+
* \param intMatrix Complete DE9IM string (does not have "*")
4964+
* \param imPattern Pattern to match to (may contain "*")
49654965
* \return 1 on true, 0 on false, 2 on exception
49664966
*
49674967
* \since 3.3
49684968
*/
49694969
extern char GEOS_DLL GEOSRelatePatternMatch(
4970-
const char *mat,
4971-
const char *pat);
4970+
const char *intMatrix,
4971+
const char *imPattern);
49724972

49734973
/**
49744974
* Calculate and return the DE9IM pattern for this geometry pair.
@@ -5226,7 +5226,7 @@ extern char GEOS_DLL * GEOSPreparedRelate(
52265226
* prepared and provided geometry.
52275227
* \param pg1 The prepared geometry
52285228
* \param g2 The geometry to test
5229-
* \param pat The DE9IM pattern to test
5229+
* \param imPattern The DE9IM pattern to test
52305230
* \returns 1 on true, 0 on false, 2 on exception
52315231
* \see GEOSPrepare
52325232
* \see GEOSRelatePattern
@@ -5237,7 +5237,7 @@ extern char GEOS_DLL * GEOSPreparedRelate(
52375237
extern char GEOS_DLL GEOSPreparedRelatePattern(
52385238
const GEOSPreparedGeometry* pg1,
52395239
const GEOSGeometry* g2,
5240-
const char* pat);
5240+
const char* imPattern);
52415241

52425242
/**
52435243
* Use a \ref GEOSPreparedGeometry do a high performance

capi/geos_ts_c.cpp

+8-8
Original file line numberDiff line numberDiff line change
@@ -665,23 +665,23 @@ extern "C" {
665665
//------------------------------------------------------------------
666666

667667
char
668-
GEOSRelatePattern_r(GEOSContextHandle_t extHandle, const Geometry* g1, const Geometry* g2, const char* pat)
668+
GEOSRelatePattern_r(GEOSContextHandle_t extHandle, const Geometry* g1, const Geometry* g2, const char* imPattern)
669669
{
670670
return execute(extHandle, 2, [&]() {
671-
std::string s(pat);
671+
std::string s(imPattern);
672672
return g1->relate(g2, s);
673673
});
674674
}
675675

676676
char
677-
GEOSRelatePatternMatch_r(GEOSContextHandle_t extHandle, const char* mat,
678-
const char* pat)
677+
GEOSRelatePatternMatch_r(GEOSContextHandle_t extHandle, const char* intMatrix,
678+
const char* imPattern)
679679
{
680680
return execute(extHandle, 2, [&]() {
681681
using geos::geom::IntersectionMatrix;
682682

683-
std::string m(mat);
684-
std::string p(pat);
683+
std::string m(intMatrix);
684+
std::string p(imPattern);
685685
IntersectionMatrix im(m);
686686

687687
return im.matches(p);
@@ -3761,10 +3761,10 @@ extern "C" {
37613761

37623762
char
37633763
GEOSPreparedRelatePattern_r(GEOSContextHandle_t extHandle,
3764-
const geos::geom::prep::PreparedGeometry* pg, const Geometry* g, const char* pat)
3764+
const geos::geom::prep::PreparedGeometry* pg, const Geometry* g, const char* imPattern)
37653765
{
37663766
return execute(extHandle, 2, [&]() {
3767-
return pg->relate(g, std::string(pat));
3767+
return pg->relate(g, std::string(imPattern));
37683768
});
37693769
}
37703770

0 commit comments

Comments
 (0)