OpenStreetMap Forum

The Free Wiki World Map

You are not logged in.

#1 2012-05-04 10:22:28

How to create own map for Thailand

RocketMan wrote:

No update since April 1st? Does anyone know of an alternate place to download osm data for SE Asia? I can compile the map with mkgmap. I don't want to download the whole planet as my internet connection is kind of slow.

@RocketMan
Geofabrik has some extracts of the planet file available for download.
Parts of Asia are here: http://download.geofabrik.de/osm/asia/
Maybe your area of interest is covered by these files ...

Offline

#2 2012-05-04 10:26:31

Beddhist
Senior Member
From: Glenbervie, NZ
Registered: 2009-07-28
Posts: 256
Website

Re: How to create own map for Thailand

Or you could try Overpass and download only what you need.

Offline

#3 2012-05-04 14:32:42

Re: How to create own map for Thailand

Zartbitter wrote:

@RocketMan
Geofabrik has some extracts of the planet file available for download.
Parts of Asia are here: http://download.geofabrik.de/osm/asia/
Maybe your area of interest is covered by these files ...

I am looking for Thailand first of all and second Cambodia and Laos. Thailand is not listed on geofabrik unfortunately, otherwise it would have been a good source.

Offline

#4 2012-05-04 16:04:20

Re: How to create own map for Thailand

Beddhist wrote:

Or you could try Overpass and download only what you need.

This is new to me. Tried to pull some data with wget and it compiled into a map! Very interesting, but I need to test more before I start celebrating.

Thanks.

Offline

#5 2012-05-04 19:15:08

Re: How to create own map for Thailand

When I download a bigger chunk of data the splitter does not work anymore????



C:\Users\NightRider\Desktop\mkgmap tools>java -Xmx1000m -jar splitter/splitter.j
ar --max-nodes=640000 map.osm
cache=
description=
geonames-file=
legacy-mode=false
mapid=63240001
max-areas=255
max-nodes=640000
max-threads=2 (auto)
mixed=false
no-trim=false
output=pbf
output-dir=
overlap=2000
resolution=13
split-file=
status-freq=120
write-kml=
Elapsed time: 0s   Memory: Current 15MB (1MB used, 14MB free) Max 966MB
Time started: Sat May 05 00:11:23 ICT 2012
Map is being split for resolution 13:
- area boundaries are aligned to 0x800 map units
- areas are multiples of 0x1000 map units wide and high
Processing map.osm
java.io.EOFException: no more data available - expected end tag </osm> to close
start tag <osm> from line 2, parser stopped on END_TAG seen ...<node id="1740238
532" lat="12.9067020" lon="100.9800288"/>\n... @652723:1
        at org.xmlpull.mxp1.MXParser.fillBuf(MXParser.java:3035)
        at org.xmlpull.mxp1.MXParser.more(MXParser.java:3046)
        at org.xmlpull.mxp1.MXParser.nextImpl(MXParser.java:1384)
        at org.xmlpull.mxp1.MXParser.next(MXParser.java:1093)
        at uk.me.parabola.splitter.AbstractXppParser.parse(AbstractXppParser.jav
a:66)
        at uk.me.parabola.splitter.Main.processMap(Main.java:413)
        at uk.me.parabola.splitter.Main.calculateAreas(Main.java:288)
        at uk.me.parabola.splitter.Main.split(Main.java:164)
        at uk.me.parabola.splitter.Main.start(Main.java:119)
        at uk.me.parabola.splitter.Main.main(Main.java:108)
in 1 file
Time: Sat May 05 00:11:26 ICT 2012
Exact map coverage is (11.999988555908203,99.99998331069946) to (14.999985694885
254,102.99998044967651)
Trimmed and rounded map coverage is (12.041015625,99.9755859375) to (15.02929687
5,102.9638671875)
Splitting nodes into areas containing a maximum of 640á000 nodes each...
Area (12.041015625,99.9755859375) to (15.029296875,102.9638671875) contains 606á
352 nodes. DONE!
1 areas:
Area 63240001 covers (0x89000,0x471800) to (0xab000,0x493800)
Writing out split osm files Sat May 05 00:11:26 ICT 2012
Processing 1 areas in a single pass
(12.041015625,99.9755859375) to (15.029296875,102.9638671875)
Starting pass 1 of 1, processing 1 areas (63240001 to 63240001)
Grid [512][512] for grid area (11.998100280761719,99.93267059326172) to (15.0722
12219238281,103.00678253173828) requires max. 1 checks for each node.
Grid was created in 94 ms
Allocating three-tier structure to save area info (HashMap->vector->chunkvector)

