Skip to content

Commit e0977f1

Browse files
committed
Improve API doc for DE-9IM strings
1 parent da5bdb4 commit e0977f1

File tree

1 file changed

+23
-19
lines changed

1 file changed

+23
-19
lines changed

capi/geos_c.h.in

+23-19
Original file line numberDiff line numberDiff line change
@@ -4927,15 +4927,18 @@ extern char GEOS_DLL GEOSEqualsIdentical(
49274927
const GEOSGeometry* g2);
49284928

49294929
/**
4930-
* Calculate the DE9IM pattern for this geometry pair
4931-
* and compare against the provided pattern to check for
4932-
* consistency. If the result and pattern are consistent
4933-
* return true. The pattern may include glob "*" characters
4934-
* for portions that are allowed to match any value.
4930+
* Calculate the DE9IM string for a geometry pair
4931+
* and compare against a DE9IM pattern to check for
4932+
* consistency.
4933+
* If the result matches the pattern return true.
4934+
* The pattern is a 9-character string
4935+
* containing symbols in the set "012TF*".
4936+
* "012F" match the corresponding dimension symbol;
4937+
* "T" matches any non-empty dimension.; "*" matches any dimension.
49354938
* \see geos::geom::Geometry::relate
49364939
* \param g1 First geometry in pair
49374940
* \param g2 Second geometry in pair
4938-
* \param imPattern DE9IM pattern to check
4941+
* \param imPattern DE9IM pattern to match
49394942
* \return 1 on true, 0 on false, 2 on exception
49404943
* \since 2.2
49414944
*/
@@ -4945,7 +4948,8 @@ extern char GEOS_DLL GEOSRelatePattern(
49454948
const char *imPattern);
49464949

49474950
/**
4948-
* Calculate and return the DE9IM pattern for this geometry pair.
4951+
* Calculate and return the DE9IM string for this geometry pair.
4952+
* The result is a 9-character string containing dimension symbols in the set "012F".
49494953
* \see geos::geom::Geometry::relate
49504954
* \param g1 First geometry in pair
49514955
* \param g2 Second geometry in pair
@@ -4958,10 +4962,10 @@ extern char GEOS_DLL *GEOSRelate(
49584962
const GEOSGeometry* g2);
49594963

49604964
/**
4961-
* Compare two DE9IM patterns and return true if they
4965+
* Compare a DE9IM string to a pattern and return true if they
49624966
* are consistent.
4963-
* \param intMatrix Complete DE9IM string (does not have "*")
4964-
* \param imPattern Pattern to match to (may contain "*")
4967+
* \param intMatrix DE9IM string (contains symbols "012F")
4968+
* \param imPattern Pattern to match to (may also contain symbols "T" and "*")
49654969
* \return 1 on true, 0 on false, 2 on exception
49664970
*
49674971
* \since 3.3
@@ -4971,8 +4975,8 @@ extern char GEOS_DLL GEOSRelatePatternMatch(
49714975
const char *imPattern);
49724976

49734977
/**
4974-
* Calculate and return the DE9IM pattern for this geometry pair.
4975-
* Apply the supplied \ref GEOSRelateBoundaryNodeRules.
4978+
* Calculate and return the DE9IM string for this geometry pair,
4979+
* using the supplied \ref GEOSRelateBoundaryNodeRules.
49764980
* \see geos::geom::Geometry::relate
49774981
* \see geos::algorithm::BoundaryNodeRule
49784982
* \param g1 First geometry in pair
@@ -5202,14 +5206,12 @@ extern char GEOS_DLL GEOSPreparedWithin(
52025206
const GEOSGeometry* g2);
52035207

52045208
/**
5205-
* Use a \ref GEOSPreparedGeometry do a high performance
5209+
* Use a \ref GEOSPreparedGeometry do a high-performance
52065210
* calculation of the DE9IM relationship between the
5207-
* prepared and provided geometry, and compare that
5208-
* relationship to the provided DE9IM, returning
5209-
* true if the patterns are consistent and false otherwise.
5211+
* prepared and provided geometry.
52105212
* \param pg1 The prepared geometry
52115213
* \param g2 The geometry to test
5212-
* \returns The DE9IM relate pattern string
5214+
* \returns The DE9IM string
52135215
* \see GEOSPrepare
52145216
* \see GEOSRelate
52155217
* \see GEOSPreparedRelatePattern
@@ -5221,9 +5223,11 @@ extern char GEOS_DLL * GEOSPreparedRelate(
52215223
const GEOSGeometry* g2);
52225224

52235225
/**
5224-
* Use a \ref GEOSPreparedGeometry do a high performance
5226+
* Use a \ref GEOSPreparedGeometry do a high-performance
52255227
* calculation of the DE9IM relationship between the
5226-
* prepared and provided geometry.
5228+
* prepared and provided geometry, and compare the
5229+
* relationship to the provided DE9IM pattern.
5230+
* Returns true if the patterns are consistent and false otherwise.
52275231
* \param pg1 The prepared geometry
52285232
* \param g2 The geometry to test
52295233
* \param imPattern The DE9IM pattern to test

0 commit comments

Comments
 (0)