osm to obf

1,747 views
Skip to first unread message

xalien

unread,
May 17, 2011, 8:58:00 AM5/17/11
to Osmand
I created a osm custom map and I see correctly on JOSM but I don't
understand how covert it in obf format for osmand. Anyone could help
me? I have to use osmosis to do that?
thanks

Pavol Zibrita

unread,
May 17, 2011, 9:08:04 AM5/17/11
to osm...@googlegroups.com
Use OsmAndMapCreator for that:

http://download.osmand.net/latest-night-build/

Unfortunatelly, currently there is no how-to on wiki for this, but probably you can search mailing list. It should
contain already a lot about this tool.

http://code.google.com/p/osmand/wiki/HowToArticles#How_To_Prepare_own_data_to_use_offline

Regards,
Pavol

David White

unread,
May 17, 2011, 9:20:41 AM5/17/11
to osm...@googlegroups.com
Check out the user comments at the bottom of the wiki page above, lots of useful detailed steps

DW

hbogner

unread,
May 17, 2011, 7:10:19 PM5/17/11
to Osmand
Hi all, I dont use osmand (don't have android) but some of my friends
use it.

They complained to me about not having the ability to download the
"latest" obf for croatia, one on the web was few weeks "old".
So I added OsmAndMapCreator to my script on server and now they have
daily croatia obf files here: http://data.osm-hr.org/osmand/
They say it works fine.

Please check it out to see if it realy works fine and suggest any
changes I should make to make it work better.
Feel free to use those files, if they work fine, so you don't need to
generate them and use your CPU time.
I generate them daily with some other files.

Also I promoted OsmAnd at http://www.dorscluc.org/ last 2 days when
they asked me for android application. :D

Pavol Zibrita

unread,
May 18, 2011, 2:18:49 AM5/18/11
to osm...@googlegroups.com
If you would agree, and Victor also, you can became contributor and upload
the maps to googlecode directly, so that users can download the updates
directly from the app. There is index batch creator that will do everything
automatically for you, downloads the latest osm files, creates obf, and
uploads it to google code.

Also thanks for promotion :-).

Regards,
Pavol

xalien

unread,
May 18, 2011, 2:46:17 AM5/18/11
to Osmand
I did it, thanks to all, but now I have a problem. OsmAnd can show a
map without selecting address? because my custom map is a trek map
with no city or address, how view it, I would like to use OsmAnd only
as a map viewer.


On 17 Mag, 15:08, Pavol Zibrita <pavol.zibr...@gmail.com> wrote:
> Use OsmAndMapCreator for that:
>
> http://download.osmand.net/latest-night-build/
>
> Unfortunatelly, currently there is no how-to on wiki for this, but probably
> you can search mailing list. It should
> contain already a lot about this tool.
>
> http://code.google.com/p/osmand/wiki/HowToArticles#How_To_Prepare_own...
>
> Regards,
> Pavol

hbogner

unread,
May 18, 2011, 7:23:19 AM5/18/11
to Osmand
If you and Victor agree I agree also :D
You'll just have to help mi setup upload procedure, I deleted it from
batch.xml.
There is no need for downloading osm files because I generate latest
croatia.osm files daily on that server and then generate garmin maps,
osmand maps, and other fun stuff :D
So all that is left is to set up upload of files.

No problem, I'll promote you again when I have can :D

Regards,
Hrvoje

Victor Shcherb

unread,
May 18, 2011, 7:35:31 AM5/18/11
to osm...@googlegroups.com
Hi

I edited your permissions to be able to delete/upload new downloads.

Best Regards,
Victor

2011/5/18 hbogner <hbo...@gmail.com>

Pavol Zibrita

unread,
May 18, 2011, 9:09:12 AM5/18/11
to osm...@googlegroups.com
In the batch.xml make only the upload flag be true. Set up the SSID and HSID, user, passwd and directories and you should be done.

Regards,
Pavol

hbogner

unread,
May 18, 2011, 9:30:53 AM5/18/11
to Osmand
Directories are already set for my server but upload was disabled
before.

I tested it on my local machine, not on server and it works fine
I just set 3 things: uploadIndexes="true" google_code_user="***"
google_code_password="***"