Allocating three-tier structure to save area info (HashMap->vector->chunkvector)

Processing map.osm
java.io.EOFException: no more data available - expected end tag </osm> to close
start tag <osm> from line 2, parser stopped on END_TAG seen ...<node id="1740238
532" lat="12.9067020" lon="100.9800288"/>\n... @652723:1
        at org.xmlpull.mxp1.MXParser.fillBuf(MXParser.java:3035)
        at org.xmlpull.mxp1.MXParser.more(MXParser.java:3046)
        at org.xmlpull.mxp1.MXParser.nextImpl(MXParser.java:1384)
        at org.xmlpull.mxp1.MXParser.next(MXParser.java:1093)
        at uk.me.parabola.splitter.AbstractXppParser.parse(AbstractXppParser.jav
a:66)
        at uk.me.parabola.splitter.Main.processMap(Main.java:413)
        at uk.me.parabola.splitter.Main.writeAreas(Main.java:369)
        at uk.me.parabola.splitter.Main.split(Main.java:191)
        at uk.me.parabola.splitter.Main.start(Main.java:119)
        at uk.me.parabola.splitter.Main.main(Main.java:108)
***********************************************************
Final statistics
***********************************************************
Needed dictionary entries: 1 of 65535
coords occupancy
MAP occupancy: 608á052
Length-6 chunks: 45á849 (Bytes: 1á100á376)
Length-10 chunks: 0 (Bytes: 0)
Length-14 chunks: 0 (Bytes: 0)
Length-18 chunks: 0 (Bytes: 0)
Length-22 chunks: 0 (Bytes: 0)
Length-26 chunks: 0 (Bytes: 0)
Length-30 chunks: 0 (Bytes: 0)
Length-34 chunks: 0 (Bytes: 0)
Length-38 chunks: 0 (Bytes: 0)
Length-42 chunks: 0 (Bytes: 0)
Length-46 chunks: 0 (Bytes: 0)
Length-50 chunks: 0 (Bytes: 0)
Length-54 chunks: 0 (Bytes: 0)
Length-58 chunks: 0 (Bytes: 0)
Length-62 chunks: 0 (Bytes: 0)
Length-66 chunks: 0 (Bytes: 0)
Length-68 chunks: 0 (Bytes: 0)
RLE compresion info: compressed / uncompressed size / ratio: 275á094 / 851á346 /
68%
Map details: HashMap -> 7 vectors for 45á849 chunks(vector usage < 1%)
ways occupancy
MAP occupancy: 0
Length-6 chunks: 0 (Bytes: 0)
Length-10 chunks: 0 (Bytes: 0)
Length-14 chunks: 0 (Bytes: 0)
Length-18 chunks: 0 (Bytes: 0)
Length-22 chunks: 0 (Bytes: 0)
Length-26 chunks: 0 (Bytes: 0)
Length-30 chunks: 0 (Bytes: 0)
Length-34 chunks: 0 (Bytes: 0)
Length-38 chunks: 0 (Bytes: 0)
Length-42 chunks: 0 (Bytes: 0)
Length-46 chunks: 0 (Bytes: 0)
Length-50 chunks: 0 (Bytes: 0)
Length-54 chunks: 0 (Bytes: 0)
Length-58 chunks: 0 (Bytes: 0)
Length-62 chunks: 0 (Bytes: 0)
Length-66 chunks: 0 (Bytes: 0)
Length-68 chunks: 0 (Bytes: 0)
Map details: HashMap -> 0 vectors for 0 chunks(vector usage < 1%)

