Polygon blocked area issue

Hey everyone, i’m trying to include some polygon blocked areas to the routing process. Unfortunately the calculated route is not respecting the blocked area.

Platform:
Android - Offline routing

Graphhopper version 0.13

Im using the current coordinates format:
[lat,lat,lat,lon,lon,lon]

hopper.getCHFactoryDecorator().setDisablingAllowed(true);
req.getHints().put(Parameters.CH.DISABLE, true);
req.getHints().put(Parameters.Routing.BLOCK_AREA ,blockedAreas);

After some debug i’ve been able to see the blocked area being properly loaded

return new BlockAreaWeighting(weighting, blockArea);

What am i missing?

Could I be providing the coordinates in the wrong projection?

Kind regards

This was a known issue and fixed in 1.0 or 2.0.

Hey @karussell, thank you so much for your answer.

I’ve updated to version 1.0 and still the same issue. I’m going to try now version 2.0.

I really hope that this isn’t a coordinates format or projection issue.

Do you know where to find some official documentation on blocked areas?

regards

It should be fixed in 1.0: https://github.com/graphhopper/graphhopper/pull/1917

If you still encounter problems please write a simple reproducer here and make sure you use the correct format (see the api docs)

Additionally I would recommend to use the customizable routing instead where you would also have the possibility to make the area restriction conditional (e.g. only for bigger roads in this area or similar) or only avoid an area or use it in the speed mode. And the block_area feature is planned to be deprecated (but currently is not).

Powered by Discourse