Load different area map data

i did follow the tutorial steps and I am able to start the sample app. With the help of tutorial I am able to load Romania map area only. Now I want to load some other area like California USA. I ran below command to download the file

FILE=california-latest.osm.pbf JAVA_OPTS="-Xmx4096m -Xms1000m -server" ./graphhopper-ios-sample/import-sample.sh

But when I started app again it is showing Romania only. I did follow Standalone OSM.PBF files and Runtime Loading Different Files for iOS

but I am still not able to load California map. Hope to get a reply soon.

Take a look at the import-sample.sh file. It creates a GRAPH_FILE=“graph-data.osm.pbf” in the graphhopper directory of the sample app. You can take that and use it where you need it in your app, once you imported it in the sample app.

1 Like

My import-sample.sh file is like this

cd graphhopper
if [ -z ${FILE+x} ]; then
FILE="romania-latest.osm.pbf"
fi
GRAPH_FILE=“graph-data.osm.pbf"
if [ ! -e $FILE ] && [ ! -e $GRAPH_FILE ]; then
echo “Downloading http://download.geofabrik.de/europe/$FILE"
curl -O http://download.geofabrik.de/europe/$FILE
fi
if [ ! -e $GRAPH_FILE ]; then
mv $FILE $GRAPH_FILE
fi
rm -rf $(expr $GRAPH_FILE : ‘([^.]*).’)”.osm-gh”

git checkout 0.8.2
./graphhopper.sh import $GRAPH_FILE
git checkout ios-compat
cd …
touch class.list

I did try changing git version

git checkout 0.6.0-RC1
./graphhopper.sh import $GRAPH_FILE
git checkout ios-compat

but nothing happened. What if I replace romania-latest.osm.pbf with california-latest.osm.pbf. Will it make any difference?

It’s enough to specify FILE before the import script as you say you did, you don’t need to modify it in the script since it will be overwritten by your value anyway.

However this is just a sample import script, you could import it using GraphHopper’s official instructions, just make sure you’re using the same GraphHopper version when importing as the version in the iOS port (thus the git checkout 0.8.2 in the script).