mapwriter produces nearly empty map file

661 views
Skip to first unread message

Mauricio Dante Corbini

unread,
Jul 9, 2012, 3:55:00 PM7/9/12
to mapsforge-dev
Hi!

I am trying to produce a map file for the city of Barcelona for some
test application.
I did the following steps:

1. Installed osmosis-0,40.1 in my homedirectory, on a 64bit debian
stable system with java6 sdk installed.
2. downloaded mapsforge-map-writer-0.3.0-jar-with-dependencies.jar and
installed it in ~/.openstreetmap/osmosis/plugins
3. downloaded http://download.geofabrik.de/osm/europe/spain.osm.bz2
4. configured a LARGE java.io.tmpdir and set max heap size to 2G for
good measure
5. extracted a smaller region with

osmosis-0.40.1$ bin/osmosis --rx file=/opt/openstreetmap/spain.osm --
bounding-box left=2.046 bottom=41.282 right=2.256 top=41.45 --wx
file=../../openstreetmap/barcelona.osm

6. tried to create a barcelona.map with:

osmosis-0.40.1$ bin/osmosis --rx file=/opt/openstreetmap/barcelona.osm
--mw file=../../openstreetmap/barcelona.map
bbox=2.046,41.282,2.256,41.45 type=hd

The result looks like this:
osmosis-0.40.1$ ls -l /home/mdc/openstreetmap/
total 38212
-rw-r--r-- 1 mdc user 1041 jul 9 21:28 barcelona.map
-rw-r--r-- 1 mdc user 39123617 jul 9 21:02 barcelona.osm


So the resulting map file is just under 1 k in size.

complete output is:

osmosis-0.40.1$ bin/osmosis --rx file=../../openstreetmap/
barcelona.osm --mw file=../../openstreetmap/barcelona.map
bbox=2.046,41.282,2.256,41.45 type=hd -v7
09-jul-2012 21:28:38 org.openstreetmap.osmosis.core.Osmosis run
INFO: Osmosis Version 0.40.1
09-jul-2012 21:28:38 org.openstreetmap.osmosis.core.Osmosis run
INFO: Preparing pipeline.
09-jul-2012 21:28:38
org.mapsforge.map.writer.osmosis.MapFileWriterTask <init>
INFO: mapfile-writer version: mapsforge-map-writer-0.3.0
09-jul-2012 21:28:38
org.mapsforge.map.writer.osmosis.MapFileWriterTask <init>
INFO: mapfile format specification version: 3
09-jul-2012 21:28:38 org.openstreetmap.osmosis.core.Osmosis run
INFO: Launching pipeline execution.
09-jul-2012 21:28:38 org.openstreetmap.osmosis.core.Osmosis run
INFO: Pipeline executing, waiting for completion.
09-jul-2012 21:28:41
org.mapsforge.map.writer.osmosis.MapFileWriterTask complete
INFO: completing read...
09-jul-2012 21:28:44
org.mapsforge.map.writer.osmosis.MapFileWriterTask complete
INFO: start writing file...
09-jul-2012 21:28:44
org.mapsforge.map.writer.osmosis.MapFileWriterTask complete
INFO: overwriting file /home/mdc/projects/osmosis-0.40.1/../../
openstreetmap/barcelona.map
09-jul-2012 21:28:45 org.mapsforge.map.writer.MapFileWriter
writeSubfile
INFO: written 100% of sub file for zoom interval index 0
09-jul-2012 21:28:45 org.mapsforge.map.writer.MapFileWriter
writeSubfile
INFO: written 100% of sub file for zoom interval index 1
09-jul-2012 21:28:45 org.mapsforge.map.writer.MapFileWriter
writeSubfile
INFO: written 10.0% of sub file for zoom interval index 2
09-jul-2012 21:28:45 org.mapsforge.map.writer.MapFileWriter
writeSubfile
INFO: written 20.0% of sub file for zoom interval index 2
09-jul-2012 21:28:45 org.mapsforge.map.writer.MapFileWriter
writeSubfile
INFO: written 30.0% of sub file for zoom interval index 2
09-jul-2012 21:28:45 org.mapsforge.map.writer.MapFileWriter
writeSubfile
INFO: written 40.0% of sub file for zoom interval index 2
09-jul-2012 21:28:45 org.mapsforge.map.writer.MapFileWriter
writeSubfile
INFO: written 50.0% of sub file for zoom interval index 2
09-jul-2012 21:28:45 org.mapsforge.map.writer.MapFileWriter
writeSubfile
INFO: written 60.0% of sub file for zoom interval index 2
09-jul-2012 21:28:45 org.mapsforge.map.writer.MapFileWriter
writeSubfile
INFO: written 70.0% of sub file for zoom interval index 2
09-jul-2012 21:28:45 org.mapsforge.map.writer.MapFileWriter
writeSubfile
INFO: written 80.0% of sub file for zoom interval index 2
09-jul-2012 21:28:45 org.mapsforge.map.writer.MapFileWriter
writeSubfile
INFO: written 90.0% of sub file for zoom interval index 2
09-jul-2012 21:28:45 org.mapsforge.map.writer.MapFileWriter
writeSubfile
INFO: written 100% of sub file for zoom interval index 2
09-jul-2012 21:28:45 org.mapsforge.map.writer.MapFileWriter writeFile
INFO: Finished writing file.
09-jul-2012 21:28:45
org.mapsforge.map.writer.osmosis.MapFileWriterTask complete
INFO: finished...
09-jul-2012 21:28:45
org.mapsforge.map.writer.osmosis.MapFileWriterTask complete
INFO: estimated memory consumption: 77,41MB
09-jul-2012 21:28:45 org.openstreetmap.osmosis.core.Osmosis run
INFO: Pipeline complete.
09-jul-2012 21:28:45 org.openstreetmap.osmosis.core.Osmosis run
INFO: Total execution time: 7170 milliseconds.