http://code.google.com/p/osmand/downloads/list?can=2&q=croatia&colspec=Filename+Summary+Uploaded+ReleaseDate+Size+DownloadCount

I left blank: cookieHSID=""
cookieSID=""
pagegen="" token=""
Should I change something there, and if yes, what?

Regards
Hrvoje

Pavol Zibrita

unread,
May 19, 2011, 3:53:17 AM5/19/11
to osm...@googlegroups.com
If it works that way, than fine. Would be better if you will follow the naming convention (index batch creator does that)
and name the files Croatia_europe_1.obf.zip and Croatia_europe_1.poi.zip

Maybe for delete (reupload), you will need to fill up the HSID and SID.

Regards,
Pavol

hbogner

unread,
May 19, 2011, 5:51:14 AM5/19/11
to Osmand
Yes for delete(reupload) I need to fill something, but I can't find
HSID and SSID. All I can find is: codesite_token. Is that it?

I changed my script so it follows naming convention, my batch.xml is
heavily edited and has only 9 lines :)

On 19 svi, 09:53, Pavol Zibrita <pavol.zibr...@gmail.com> wrote:
> If it works that way, than fine. Would be better if you will follow the
> naming convention (index batch creator does that)
> and name the files Croatia_europe_1.obf.zip and Croatia_europe_1.poi.zip
>
> Maybe for delete (reupload), you will need to fill up the HSID and SID.
>
> Regards,
> Pavol
>
> On Wed, May 18, 2011 at 3:30 PM, hbogner <hbog...@gmail.com> wrote:
> > Directories are already set for my server but upload was disabled
> > before.
>
> > I tested it on my local machine, not on server and it works fine
> > I just set 3 things: uploadIndexes="true" google_code_user="***"
> > google_code_password="***"
>
> >http://code.google.com/p/osmand/downloads/list?can=2&q=croatia&colspe...

Victor Shcherb

unread,
May 19, 2011, 6:02:06 AM5/19/11
to osm...@googlegroups.com
HSID and SSID
are cookie values try to find with Google Chrome inspector or FireBug or other tools

2011/5/19 hbogner <hbo...@gmail.com>

Pavol Zibrita

unread,
May 19, 2011, 6:04:26 AM5/19/11
to osm...@googlegroups.com
If you use firefox, go to options->privacy->remove individual cookies. Search for HSID and SSID cookies. Side should be .google.com (or yours country) and there is the content of the cookie which you need

Regards,
Pavol

hbogner

unread,
May 19, 2011, 6:11:34 AM5/19/11
to Osmand
Found them just now and testing them.

hbogner

unread,
May 19, 2011, 9:30:26 AM5/19/11
to Osmand
Can't get it to work.
I'll try again tomorrow.

Regards,
Hrvoje
Message has been deleted

hbogner

unread,
May 21, 2011, 6:54:58 AM5/21/11
to Osmand
You all say I need HSID and SSID, in batch.xml I need to input
cookieHSID and cookieSID
cookieHSID=HSID
I get that, but is
cookieSID=SSID
or
cookieSID=SID
???
They don't work for me :(

As I can see those values change with time???
Then there is no way to set it as a cron job so it works automatically
every day?
Correct me if I'm wrong.

Victor Shcherb

unread,
May 22, 2011, 5:16:05 AM5/22/11
to osm...@googlegroups.com
Specify what doesn't work, delete? (cookieHSID=""cookieSID="" pagegen="" token="").
Try simply upload google_code_user="" google_code_password="" and check upload_osmand_googlecode="true".


2011/5/21 hbogner <hbo...@gmail.com>

hbogner

unread,
May 22, 2011, 7:54:02 AM5/22/11
to Osmand
Delete of old files doesn't work, so upload of new ones doesn't work.

