Why does locallyhosted ORS server not returning valid data?

I’m unable to route with my server ?? The location i’m testing with is Oulu, Finland.

[ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: OpenRouteServiceException: Status: {code: 2010, message: Could not find routable point within a radius of 400.0 meters of specified coordinate 0: 25.4681600 65.0123600.} Code: 404, at url http://api.paxsudos.fi:8080/ors/v2/directions/cycling-electric?api_key=&start=25.46816,65.01236&end=25.46816,65.01236
#0      OpenRouteService._openRouteServiceGet (package:open_route_service/src/open_route_service_base.dart:84:7)
<asynchronous suspension>
#1      ORSDirections.directionsRouteGeoJsonGet (package:open_route_service/src/services/directions.dart:37:39)
<asynchronous suspension>
#2      MyLocation.generateRouteFrom (package:ProjectName/utils/locationutils.dart:149:39)
<asynchronous suspension>
#3      _OSMMapperState.do_update_places.<anonymous closure> (package:projectName/customwidgets/open_street_map.dart:251:15)
<asynchronous suspension>

and coordinates reversed:

[ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: OpenRouteServiceException: Status: {code: 2010, message: Could not find routable point within a radius of 400.0 meters of specified coordinate 0: 65.0123600 25.4681600.} Code: 404, at url http://api.paxsudos.fi:8080/ors/v2/directions/cycling-electric?api_key=&start=65.01236,25.46816&end=65.01236,25.46816
#0      OpenRouteService._openRouteServiceGet (package:open_route_service/src/open_route_service_base.dart:84:7)
<asynchronous suspension>
#1      ORSDirections.directionsRouteGeoJsonGet (package:open_route_service/src/services/directions.dart:37:39)
<asynchronous suspension>
#2      MyLocation.generateRouteFrom (package:ProjectName/utils/locationutils.dart:149:39)
<asynchronous suspension>
#3      _OSMMapperState.do_update_places.<anonymous closure> (package:ProjectName/customwidgets/open_street_map.dart:251:15)
<asynchronous suspension>

Hey,

have a look at point 3 from this list:

Best regards

Thanks for tips! But issue is not solved. I make coordinates for API like:

  // LatLong(longF, latF) ---> aergaeg(latF, longF)
  ORSCoordinate makeORSCoordinateFromLatLon(LatLng pointFrom) {
    ORSCoordinate osrTo = ORSCoordinate(
        latitude: pointFrom.longitude, longitude: pointFrom.latitude);

    dev.log("Coord transform: ($pointFrom) => ($osrTo)");
    return osrTo;
  }

Hey,

you’re passing the same coordinates as start- and endpoint, but that is not the issue I suspect. As it says in point 3 in the linked post:

You are probably running a local installation and are routing in an area that you did not build graphs for. If you can route in Heidelberg(Germany) you are still running on the default dataset.

To test that, go to our API Playground and check the default request from there.

Best regards

OK, thanks for tips … Yeah, i’m on my own instance of the ORS … I’ll try now the request with playground … yeah, with the playground URL: http://myapi:8080/ors/v2/directions/cycling-electric?api_key=XXXXX&start=13.40,52.52&end=13.40,52.52
… but not with my app. It seems that something is missing from a) configuration or B) the graphs are ok ?

Hey,

AFAIR none of the default requests from the playground uses these coordinates.

The default request, where I’ve already substituted your instance, would be something like

http://api.paxsudos.fi:8080/ors/v2/directions/driving-car?api_key=XXXstart=8.681495,49.41461&end=8.687872,49.420318

If that works, you’re running the default graphs in the heidelberg region and would have to change that.
If that doesn’t work, the question would be what profiles you are running (because the default is only car) and what region you are running.

What does the output of the /status endpoint say?

Best regards.

I’m now rebuilding the graps(?) … i hope. The status and health were ok with the ‘non-working’ set …

I’ll try that ASAP …

hmm, the testing urI /ors/v2/directions/bike-electric?start=8.681495,49.41461&end=8.687872,49.420318 returns something, but not correct.

EDIT: Status seems ok and lists my stuff. I’ll give my app a shot :slight_smile:

Current results are:

[ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: FormatException: Unexpected end of input (at character 1)

^

#0      _ChunkedJsonParser.fail (dart:convert-patch/convert_patch.dart:1383:5)
#1      _ChunkedJsonParser.close (dart:convert-patch/convert_patch.dart:501:7)
#2      _parseJson (dart:convert-patch/convert_patch.dart:36:10)
#3      JsonDecoder.convert (dart:convert/json.dart:610:36)
#4      JsonCodec.decode (dart:convert/json.dart:216:41)
#5      jsonDecode (dart:convert/json.dart:155:10)
#6      OpenRouteService._openRouteServiceGet (package:open_route_service/src/open_route_service_base.dart:83:33)
<asynchronous suspension>
#7      ORSGeocode.geocodeReverseGet (package:open_route_service/src/services/geocode.dart:359:39)
<asynchronous suspension>