I tried different locations for the plugin and using --map-writer
instead of --mw or giving the -p plugin option, but nothing helped.

What am I doing wrong?

Karsten Groll

unread,
Jul 9, 2012, 4:04:43 PM7/9/12
to mapsfo...@googlegroups.com
Hello Mauricio,

it looks like you did everything correct, your output looks good to
me. Could you upload your "barcelona.osm" file somewhere so that I can
try it myself?

Regards,

Karsten



2012/7/9 Mauricio Dante Corbini <tril...@asgalon.net>:

Mauricio Dante Corbini

unread,
Jul 9, 2012, 4:19:12 PM7/9/12
to mapsfo...@googlegroups.com
Hello Karsten,

you can download it from http://www.asgalon.org/mapforge_trial_bcn.tar.bz2,
the file contains both the osm and the created map file.

regards

Karsten Groll

unread,
Jul 9, 2012, 4:32:25 PM7/9/12
to mapsfo...@googlegroups.com
Thanks, I'll take a look at it tomorrow.

2012/7/9 Mauricio Dante Corbini <tril...@asgalon.net>:

Karsten Groll

unread,
Jul 10, 2012, 11:57:24 AM7/10/12
to mapsfo...@googlegroups.com
Hello Mauricio,

I have resolved the problem. You have mixed up the values (lon / lat
instead of lat / lon) for the bbox parameter. The following call did
work for me:

osmosis --rx barcelona.osm.xml --mw file=barcelona.map bbox=41,2,42,3

I have uploaded the map file for you [1]. You have to use the latest
SVN source to view it. Note that I have chosen a bounding box that is
much wider than the optimal one. So you might have tho scroll a little
bit to the left to see Barcelona instead of the ocean.


Regards,

Karsten

[1] https://dl.dropbox.com/u/36578214/barcelona.map

2012/7/9 Karsten Groll <karste...@googlemail.com>:

Mauricio Dante Corbini

unread,
Jul 11, 2012, 10:19:27 AM7/11/12
to mapsfo...@googlegroups.com
Hello Karsten,

thanks, that did it. I must have missed that silly mistake a
thousand times...

regards
  M.

Thilo Mühlberg

unread,
Jul 11, 2012, 3:52:42 PM7/11/12
to mapsfo...@googlegroups.com
Hi,