Latest error:
"...
May 22, 2011 1:51:44 PM net.osmand.data.index.IndexBatchCreator
uploadIndex
SEVERE: Input/output exception uploading Croatia_europe_1.poi.zip
java.io.IOException: Server returned HTTP response code: 403 for URL:
https://osmand.googlecode.com/files
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native
Method)
at
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:
57)
at
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:
45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:532)
at sun.net.www.protocol.http.HttpURLConnection
$6.run(HttpURLConnection.java:1458)
at java.security.AccessController.doPrivileged(Native Method)
at
sun.net.www.protocol.http.HttpURLConnection.getChainedException(HttpURLConnection.java:
1452)
at
sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:
1106)
at
sun.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream(HttpsURLConnectionImpl.java:
254)
at
net.osmand.data.index.GoogleCodeUploadIndex.upload(GoogleCodeUploadIndex.java:
162)
at
net.osmand.data.index.IndexBatchCreator.uploadFileToServer(IndexBatchCreator.java:
665)
at
net.osmand.data.index.IndexBatchCreator.uploadIndex(IndexBatchCreator.java:
576)
at
net.osmand.data.index.IndexBatchCreator.uploadIndexes(IndexBatchCreator.java:
467)
at
net.osmand.data.index.IndexBatchCreator.runBatch(IndexBatchCreator.java:
255)
at
net.osmand.data.index.IndexBatchCreator.runBatch(IndexBatchCreator.java:
240)
at
net.osmand.data.index.IndexBatchCreator.main(IndexBatchCreator.java:
128)
Caused by: java.io.IOException: Server returned HTTP response code:
403 for URL: https://osmand.googlecode.com/files
at
sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:
1403)
at java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:
397)
at
sun.net.www.protocol.https.HttpsURLConnectionImpl.getResponseCode(HttpsURLConnectionImpl.java:
338)
at
net.osmand.data.index.GoogleCodeUploadIndex.upload(GoogleCodeUploadIndex.java:
146)
... 6 more
! NOT UPLOADED Croatia_europe_1.poi.zip
May 22, 2011 1:51:44 PM net.osmand.data.index.IndexBatchCreator
uploadIndex
INFO: Upload index nodes.tmp.odb
! NOT UPLOADED nodes.tmp.odb
UPLOADING INDEXES FINISHED

hbogner

unread,
May 22, 2011, 8:10:41 AM5/22/11
to Osmand
http://code.google.com/p/osmand/downloads/delete.do?name=Croatia_europe_1.obf.zip
token=&pagegen=&filename=Croatia_europe_1.obf.zip&delete=Delete
+download
May 22, 2011 2:06:20 PM
net.osmand.data.index.DownloaderIndexFromGoogleCode
deleteFileFromGoogleDownloads
INFO: Response : Bad Request
May 22, 2011 2:06:20 PM net.osmand.data.index.IndexBatchCreator
uploadFileToServer
WARNING: Deleting file from downloadsCroatia_europe_1.obf.zip Server
returned HTTP response code: 400 for URL:
http://code.google.com/p/osmand/downloads/delete.do?name=Croatia_europe_1.obf.zip

Victor Shcherb

unread,
May 22, 2011, 8:19:15 AM5/22/11
to osm...@googlegroups.com
I hope you simply delete token (make it is invisible for us) but specified. Actually I struggling sometimes with that error but my mistake was specifying google_mail password instead of googlecode password account !

2011/5/22 hbogner <hbo...@gmail.com>

hbogner

unread,
May 22, 2011, 8:44:13 AM5/22/11
to Osmand
Yes, I juste deleted token from paste
Here is my edited batch.xml:
http://pastebin.com/ZqBT31XR
private data is censored, but syntax is here.
When I manually delete files upload works fine, only when there are
old files it doesn't work.

Victor Shcherb

unread,
May 22, 2011, 8:45:44 AM5/22/11
to osm...@googlegroups.com
I did not see pagegen? Is it also censored?

2011/5/22 hbogner <hbo...@gmail.com>

hbogner

unread,
May 22, 2011, 8:56:10 AM5/22/11
to Osmand
No, pagegen is NOT censored, but was unknown to me, found pagegen
now, testing with it :D
Earlier I asked what was needed for upload & delete and was said SSID
& HSID
I tested with: SSID&HSID, SID&HSID, SSID&HSID&TOKEN, SID&HSID&TOKEN

On 22 svi, 14:45, Victor Shcherb <vics...@gmail.com> wrote:
> I did not see pagegen? Is it also censored?
>
> 2011/5/22 hbogner <hbog...@gmail.com>
Reply all
Reply to author
Forward
0 new messages