Thread worker-0 has finished
Time finished: Sat May 05 00:11:32 ICT 2012
Total time taken: 9s

C:\Users\NightRider\Desktop\mkgmap tools>pause
Press any key to continue . . .


Anyone seen this?

Offline

#6 2012-05-04 20:49:50

Re: How to create own map for Thailand

RocketMan wrote:

java.io.EOFException: no more data available - expected end tag </osm> to close
start tag <osm> from line 2

I think that the file you used as input is not complete. Could you try to download again?

Otherwise, you can download asia.pbf, cut out the required region, and then split with splitter and create with mkgmap.
For cutting Thailand (with most of Laos and Cambodia), I use e.g.
"C:\Program Files (x86)\OpenStreetMap\osmosis-0.40.1\bin\Osmosis.bat" --read-pbf file=E:\Maps\Raw\asia_20120326.osm.pbf --bounding-box top=21 left=97 bottom=5 right=106 --write-pbf E:\Maps\Raw\Thailand_20120326.osm.pbf
Increase "top" and "right" a little to get also Laos and Cambodia complete.
Present versions of splitter and mkgmap can use pbf files.

Offline

#7 2012-05-04 22:37:03

Beddhist
Senior Member
From: Glenbervie, NZ
Registered: 2009-07-28
Posts: 256
Website

Re: How to create own map for Thailand

Rocketman, check out the Thailand forum. I think there is an active user who pulls the Thailand data out occasionally.

Offline

#8 2012-05-05 05:21:00

Willi2006
Senior Member
From: Khon Kaen, Thailand
Registered: 2009-12-12
Posts: 421
Website

Re: How to create own map for Thailand

About a month ago I tried Overpass API to get the data for Thailand. It claims you can request up to 100 square degrees. And indeed you can do that but the data returned is incomplete. E.g. for a Khon Kaen Province bbox, an area of 1.5 times 1.5 degrees, I got 246,283 points instead of 333,074, 0 lines and 0 relations. For me: unuseable.

Offline

#9 2012-05-05 08:16:50

Re: How to create own map for Thailand

Beddhist wrote:

Rocketman, check out the Thailand forum. I think there is an active user who pulls the Thailand data out occasionally.

I checked it and it seems like they have the same issue. There isn't any fault-free and up-to-date extracts. The only ways seems to be to pull the whole planet with is not an option for me with Thai internet (I pay for 8M and get about 0.5M).

Offline

#10 2012-05-05 08:19:21

Re: How to create own map for Thailand

Willi2006 wrote:

About a month ago I tried Overpass API to get the data for Thailand. It claims you can request up to 100 square degrees. And indeed you can do that but the data returned is incomplete. E.g. for a Khon Kaen Province bbox, an area of 1.5 times 1.5 degrees, I got 246,283 points instead of 333,074, 0 lines and 0 relations. For me: unuseable.

You have been around in Thailand for some time, where do you pull your map data?

Last edited by RocketMan (2012-05-05 08:26:27)

Offline

#11 2012-05-05 08:24:03

Re: How to create own map for Thailand

Bernhard Hiller wrote:
RocketMan wrote:

java.io.EOFException: no more data available - expected end tag </osm> to close
start tag <osm> from line 2

I think that the file you used as input is not complete. Could you try to download again?

Otherwise, you can download asia.pbf, cut out the required region, and then split with splitter and create with mkgmap.
For cutting Thailand (with most of Laos and Cambodia), I use e.g.
"C:\Program Files (x86)\OpenStreetMap\osmosis-0.40.1\bin\Osmosis.bat" --read-pbf file=E:\Maps\Raw\asia_20120326.osm.pbf --bounding-box top=21 left=97 bottom=5 right=106 --write-pbf E:\Maps\Raw\Thailand_20120326.osm.pbf
Increase "top" and "right" a little to get also Laos and Cambodia complete.
Present versions of splitter and mkgmap can use pbf files.


I have tried many times with same failed result. As soon as I try an area approximatly bigger than the area that can be downloaded direct from www.openstreetmap.org it starts to fail.