take a look what the wiki page
(https://code.google.com/p/mapsforge/wiki/GettingStartedMapWriter) says
about the bbox parameter: "minLat, minLon, maxLat, maxLon in exactly
this order [...]".

Looks like you just swapped the latitude/longitude coordinates in your
command as for example 2.046 is your minimum longitude and thus should
be the second rather than the first coordinate.

Does exchanging the values solve your problem?

Greetings,
Thilo
signature.asc

test beckon

unread,
Sep 4, 2015, 4:25:59 AM9/4/15
to mapsforge-dev
hi guys if somebody hav idea, i got same problem can not able to convert .osm file to .map

Emux

unread,
Sep 4, 2015, 4:28:25 AM9/4/15
to mapsfo...@googlegroups.com
You need to give more details on your process.

What map-writer are you using, if using external tag-mapping and bounding box etc.

--
Emux

Android Team

unread,
Sep 4, 2015, 4:33:34 AM9/4/15
to mapsforge-dev

I have tried to convert .osm file to .map i have follows steps and configure osmosis, i have tried with 0.44.1(latest one) as well as 0.41.1.

I have follows many totorial and try to debug but didn't get specfic result.if somebody have idea pls help me out this problem thanks

 - osmosis.bat compiled sucessfully 
   - but after i compile this command it gives me error

    osmosis --rx file=e:/Android_Saveen/Andriod/Mysure/soft/india-     latest.osm.pbf
    --mapfile-writer  file=e:/osmosis/osmosis-0.41/osmosis-0.41/bin/myu.map 
     bbox=12.3836,76.5610,12.197176.7663 type=hd
 

another cmd i tried :

osmosis --rx file=mysuru.osm --mapfile-writer file=mysuru.map type=hd

SEVERE: Execution aborted. org.openstreetmap.osmosis.core.OsmosisRuntimeException: Task type mapfile-writer doesn't exist.

if i copied map-writer jar into lib under default then it giving me this error

SEVERE: Thread for task 1-rx failed.

Emux

unread,
Sep 4, 2015, 4:40:52 AM9/4/15
to mapsfo...@googlegroups.com
You can use the latest Osmosis with map-writer (get it from our downloads).
Just need to put map-writer jar inside Osmosis at lib/default folder.

Then you need to look after your command line, i.e. not reading pbf files with the rx parameter or missing ",".

Also the order of coordinates in bbox parameter is minLat,minLon,maxLat,maxLon.

--
Emux

Android Team

unread,
Sep 4, 2015, 5:31:36 AM9/4/15
to mapsforge-dev
I'm doing same things 

i compiled with this cmd 

E:\osmosis\osmosis\bin>osmosis --rx file=e:\osmosis\osmosis\mysuru.osm --mapfile
-writer file=e:\osmosis\osmosis\mysuru.map type=hd

but got this result

E:\osmosis\osmosis\bin>osmosis --rx file=e:\osmosis\osmosis\mysuru.osm --mapfile
-writer file=e:\osmosis\osmosis\mysuru.map type=hd
Sep 04, 2015 2:59:00 PM org.openstreetmap.osmosis.core.Osmosis run
INFO: Osmosis Version 0.44.1
Sep 04, 2015 2:59:00 PM org.openstreetmap.osmosis.core.Osmosis run
INFO: Preparing pipeline.
Sep 04, 2015 2:59:00 PM org.mapsforge.map.writer.osmosis.MapFileWriterTask <init
>
INFO: mapfile-writer version: mapsforge-map-writer-dev-SNAPSHOT
Sep 04, 2015 2:59:00 PM org.mapsforge.map.writer.osmosis.MapFileWriterTask <init
>
INFO: mapfile format specification version: 3
Sep 04, 2015 2:59:00 PM org.openstreetmap.osmosis.core.Osmosis run
INFO: Launching pipeline execution.
Sep 04, 2015 2:59:00 PM org.openstreetmap.osmosis.core.Osmosis run
INFO: Pipeline executing, waiting for completion.
Sep 04, 2015 2:59:00 PM org.openstreetmap.osmosis.core.pipeline.common.ActiveTas
kManager waitForCompletion
SEVERE: Thread for task 1-rx failed
org.openstreetmap.osmosis.core.OsmosisRuntimeException: Node 16206505 does not h
ave a version attribute as OSM 0.6 are required to have.  Is this a 0.5 file?
        at org.openstreetmap.osmosis.xml.v0_6.impl.NodeElementProcessor.begin(No
deElementProcessor.java:95)
        at org.openstreetmap.osmosis.xml.v0_6.impl.OsmHandler.startElement(OsmHa
ndler.java:90)
        at org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown Sour
ce)
        at org.apache.xerces.parsers.AbstractXMLDocumentParser.emptyElement(Unkn
own Source)
        at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanStartElemen
t(Unknown Source)
        at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContent
Dispatcher.dispatch(Unknown Source)
        at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Un
known Source)
        at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
        at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
        at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
        at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
        at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Sour
ce)
        at org.apache.xerces.jaxp.SAXParserImpl.parse(Unknown Source)
        at javax.xml.parsers.SAXParser.parse(Unknown Source)
        at org.openstreetmap.osmosis.xml.v0_6.XmlReader.run(XmlReader.java:111)
        at java.lang.Thread.run(Unknown Source)

Sep 04, 2015 2:59:00 PM org.openstreetmap.osmosis.core.Osmosis main
SEVERE: Execution aborted.
org.openstreetmap.osmosis.core.OsmosisRuntimeException: One or more tasks failed
.
        at org.openstreetmap.osmosis.core.pipeline.common.Pipeline.waitForComple
tion(Pipeline.java:146)
        at org.openstreetmap.osmosis.core.Osmosis.run(Osmosis.java:92)
        at org.openstreetmap.osmosis.core.Osmosis.main(Osmosis.java:37)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
        at java.lang.reflect.Method.invoke(Unknown Source)
        at org.codehaus.plexus.classworlds.launcher.Launcher.launchStandard(Laun
cher.java:330)
        at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.jav
a:238)
        at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(La
uncher.java:415)
        at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:
356)
        at org.codehaus.classworlds.Launcher.main(Launcher.java:47)


 

Emux

unread,
Sep 4, 2015, 5:39:15 AM9/4/15
to mapsfo...@googlegroups.com
See the log, you seem to use a custom osm.

The osm file is not considered valid from Osmosis.
Each element needs to have 'version' and 'timestamp' in it.

--
Emux

Android Team

unread,
Sep 4, 2015, 5:47:14 AM9/4/15
to mapsforge-dev
i have made osm file from QGIS Desktop software, actually i need specific area .map file, i have trying to export from openstreet map but unable to success.
i  have full country .map but i didn't got any way

i have downloaded osm file also, need to extract partcular city from it
so, is there any way to do it extract from osm file

Emux

unread,
Sep 4, 2015, 5:54:21 AM9/4/15
to mapsfo...@googlegroups.com
You can limit the produced map file if you use in map-writer the "bbox=minLat,minLon,maxLat,maxLon" parameter.

Another way is to limit before the osm file with Osmosis, e.g. using the --bounding-box argument.

--
Emux

Android Team

unread,
Sep 4, 2015, 6:07:38 AM9/4/15
to mapsforge-dev
i tried with this way and got this exception

E:\osmosis\osmosis\bin>osmosis --rb file=E:\osmosis\osmosis\india.osm --mapfile
-wirter file=E:\osmosis\osmosis\mysur.map type=hd
Sep 04, 2015 3:33:31 PM org.openstreetmap.osmosis.core.Osmosis run
INFO: Osmosis Version 0.44.1
Sep 04, 2015 3:33:31 PM org.openstreetmap.osmosis.core.Osmosis run
INFO: Preparing pipeline.
Sep 04, 2015 3:33:31 PM org.openstreetmap.osmosis.core.Osmosis main
SEVERE: Execution aborted.
org.openstreetmap.osmosis.core.OsmosisRuntimeException: Task type mapfile doesn'
t exist.
        at org.openstreetmap.osmosis.core.pipeline.common.TaskManagerFactoryRegi
ster.getInstance(TaskManagerFactoryRegister.java:60)
        at org.openstreetmap.osmosis.core.pipeline.common.Pipeline.buildTasks(Pi
peline.java:50)
        at org.openstreetmap.osmosis.core.pipeline.common.Pipeline.prepare(Pipel
ine.java:112)
        at org.openstreetmap.osmosis.core.Osmosis.run(Osmosis.java:86)
        at org.openstreetmap.osmosis.core.Osmosis.main(Osmosis.java:37)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
        at java.lang.reflect.Method.invoke(Unknown Source)
        at org.codehaus.plexus.classworlds.launcher.Launcher.launchStandard(Laun
cher.java:330)
        at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.jav
a:238)
        at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(La
uncher.java:415)
        at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:
