valhalla / valhalla

Open Source Routing Engine for OpenStreetMap
https://valhalla.github.io/valhalla/
Other
4.52k stars 682 forks source link

/data/valhalla/elevation/ currently has no elevation tiles #1826

Closed smit-1999 closed 5 years ago

smit-1999 commented 5 years ago

I'm trying to install Valhalla using this guide GIS-OPS guide to install Valhalla

I have installed Valhalla but when I try to run it using this command valhalla_service ~/valhalla/conf/valhalla.json 1 I'm getting this error

2019/05/27 08:59:53.264533 [INFO] Tile extract successfully loaded with tile count: 225 2019/05/27 08:59:53.303200 [WARN] /data/valhalla/elevation/ currently has no elevation tiles

I'm using albania-latest.osm and I've successfully converted this to valhalla tiles. But I've no clue where to get the elevation tiles for Albania.

I've tried to find the elevation tiles from AWS but from the data stored I couldn't find the elevation data that specifically belonged to Albania. I'm not sure how to proceed further and I'm stuck here since the past few days.

drewda commented 5 years ago

You'll want tiles from https://registry.opendata.aws/terrain-tiles/ in Skadi format to cover a bounding box around Albania.

You can do this using the PlanetUtils package like so:

elevation_tile_download --bbox=19.1246,39.6449,21.0574,42.6611 --format=skadi

I'll close this issue now, but feel free to report any progress or errors below.

smit-1999 commented 5 years ago

Thanks a lot for the prompt response.It was really helpful and worked for me.So now valhalla is up and running,and I am currently on the next step of building reporter (Script based,using python).

So,for that I went through this: https://github.com/opentraffic/reporter/blob/dev/load-historical-data/README.md

It asks me to first run setup.sh,but on running it doesn't find these packages:

  1. python-valhalla
  2. valhalla-bin

I tried various combinations: pip install python-valhalla sudo apt install python-valhalla: but none worked for me.

Finally I found this link https://launchpad.net/~valhalla-routing/+archive/ubuntu/valhalla/+build/12551809 I tried to install these files on my laptop,but it doesn't work(maybe,because it was built for trusty). Please suggest me if there is any way to install these packages. (Trimmed Output after running: ./setup.sh )

Building dependency tree Reading state information... Done E: Unable to locate package python-valhalla E: Unable to locate package valhalla-bin

I am currently using Ubuntu's latest version(18.04.2 LTS).

kevinkreiser commented 5 years ago

The latest version of valhalla no longer has support for open traffic segment descriptors. This support was removed in version 3. You can git clone valhalla at the last version before version 3 and build it from source. The instructions for doing so havent changed: https://github.com/valhalla/valhalla#building-from-source

smit-1999 commented 5 years ago

I tried to build and install valhalla from the link you mentioned,but still there's no progress while setting up the reporter.Is there any other link or method to setup reporter and analyst tool?(I went through the documentation,but I don't know how to proceed further with the missing packages.)

Installing and setting up this software is taking way more time than I had expected,and I have already crossed the deadline allotted to me.

kevinkreiser commented 5 years ago

@smit-1999 as i stated before the reporter and open traffic in general is no longer supported by this project. in order to get to a working state you must clone valhalla at a version before we removed support for it (a version less than major version 3). build the software from source, build the data and add osmlr segments to it, and then finally run the reporter with that. im sorry to say we cannot offer any more support at this time. one more tip is that you should use the python reporter script as its vastly easier to deploy than the kafka(-esque) reporters. more on that can be found here: https://github.com/opentraffic/reporter#script-based-reporter

smit-1999 commented 5 years ago

Thanks a lot for the prompt response!

So I think you mean for installing reporter and visualising the results in UI Analyst tool,I need to download an older version.So I tried and cloned this version :

https://github.com/valhalla/valhalla/tree/2.7.2

So,now repeating the build steps which involves first adding:

sudo add-apt-repository -y ppa:valhalla-core/valhalla

Running this should add the 2.7.2 repository that's what is our aim,but I guess it automatically adds the latest repository. Any way to tweak this ? The next piece of code given is this : sudo apt-get update sudo apt-get install -y valhalla-bin

But I think we will run only the second one as we don't want to update all the packages to their latest version.Are these the correct steps? Because ,I am stuck on this again since the last couple of days.

PS:I am sorry to bother you with such issues,but I am still at a learning stage of my career,and once again thanks for taking the time to help me out.

kevinkreiser commented 5 years ago

@smit-1999 dont install from the ppa. just clone the code from github, check out the tag and build that from source. once its built do sudo make install and you should be good to go

smit-1999 commented 5 years ago

