Skip to content
On this page

geos.GEOSFrechetDistance ⇒ number

Computes the Fréchet distance between two geometries. The Fréchet distance is a measure of similarity between curves that takes into account the location and ordering of the points along the curves. It is defined as the minimum length of a leash that connects a dog and its owner who walk along their respective curves, without backtracking, from one end to the other end.

Kind: Exported member
Returns: number - 1 on success, 0 on exception.
See

ParamTypeDescription
g1numberThe first geometry.
g2numberThe second geometry.
distancenumberA pointer to a double to store the computed distance.

geos.GEOSFrechetDistanceDensify ⇒ number

Computes the Fréchet distance between two geometries, densifying them by a given fraction. The Fréchet distance is a measure of similarity between curves that takes into account the location and ordering of the points along the curves. It is defined as the minimum length of a leash that connects a dog and its owner who walk along their respective curves, without backtracking, from one end to the other end. Densifying the geometries involves inserting extra vertices along every line segment so that the total length of the segments is increased by a given fraction.

Kind: Exported member
Returns: number - 1 on success, 0 on exception.
See

ParamTypeDescription
g1numberThe first geometry.
g2numberThe second geometry.
densifyFracnumberThe fraction by which to densify each segment. Must be between 0 and 1.
distancenumberA pointer to a double to store the computed distance.

geos.GEOSFrechetDistanceDensify_r ⇒ number

Computes the Fréchet distance between two geometries using a GEOS context handle, densifying them by a given fraction. The Fréchet distance is a measure of similarity between curves that takes into account the location and ordering of the points along the curves. It is defined as the minimum length of a leash that connects a dog and its owner who walk along their respective curves, without backtracking, from one end to the other end. Densifying the geometries involves inserting extra vertices along every line segment so that the total length of the segments is increased by a given fraction.

Kind: Exported member
Returns: number - 1 on success, 0 on exception.
See

ParamTypeDescription
handlenumberA pointer to the GEOS context handle.
g1numberThe first geometry.
g2numberThe second geometry.
densifyFracnumberThe fraction by which to densify each segment. Must be between 0 and 1.
distancenumberA pointer to a double to store the computed distance.

geos.GEOSFrechetDistance_r ⇒ number

Computes the Fréchet distance between two geometries using a GEOS context handle. The Fréchet distance is a measure of similarity between curves that takes into account the location and ordering of the points along the curves. It is defined as the minimum length of a leash that connects a dog and its owner who walk along their respective curves, without backtracking, from one end to the other end.

Kind: Exported member
Returns: number - 1 on success, 0 on exception.
See

ParamTypeDescription
handlenumberA pointer to the GEOS context handle.
g1numberThe first geometry.
g2numberThe second geometry.
distancenumberA pointer to a double to store the computed distance.