356)
        at org.codehaus.classworlds.Launcher.main(Launcher.java:47) 


// and i also tried 

E:\osmosis\osmosis\bin>osmosis --rb file=E:\osmosis\osmosis\india.osm --mapfile
-wirter file=E:\osmosis\osmosis\mysur.map bbox=12.1971,76.7663,12.3836,76.5610 t
ype=hd
Sep 04, 2015 3:37:06 PM org.openstreetmap.osmosis.core.Osmosis run
INFO: Osmosis Version 0.44.1
Sep 04, 2015 3:37:06 PM org.openstreetmap.osmosis.core.Osmosis run
INFO: Preparing pipeline.
Sep 04, 2015 3:37:06 PM org.openstreetmap.osmosis.core.Osmosis main
SEVERE: Execution aborted.
org.openstreetmap.osmosis.core.OsmosisRuntimeException: Task type mapfile doesn'
t exist.
        at org.openstreetmap.osmosis.core.pipeline.common.TaskManagerFactoryRegi
ster.getInstance(TaskManagerFactoryRegister.java:60)
        at org.openstreetmap.osmosis.core.pipeline.common.Pipeline.buildTasks(Pi
peline.java:50)
        at org.openstreetmap.osmosis.core.pipeline.common.Pipeline.prepare(Pipel
ine.java:112)
        at org.openstreetmap.osmosis.core.Osmosis.run(Osmosis.java:86)

Emux

unread,
Sep 4, 2015, 6:11:31 AM9/4/15
to mapsfo...@googlegroups.com
Take a close look at your command line, you have typo in parameter names.

Also study the Osmosis guide, there are different read tasks for osm (--rx) and pbf (--rb) files.

--
Emux

Android Team

unread,
Sep 4, 2015, 6:14:03 AM9/4/15
to mapsforge-dev


On Friday, September 4, 2015 at 3:17:14 PM UTC+5:30, Android Team wrote:


On Friday, September 4, 2015 at 3:09:15 PM UTC+5:30, Emux wrote:
See the log, you seem to use a custom osm.

The osm file is not considered valid from Osmosis.
Each element needs to have 'version' and 'timestamp' in it.

--
 


i have also tried with this way

E:\osmosis\osmosis\bin>osmosis --rx file=e:/osmosis/osmosis/india.osm --mapfile
-writer file=e:/osmosis/osmosis/mysur.map bbox=12.2001,76.4964,12.4054,76.8452 t
ype=hd
Sep 04, 2015 3:42:01 PM org.openstreetmap.osmosis.core.Osmosis run
INFO: Osmosis Version 0.44.1
Sep 04, 2015 3:42:01 PM org.openstreetmap.osmosis.core.Osmosis run
INFO: Preparing pipeline.
Sep 04, 2015 3:42:01 PM org.openstreetmap.osmosis.core.Osmosis main
SEVERE: Execution aborted.
org.openstreetmap.osmosis.core.OsmosisRuntimeException: Task type mapfile doesn'
t exist.
        at org.openstreetmap.osmosis.core.pipeline.common.TaskManagerFactoryRegi
ster.getInstance(TaskManagerFactoryRegister.java:60)
        at org.openstreetmap.osmosis.core.pipeline.common.Pipeline.buildTasks(Pi
peline.java:50)
        at org.openstreetmap.osmosis.core.pipeline.common.Pipeline.prepare(Pipel
ine.java:112)
        at org.openstreetmap.osmosis.core.Osmosis.run(Osmosis.java:86)

Emux

unread,
Sep 4, 2015, 6:19:13 AM9/4/15
to mapsfo...@googlegroups.com
On 04/09/2015 01:14 μμ, Android Team wrote:
org.openstreetmap.osmosis.core.OsmosisRuntimeException: Task type mapfile doesn'
t exist.

There is no such thing as "mapfile" task, write the command in one line correctly spelled.

--
Emux

Android Team

unread,
Sep 4, 2015, 6:19:53 AM9/4/15
to mapsforge-dev
another try as u said