The building of valhalla was completed succesfully,then running the reporter using python scripts asked me to first run ./setup.sh It ran and gave the following output: Get:8 http://in.archive.ubuntu.com/ubuntu bionic-backports InRelease [74.6 kB] Fetched 74.6 kB in 4s (19.4 kB/s) Reading package lists... Done Reading package lists... Done Building dependency tree Reading state information... Done E: Unable to locate package python-valhalla E: Unable to locate package valhalla-bin.

So ,I think that works fine and then when I tried to run the load_historical_data.sh

it doesn't find any data.It says: logs/06_06_2014.out: No such file or directory

Next step?

EDIT1:

I think I just figured out,it isn't able to run the grab_historical_data part in the script,maybe because there isn't one.If that's the case,where can I find the script? Or is it the issue with the access to the dataset? (considering its confidential information to share the data obtained from taxi companies). Or if there's any other dataset which I could input to make it running,please do update me about it.

19981999ab commented 5 years ago

Hey @kevinkreiser @drewda, please help with this issue.

Coincidentally, I've been working on to implement OpenTraffic and implementing reporter has been a nightmare. I'm getting the same issue and I've been stuck at it for what feel's like forever

nilsnolde commented 5 years ago

@19981999ab @smit-1999 and for general future reference, try our new tutorial @gis-ops: https://gis-ops.com/valhalla-how-to-build-with-elevation-ubuntu/

If you still can't make it work, consider putting an issue (or even better PR) at https://github.com/gis-ops/tutorials

kevinkreiser commented 5 years ago

@19981999ab as i stated earlier:

the reporter and open traffic in general is no longer supported by this project

And again, as I said before the best chance for you to get it to work is to:

  1. get valhalla compiled from source from a version that supported the reporter (ie 2.7.x)
  2. generate a tile set
  3. generate osmlr ids for that tile set
  4. add the osmlr ids to the tile set
  5. try to use the reporter

We are unable to provide any other support beyond that at this time.

19981999ab commented 5 years ago

@nilsnolde Thanks for your tutorials. They are really handy. The thing is I have installed valhalla 3 successfully using your tutorials however my objective is to implement the reporter and analyst ui and as @kevinkreiser pointed out valhalla 3.xx isn't compatible with the reporter.

So I have installed valhalla 3.0.2 and 2.7.2. I have generated valhalla tiles and for input I have the data in json format

Sample: {"id":7468,"timestamp":1558769564,"latitude":28.39942,"longitude":77.33245,"accuracy":82}

@kevinkreiser When I run kafka using Docker Command using this input

http://localhost:8002/report?json=%7B%22uuid%22:%22100609%22,%22trace%22:%5B%7B%22lat%22:14.543087,%22lon%22:121.021019,%22time%22:1000%7D,%7B%22lat%22:14.543620,%22lon%22:121.021652,%22time%22:1008%7D,%7B%22lat%22:14.544957,%22lon%22:121.023247,%22time%22:1029%7D,%7B%22lat%22:14.545470,%22lon%22:121.023811,%22time%22:1036%7D,%7B%22lat%22:14.546580,%22lon%22:121.025124,%22time%22:1053%7D,%7B%22lat%22:14.547284,%22lon%22:121.025932,%22time%22:1064%7D,%7B%22lat%22:14.547817,%22lon%22:121.026665,%22time%22:1072%7D,%7B%22lat%22:14.549700,%22lon%22:121.028839,%22time%22:1101%7D,%7B%22lat%22:14.550350,%22lon%22:121.029610,%22time%22:1111%7D,%7B%22lat%22:14.551256,%22lon%22:121.030693,%22time%22:1125%7D,%7B%22lat%22:14.551785,%22lon%22:121.031395,%22time%22:1133%7D,%7B%22lat%22:14.553422,%22lon%22:121.033340,%22time%22:1158%7D,%7B%22lat%22:14.553819,%22lon%22:121.033806,%22time%22:1164%7D,%7B%22lat%22:14.553976,%22lon%22:121.033997,%22time%22:1167%7D%5D%7D

I don't get any results. Furthermore, the server outputs something like this