The asia data is also too big for me to download on a regular basis with a poor internet connection.

Offline

#12 2012-05-06 10:13:59

csdf
Senior Member
From: UK, living in Abu Dhabi
Registered: 2009-08-11
Posts: 314
Website

Re: How to create own map for Thailand

For Thailand, I've been creating a SE Asia map (Thailand, Cambodia, Vietnam, Malaysia, Singapore) by running osmosis on the Geofabrik Asia extract.  If anyone wants the osmosis parameters I'm happy to send.  This extract has complete borders so no flooding.

Offline

#13 2012-05-06 10:25:32

Re: How to create own map for Thailand

@RocketMan: DuiNui offers a daily extract of Thailand. See his post in the Thailand forum: http://forum.openstreetmap.org/viewtopic.php?id=13851. His zipped extract is some 37 MB.
Also I created a map of Thailand for Garmin devices, but I haven't updated since some time (see http://forum.openstreetmap.org/viewtopic.php?id=15541 ).
You could also ask GeoFabrik ( http://www.geofabrik.de/ ) to create a daily extract of the regions you are interested in.

Offline

#14 2012-05-06 12:07:31

Beddhist
Senior Member
From: Glenbervie, NZ
Registered: 2009-07-28
Posts: 256
Website

Re: How to create own map for Thailand

That's what DuiNui said he would do, but the file I just downloaded is from September last year.

Offline

#15 2012-05-06 14:42:16

Lambertus
Administrator
From: Apeldoorn (NL)
Registered: 2007-03-17
Posts: 2,960
Website

Re: How to create own map for Thailand

RocketMan wrote:
OSMNZ wrote:

Hi

When is the next a planned update from OSM?

The dataset seems to be from 01-APR-2012

I am keen to compile some new maps on my Garmin, after having made many edits (inserts) on OSM.

Cheers


The planetdump is also from April 1st.

http://planet.openstreetmap.org/

I wish I could write a program that pulled data piece by piece using the export on the OSM web page.

No need to write a program for that, some scripting or manual typework is sufficient.

Download the latest planet dump.
Update with latest data by applying change sets using Osmosis
Extract Thailand from the planet using Osmosis and its bbox functions
Pull the updated planet through Splitter to create tiles
Compile the tiles into a Garmin map using Mkgmap.

See OSM wiki for detailed usage of Osmosis, Splitter and Mkgmap.


Mapping tools: Garmin GPSmap 60CSx, Giant Terrago 2002

Offline

#16 2012-05-06 15:57:39

Willi2006
Senior Member
From: Khon Kaen, Thailand
Registered: 2009-12-12
Posts: 421
Website

Re: How to create own map for Thailand

RocketMan wrote:

You have been around in Thailand for some time, where do you pull your map data?

I'm a contributor not a user of the OSM map. Unfortunately the Mapnik raster and Garmin vector maps provided by others only render some of the stuff I'm mapping. Thus I started to create maps with Maperitive and Mkgmap to check my mapping and see the progress.

As I'm mainly interested in the province Khon Kaen where I live the amount of data is small. It's possible to download this area with JOSM. The amount of data is far below the limit to get blocked. Sometimes I'm interested in the Northeast of Thailand which can be downloaded in 2 junks without getting blocked and merged with JOSM. I do whole Thailand only occasionally. It keeps me busy a whole day. The size of the resulting OSM file was about 100 MB two years ago but is now more than 500 MB.

Offline

#17 2012-05-07 11:40:31

Re: How to create own map for Thailand

Lambertus wrote:
RocketMan wrote:
OSMNZ wrote:

Hi

When is the next a planned update from OSM?

The dataset seems to be from 01-APR-2012

I am keen to compile some new maps on my Garmin, after having made many edits (inserts) on OSM.

Cheers


The planetdump is also from April 1st.

http://planet.openstreetmap.org/

I wish I could write a program that pulled data piece by piece using the export on the OSM web page.

No need to write a program for that, some scripting or manual typework is sufficient.

Download the latest planet dump.
Update with latest data by applying change sets using Osmosis
Extract Thailand from the planet using Osmosis and its bbox functions
Pull the updated planet through Splitter to create tiles
Compile the tiles into a Garmin map using Mkgmap.

See OSM wiki for detailed usage of Osmosis, Splitter and Mkgmap.

This is what I am doing except for I downloaded asia from geofabrik rather than the whole planet. It took me about 12 hours to download the 1.6G asia file so the planet is not an option for me. I pay for a 8M ADSL in Thailand but it they only provide about 0.5M....

Thanks for your answer and the service you provide, it has been a big help for me to get started with OSM. What would make your service super would be if people could upload their style sheets and type files to your server and then use them like with your mapnik type file.

I wrote geofabrik and asked if they could put Thailand, Laos, Cambodia and Vietnam in one extract in lieu for Vietnam, they can't say more than no...

Last edited by RocketMan (2012-05-07 11:46:39)

Offline

#18 2012-05-07 11:50:20

Re: How to create own map for Thailand

csdf wrote:

For Thailand, I've been creating a SE Asia map (Thailand, Cambodia, Vietnam, Malaysia, Singapore) by running osmosis on the Geofabrik Asia extract.  If anyone wants the osmosis parameters I'm happy to send.  This extract has complete borders so no flooding.

I am very interested in those parameters. My extracks gets "flooded" near the "cuts".

Offline

#19 2012-05-07 11:53:31

Re: How to create own map for Thailand

Bernhard Hiller wrote:

@RocketMan: DuiNui offers a daily extract of Thailand. See his post in the Thailand forum: http://forum.openstreetmap.org/viewtopic.php?id=13851. His zipped extract is some 37 MB.
Also I created a map of Thailand for Garmin devices, but I haven't updated since some time (see http://forum.openstreetmap.org/viewtopic.php?id=15541 ).
You could also ask GeoFabrik ( http://www.geofabrik.de/ ) to create a daily extract of the regions you are interested in.


I also checked DuiNui's extract but it was not up to date.

I emailed geofabrik today and asked just that, they can't do more than say no....

Offline

#20 2012-05-16 19:36:30

Re: How to create own map for Thailand

RocketMan wrote:

I emailed geofabrik today and asked just that, they can't do more than say no....

They said no pretty much.

Offline

#21 2012-05-17 17:27:12

csdf
Senior Member
From: UK, living in Abu Dhabi
Registered: 2009-08-11
Posts: 314
Website

Re: How to create own map for Thailand

That's a shame - I would have thought it would be a pretty popular area

Offline

#22 2012-05-18 08:13:27

Re: How to create own map for Thailand

Can you post the parameters you use to cut out SE asia from geofabriks extract? My extracks gets "flooded" near the "cuts".

Offline

#23 2012-05-19 18:57:34

Re: How to create own map for Thailand

The coastline does not work correctly with mkgmap. In the mkgmap mailing list, the "precompiled sea" is an important topic since several weaks (or already months?). Consequently I decided not to generate sea, but to use a thick coastline instead.

Offline

#24 2012-05-24 14:21:57

csdf
Senior Member
From: UK, living in Abu Dhabi
Registered: 2009-08-11
Posts: 314
Website

Re: How to create own map for Thailand

RocketMan wrote:

Can you post the parameters you use to cut out SE asia from geofabriks extract? My extracks gets "flooded" near the "cuts".

bin\osmosis -v --rb .\asia.osm.pbf --bb left=89.93408 bottom=0.28564 right=105.71045 top=20.73557  --wb malaysiaThailandSingapore.pbf

Offline

#25 2012-05-27 16:56:05

Re: How to create own map for Thailand

csdf wrote:
RocketMan wrote:

Can you post the parameters you use to cut out SE asia from geofabriks extract? My extracks gets "flooded" near the "cuts".

bin\osmosis -v --rb .\asia.osm.pbf --bb left=89.93408 bottom=0.28564 right=105.71045 top=20.73557  --wb malaysiaThailandSingapore.pbf

Thanks

Offline

Board footer

Powered by FluxBB 1.4.8
Hosting sponsored by Oxilion