Skip to content

Releases

v0.5.3

Choose a tag to compare

@github-actions github-actions released this 17 Nov 00:55
e82c21b
  • Fix: simplifyRegions and regionSimplifier give the same output as the search of each position, also near a pole. Since 0.3.2, the search of a span skips each position whose bound is less than the best angle.
  • Before, the bound of a position very near a pole was able to be less than its angle. So the search was able to skip a position with an angle that was larger than the best angle.
  • The fix: the bound is the larger of the box bound and the probe value of the edge. The measure of the angle uses these two values. So the bound is not less than the angle, also in floating point.
  • A property test of CI found this fault with a viewer at the south pole. A new test keeps that case.
  • PATCH: a bug fix with no change of the public API. Thus the version is a PATCH change.

v0.5.2

Choose a tag to compare

@github-actions github-actions released this 16 Nov 22:51
1e47e94
  • bboxCenter gives the middle of a box: the middle of its latitudes, and the middle of its arc of longitudes. For a box that crosses the antimeridian, the middle is on the arc across the antimeridian.
  • The closed box has the result, also when the width of the box is one rounding step.
  • The middle is a place for a label of a region, or for the first view of a map. It is not the centroid of a shape.
  • PATCH: a new export before 1.0.0. This change adds one function, and it changes no function. Thus the version is a PATCH change (before 1.0.0, a new feature is a PATCH change).

v0.5.1

Choose a tag to compare

@github-actions github-actions released this 16 Nov 21:38
6b3c71b
  • bufferKm and bufferMeters are faster, with the same guarantee. Each point at a distance of distance - tolerance or less is in the result. Each point at distance + tolerance or more is not.
  • The cells are larger. The diameter of a cell is 5/8 of the tolerance or less, from the haversine formula. Before, the side of a cell was 1/4 of the tolerance.
  • The search of the nearest point of an edge stops when its result is within 1/16 of the tolerance. The center of a block of cells gives its value to a corner of the grid.
  • A buffer uses approximately 9 cells for each tolerance of the length of its boundary. Before, it used approximately 16. On the cases of the bench, the trigonometric operations decrease 2.1 to 2.9 times.
  • The positions of a result can change. The guarantee does not change.
  • PATCH: faster functions, with no change of the API. Thus the version is a PATCH change.

v0.5.0

Choose a tag to compare

@github-actions github-actions released this 16 Nov 16:58
540e448
  • toUnitVector gives a point as a vector with the length 1, on the axes of ECEF. fromUnitVector gives the point in the direction of a vector. The new type is UnitVector.
  • intermediatePoint gives the point at a part of the way along the great circle between two points.
  • densify gives a copy of a geometry with more positions on its edges. No part of an edge is longer than a step in degrees. Each new position is on the straight line in longitude and latitude of its edge.
  • MAX_DENSIFY_POSITIONS is the limit of the new positions of one call of densify (1,000,000).
  • These functions are for a drawing on a globe: densify makes the edges short, and toUnitVector puts each position on the sphere. The README gives the rules.
  • The new error code vector refuses a vector with the length 0. The new error code step refuses a step of densify that is not more than 0, or that adds too many positions.
  • Fix: bboxOfGeoJson gives the ends of each edge with no rounding. Before, the east of an edge was west + (east - west) in floating point. So the box of the line from 1.1 to 6.8 had the east 6.799999999999999, and it did not contain the end of the line.
  • Fix: two edges with a common position give two arcs that touch. Before, a gap of one rounding step was possible between them. So the line through the longitudes -180, 0.1 and 180 got a box from 0.1 to 0.09999999999999432, not from -180 to 180.
  • GeoErrorCode has two new values. A caller with a full switch on the codes must add them. Thus the version is a MINOR change (before 1.0.0, a breaking change is a MINOR change).

v0.4.4

Choose a tag to compare

@github-actions github-actions released this 16 Nov 15:05
ed4b26f
  • bufferKm and bufferMeters give the buffer of a GeoJSON geometry. The buffer is the area within a distance of the geometry, as a GeoJSON Polygon or MultiPolygon. Each point at a distance of distance - tolerance or less is in the result, and each point at distance + tolerance or more is not. The README gives the rules.
  • BufferOptions has the options tolerance and maxCells. DEFAULT_MAX_BUFFER_CELLS is the default limit of the cells (1,000,000).
  • The error codes tolerance, max-cells, too-many-cells and radius also refuse incorrect options of a buffer.
  • PATCH: new exports before 1.0.0. This change adds functions, and it changes no function. Thus the version is a PATCH change (before 1.0.0, a new feature is a PATCH change).

v0.4.3

Choose a tag to compare

@github-actions github-actions released this 16 Nov 12:52
da3b2ae
  • distanceBetweenGeometriesKm and distanceBetweenGeometriesMeters give the great-circle distance between the nearest points of two GeoJSON geometries. The distance is 0 when the geometries have a common point. The README gives the rules.
  • This change adds two functions, and it does not change the existing API. Before 1.0.0, a new function is a PATCH change. Thus the version is a PATCH change.

v0.4.2

Choose a tag to compare

@github-actions github-actions released this 16 Nov 11:55
31d4d03
  • geodesicInverse gives the length of the shortest geodesic between two points on an ellipsoid, and its bearings at the two points. geodesicDirect gives the point at a distance along a geodesic on an initial bearing.
  • WGS84 is the ellipsoid of WGS84, and the default of the two functions. The new types are Ellipsoid, GeodesicInverse and GeodesicDirect.
  • The functions use the method of Karney (2013). The code is a port of GeographicLib 2.2.0 for JavaScript, with the MIT license. On WGS84, the tests hold a limit of 1e-6 m for a distance and 1e-9 degrees for a bearing or a position.
  • The error code radius also refuses an ellipsoid with an equatorial radius or a polar radius that is not more than 0.
  • PATCH: new exports before 1.0.0. This change adds functions, and it changes no function. Thus the version is a PATCH change (before 1.0.0, a new feature is a PATCH change).

v0.4.1

Choose a tag to compare

@github-actions github-actions released this 16 Nov 11:18
6992dbf
  • pointLocator(polygon) examines a polygon one time, and gives a function that locates each point. For each point, it gives the result of locatePoint.
  • The locator puts the edges of each part in bands of latitude. A point examines only the edges of its band, with the exact test rayEdge of @mark1russell7/predicates 0.1.5.
  • This change adds an export, and it does not change the old API. Thus the version is a PATCH change (before 1.0.0, a new feature is a PATCH change).

v0.4.0

Choose a tag to compare

@github-actions github-actions released this 16 Nov 04:30
a18b6cc
  • circleKm and circleMeters give a circle on the Earth as a GeoJSON Polygon or MultiPolygon, for a map. A circle across the antimeridian is cut there. A circle around a pole has an edge along the pole. The README gives the rules.
  • The option vertices sets the number of the vertices. The default is DEFAULT_CIRCLE_VERTICES (64), and the limit is MAX_CIRCLE_VERTICES (65,536).
  • The new error code vertices refuses a number of vertices that is not an integer from 3 to MAX_CIRCLE_VERTICES.
  • GeoErrorCode has a new value. A caller with a full switch on the codes must add it. Thus the version is a MINOR change (before 1.0.0, a breaking change is a MINOR change).

v0.3.2

Choose a tag to compare

@github-actions github-actions released this 16 Nov 02:37
d5ea5a0