E:\osmosis\osmosis\bin>osmosis --rx file=india.osm --mapfile -writer file=mysur.
map bbox=12.2001,76.4964,12.4054,76.8452 type=hd
Sep 04, 2015 3:49:19 PM org.openstreetmap.osmosis.core.Osmosis run
INFO: Osmosis Version 0.44.1
Sep 04, 2015 3:49:20 PM org.openstreetmap.osmosis.core.Osmosis run
INFO: Preparing pipeline.
Sep 04, 2015 3:49:20 PM org.openstreetmap.osmosis.core.Osmosis main

Android Team

unread,
Sep 4, 2015, 6:52:05 AM9/4/15
to mapsforge-dev
Sir can you please tell me about cmd and if you have time then please check this osm file if it will change to .map or not..
if change then please send me its very urgent..
i hvae tried same thing from yestereday,, i have spend more then 20 hours but didn't get success 

i dont know exactly where is problem.it could be in .osm file or cmd line path problem or some configuration 


pls check out this file 

Emux

unread,
Sep 4, 2015, 7:07:36 AM9/4/15
to mapsfo...@googlegroups.com
The issue is that you keep writing the parameters with errors.

Try the following command line (copy / paste) with pbf from Geofabrik:

osmosis --rb file=india-latest.osm.pbf --mapfile-writer file=area.map bbox=12.2001,76.4964,12.4054,76.8452 type=hd

--
Emux

Android Team

unread,
Sep 4, 2015, 7:25:51 AM9/4/15
to mapsforge-dev
thanks alot, cmd is executing..
but it look time, let see how much time it will take..

and let you know. if everything is working fine 

Emux

unread,
Sep 4, 2015, 7:27:42 AM9/4/15
to mapsfo...@googlegroups.com
If you have enough RAM I recommend to try first with:

type=ram

as it's much quicker.

--
Emux

Android Team

unread,
Sep 4, 2015, 7:36:35 AM9/4/15
to mapsforge-dev
ok thanks once again.. for your support i really appreciate it

i'll try to this way do you have any idea normally how much time it will take ? 

Emux

unread,
Sep 4, 2015, 7:44:31 AM9/4/15
to mapsfo...@googlegroups.com
On 04/09/2015 02:36 μμ, Android Team wrote:
i'll try to this way do you have any idea normally how much time it will take ?

It normally depends on the pc hardware and the built map area.

Another hint is to let Osmosis use more Java heap with the JAVACMD_OPTIONS in it.
Example:

JAVACMD_OPTIONS="-Xms2048m -Xmx2048m -server"

--
Emux

Android Team

unread,
Sep 4, 2015, 7:57:35 AM9/4/15
to mapsforge-dev
Sir can you please explain bit more how we can run this java cmd on windows ?


which one path we need to select or something other way ?

In my system ram is 4GB and i have started but it told me about small heap size 


Emux

unread,
Sep 4, 2015, 8:01:29 AM9/4/15
to mapsfo...@googlegroups.com
Open the "osmosis" or "osmosis.bat" file (in osmosis/bin folder) in a editor.

In it, search for the JAVACMD_OPTIONS and copy paste the above in its position.

You'll need to test with different xms / xmx numbers based on your free RAM.

--
Emux

Android Team

unread,
Sep 4, 2015, 8:07:40 AM9/4/15
to mapsforge-dev
okay here is cmd 

SET EXEC="%JAVACMD%" %JAVACMD_OPTIONS% -cp "%PLEXUS_CP%" -Dapp.home="%MYAPP_HOME%" -Dclassworlds.conf="%MYAPP_HOME%\config\plexus.conf" %MAINCLASS%  %OSMOSIS_OPTIONS% %*


 i have tried to change but here i can see some special characters,

Can you please rename this cmd here 

 

Emux

unread,
Sep 4, 2015, 8:10:37 AM9/4/15
to mapsfo...@googlegroups.com
No just copy the JAVACMD_OPTIONS line in the start of the bat file.

--
Emux

Android Team

unread,
Sep 4, 2015, 8:22:01 AM9/4/15
to mapsforge-dev
again ram give me out of memory execption 

Android Team

unread,
Sep 7, 2015, 8:29:24 AM9/7/15
to mapsforge-dev

hi Emux,
  
I need to add some locations with address in openstreetmap, 
I looking for merging gpx or any kml file merge with osm  file.

Is this possible ? if yes then could you please write correct cmd, 
I have tried but didnt get proper cmd 

Ludwig

unread,
Sep 7, 2015, 8:35:12 AM9/7/15
to mapsfo...@googlegroups.com

