Skip to content

Commit

Permalink
hotfix(pgrouting:crs): no coordinate transform for full route geom
Browse files Browse the repository at this point in the history
  • Loading branch information
azarz committed Oct 14, 2022
1 parent a4c884b commit 90a78f6
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "road2",
"version": "1.1.1",
"version": "1.1.2",

"description": "Calcul d'itinéraire",
"author": "RDEV - IGN",
Expand Down
5 changes: 5 additions & 0 deletions src/js/sources/pgrSource.js
Original file line number Diff line number Diff line change
Expand Up @@ -988,6 +988,11 @@ module.exports = class pgrSource extends Source {

currentPgrRoute.geometry.coordinates = newRouteGeomCoords;
routes[i].geometry = new Line(currentPgrRoute.geometry, "geojson", this._topology.projection);
if (!routes[i].geometry.transform(askedProjection)) {
throw errorManager.createError(" Error during reprojection of step's geometry in PGR response. ");
} else {
LOGGER.debug("step geometry is converted");
}
routes[i].portions = portions;

}
Expand Down

0 comments on commit 90a78f6

Please sign in to comment.