usage: kafka-reporter
 -b,--bootstrap <arg>         Bootstrap servers config
 -d,--duration <arg>          How long to run the program in seconds,
                              defaults to (essentially) forever.
 -f,--formatter <arg>         The formatter configuration separated args
                              for constructing a custom formatter.
                              Separated value and json are currently
                              supported.
                              To construct a seprated value formatter
                              where the raw messages look like:
                              2017-01-31
                              16:00:00|uuid_abcdef|x|x|x|accuracy|x|x|x|la
                              t|lon|x|x|x
                              Specify a value of:
                              --formatter ",sv,\|,1,9,10,0,5,yyyy-MM-dd
                              HH:mm:ss"
                              To construct a json formatter where the raw
                              messages look like:
                              {"timestamp":1495037969,"id":"uuid_abcdef","
                              accuracy":51.305,"latitude":3.465725,"longit
                              ude":-76.5135033}
                              Specify a value of:
                              --formatter
                              ",json,id,latitude,longitude,timestamp,accur
                              acy"
                              Note that the time format string is
                              optional, ie when your time value is already
                              in epoch seconds.
 -i,--flush-interval <arg>    The interval, in seconds, at which tiles are
                              flushed to storage. Do not set this
                              parameter lower than the quantisation. Doing
                              so could result in tiles with very few
                              segment pairs.
 -m,--mode <arg>              The mode of travel the input data used.
                              Defaults to auto(mobile)
 -o,--output-location <arg>   A location to put the output histograms.
                              This can either be an http://location to
                              POST to or /a/directory to write files to.
                              If its of the form https://*.amazonaws.com
                              its assumed to be an s3 bucket and you'll
                              need to have the environment variables
                              AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY
                              properly set.
 -p,--privacy <arg>           The minimum number of observations of a
                              given segment pair required before including
                              this pair in the histogram.
 -q,--quantisation <arg>      The granularity, in seconds, at which to
                              combine observations into as single tile.
                              Setting this to 3600 will result in tiles
                              where all segment pairs occuring within a
                              given hour will be in the same tile. Do not
                              set this parameter higher than the flush
                              interval parameter. Doing so could result in
                              tiles with very few segment pairs
 -r,--reports <arg>           The levels of osmlr segments we will report
                              on as the first segment in the segment pair.
                              Defaults to 0,1. Any combination of 0,1,2 is
                              allowed
 -s,--source <arg>            The name used in the tiles as a means of
                              identifying the source of the data.
 -t,--topics <arg>            A comma separated list of topics listed in
                              the order they are operated on in the kafka
                              stream.The first topic is the raw
                              unformatted input messages. The second is
                              the formatted messages. The third is
                              segments. The fourth is the anonymised
                              segments.
 -u,--reporter-url <arg>      The url to send batched/windowed portions of
                              a given keys points to.
 -x,--transitions <arg>       The levels of osmlr segments we will report
                              on as the second segment in the segment
                              pair. Defaults to 0,1. Any combination of
                              0,1,2 is allowed

I don't know how to proceed further. Can you help?

19981999ab commented 5 years ago

@kevinkreiser @drewda Thanks for all your help. I've successfully configured reporter to work with kafka. All the GPS points I send is consumed to raw topic in kafka. I have also pulled and built datastore. However i couldn't find any documentation on getting datastore to work. To get a output of the form

"datastore":{"mode":"auto, "reports":[{"id": , next_id": , "queue_length": 0, "length": 500, "t0": , "t1": }]}, "segment_matcher": {"segments":[{"segment_id": 12345, "way_ids":[123123123], "start_time": 231231111.456, "end_time": 231231175.356, "queue_length": 0, "length": 500, "internal": false, "begin_shape_index":0, "end_shape_index": 20}], "mode":"auto}, "shape_used": 10}

What should I do next?

Sushant-ctrl commented 3 years ago

Thanks a lot for the prompt response!

So I think you mean for installing reporter and visualising the results in UI Analyst tool,I need to download an older version.So I tried and cloned this version :

https://github.com/valhalla/valhalla/tree/2.7.2

So,now repeating the build steps which involves first adding:

sudo add-apt-repository -y ppa:valhalla-core/valhalla

Running this should add the 2.7.2 repository that's what is our aim,but I guess it automatically adds the latest repository. Any way to tweak this ? The next piece of code given is this : sudo apt-get update sudo apt-get install -y valhalla-bin

But I think we will run only the second one as we don't want to update all the packages to their latest version.Are these the correct steps? Because ,I am stuck on this again since the last couple of days.

PS:I am sorry to bother you with such issues,but I am still at a learning stage of my career,and once again thanks for taking the time to help me out.

Even I am facing the same problem but I am getting this error (base) sush@sush-Lenovo-Legion-Y540-15IRH-PG0:~$ sudo apt-get install -y valhalla-bin Reading package lists... Done Building dependency tree Reading state information... Done E: Unable to locate package valhalla-bin

nilsnolde commented 3 years ago

Installing via PPA is deprecated for a long time now, also fairly obviously tagged as such in the README. You’ll need to build from source or use one of the available docker images.

Just out of curiosity: why did you try that? Is there some resource still out there recommending PPA?