We do not have any such tools, but osmosis allows multiple data sources (with the merge directive) and with a bit of XML processing both Kml and gpx can be converted to OSM format (assign some OSM ids outside the OSM range)

--
You received this message because you are subscribed to the Google Groups "mapsforge-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mapsforge-de...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/mapsforge-dev/d59c1f1e-0582-49e1-8c75-0358b9764622%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Android Team

unread,
Sep 7, 2015, 10:02:39 AM9/7/15
to mapsforge-dev
Hi sir,

     I have tried by this cmd to merge osm and kml file

     osmosis --rx Mysure.kml --rx data.osm --m --wx merged.osm  type=hd

     but it not work,

 

Ludwig

unread,
Sep 7, 2015, 10:25:11 AM9/7/15
to mapsfo...@googlegroups.com
osmosis cannot read kml files, you have to transform it first into osm format. 

Best search the OSM sites and mailing lists for solutions.

Ludwig

--
You received this message because you are subscribed to the Google Groups "mapsforge-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mapsforge-de...@googlegroups.com.

Emux

unread,
Sep 7, 2015, 12:54:32 PM9/7/15
to mapsfo...@googlegroups.com
On 07/09/2015 05:25 μμ, Ludwig wrote:
Best search the OSM sites and mailing lists for solutions.

Also take a look at Osmosis documentation:
http://wiki.openstreetmap.org/wiki/Osmosis

--
Emux

Android Team

unread,
Sep 8, 2015, 5:50:18 AM9/8/15
to mapsforge-dev
Hi Sir ,
 
Merging of two .osm files cmd is not working

   osmosis --rx 1.osm --rx 2.osm --merge --wx merged.osm

  Please confirm is this correct ?

  I have check this from official site

Android Team

unread,
Sep 8, 2015, 6:21:43 AM9/8/15
to mapsforge-dev
Sir, Can we merge two osm files with the basis of lat lng not with things like "node id", "version" and "timestamp" ?

Emux

unread,
Sep 8, 2015, 6:38:59 AM9/8/15
to mapsfo...@googlegroups.com
As Ludwig mentioned above, for OSM (not Mapsforge) related questions, you'll find more answers in their forums or searching in the web or documentation.

--
Emux

Ludwig

unread,
Sep 8, 2015, 6:40:54 AM9/8/15
to mapsfo...@googlegroups.com
  • IIRC osmosis requires correct OSM data, so it will complain if node ids, timestamp etc are missing, but you can just make them up (and add them to the data).
  • The merge command simply uses both sources as input, there is no intelligent merging or duplicate elimination.
  • Depending on your data, you might need a --sort operation first
As I said before (and as Emux is just reiterating), this is osm osmosis related, not mapsforge related. mapsforge requires OSM formatted data as input. 

Ludwig




On 8 September 2015 at 18:21, Android Team <test.b...@gmail.com> wrote:
Sir, Can we merge two osm files with the basis of lat lng not with things like "node id", "version" and "timestamp" ?

--
You received this message because you are subscribed to the Google Groups "mapsforge-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mapsforge-de...@googlegroups.com.

Android Team

unread,
Sep 8, 2015, 6:56:52 AM9/8/15
to mapsforge-dev

Thanku so much for answer Ludwig, i'll check as you guide.
    And sorry Emux , actually i'm stuck here, so i need help  

 

Android Team

unread,
Sep 10, 2015, 3:58:03 AM9/10/15
to mapsforge-dev
Hi everybody, i'm in confusion 

  Osm by mapsforge we are not able to fetching  some of location, we can see in  on website but not able to see in app,
  Please check and guide me


I have used also 18 zoom level but not able to see in app and osm file contain that location 

see in screenshot of app.
Its 17 Zoom level but when i do 18 it not fetching titles.
So can you please suggest me something that could be useful for me.

Thanks

Screenshot_2015-09-10-13-21-16.png

Emux

unread,
Sep 10, 2015, 4:04:49 AM9/10/15
to mapsfo...@googlegroups.com
What appears at the map view depends on two factors:

- What we take from the OSM and put in the map file (and from which zoom) via the tag-mapping xml
(read more here)

- What we set to render from the map via the render theme
(read more here)

--
Emux
Reply all
Reply to author
Forward
0 new messages