This object is in archive!
Getting error when using my own .map file
Not a Problem
I have created a .map file and when I put it in the location /mnt/sdcard/Locus/mapsVector i am getting and error:
Problem with File `mymap.map`!
FileOpenResult [success=false, errorMessage=invalid magic byte: # Map file created f]
I have tried a map that I downloaded from locusvectormaps "new_york.osm.map" and this .map file does work.
Any ideas?
hi nick
can you load your map with an other app?
eg
https://code.google.com/p/mapsforge/d...
hi nick
can you load your map with an other app?
eg
https://code.google.com/p/mapsforge/d...
I can try. Let me try.
I can try. Let me try.
I tried to load with the app "AdvancedMapViewer" and this is what I get:
Error:
The selected file is invalid.
invalid magic byte: # Map file created f
Any ideas?
I tried to load with the app "AdvancedMapViewer" and this is what I get:
Error:
The selected file is invalid.
invalid magic byte: # Map file created f
Any ideas?
Hey gynta,
If I have a the map I want in a .shp file or .eml file can I convert that to a .map file to use with locus?
Hey gynta,
If I have a the map I want in a .shp file or .eml file can I convert that to a .map file to use with locus?
i meant to say .kml not .eml.
i meant to say .kml not .eml.
check this method ... http://docs.locusmap.eu/doku.php/manu...
should help
check this method ... http://docs.locusmap.eu/doku.php/manu...
should help
Thanks. I am having some trouble
Thanks. I am having some trouble
This is the point I am at right now. I used merkaartor and opened the .shp file I want to convert and I exported it to test.osm.
Now I am a little lost.
I need to do something like the following right:
osmosis.bat --read-xml test.osm --mapfile-writer file=test.osm.map
This is the point I am at right now. I used merkaartor and opened the .shp file I want to convert and I exported it to test.osm.
Now I am a little lost.
I need to do something like the following right:
osmosis.bat --read-xml test.osm --mapfile-writer file=test.osm.map
I am getting errors all over:
C:Program Files (x86)osmosisbin>osmosis.bat --read-xml file=test.osm --mapfil
e-writer file=test.osm.map
Jun 17, 2013 11:56:08 AM org.openstreetmap.osmosis.core.Osmosis run
INFO: Osmosis Version 0.41
Jun 17, 2013 11:56:08 AM org.openstreetmap.osmosis.core.Osmosis run
INFO: Preparing pipeline.
Jun 17, 2013 11:56:08 AM org.mapsforge.map.writer.osmosis.MapFileWriterTask
INFO: mapfile-writer version: mapsforge-map-writer-0.3.0
Jun 17, 2013 11:56:08 AM org.mapsforge.map.writer.osmosis.MapFileWriterTask
INFO: mapfile format specification version: 3
Jun 17, 2013 11:56:08 AM org.openstreetmap.osmosis.core.Osmosis run
INFO: Launching pipeline execution.
Jun 17, 2013 11:56:08 AM org.openstreetmap.osmosis.core.Osmosis run
INFO: Pipeline executing, waiting for completion.
Jun 17, 2013 11:56:08 AM org.openstreetmap.osmosis.core.pipeline.common.ActiveTa
skManager waitForCompletion
SEVERE: Thread for task 1-read-xml failed
java.lang.AbstractMethodError: org.mapsforge.map.writer.osmosis.MapFileWriterTas
k.initialize(Ljava/util/Map;)V
at org.openstreetmap.osmosis.xml.v0_6.XmlReader.run(XmlReader.java:95)
at java.lang.Thread.run(Unknown Source)
Jun 17, 2013 11:56:08 AM 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:329)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.jav
a:239)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(La
uncher.java:409)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:
352)
at org.codehaus.classworlds.Launcher.main(Launcher.java:47)
I am getting errors all over:
C:Program Files (x86)osmosisbin>osmosis.bat --read-xml file=test.osm --mapfil
e-writer file=test.osm.map
Jun 17, 2013 11:56:08 AM org.openstreetmap.osmosis.core.Osmosis run
INFO: Osmosis Version 0.41
Jun 17, 2013 11:56:08 AM org.openstreetmap.osmosis.core.Osmosis run
INFO: Preparing pipeline.
Jun 17, 2013 11:56:08 AM org.mapsforge.map.writer.osmosis.MapFileWriterTask
INFO: mapfile-writer version: mapsforge-map-writer-0.3.0
Jun 17, 2013 11:56:08 AM org.mapsforge.map.writer.osmosis.MapFileWriterTask
INFO: mapfile format specification version: 3
Jun 17, 2013 11:56:08 AM org.openstreetmap.osmosis.core.Osmosis run
INFO: Launching pipeline execution.
Jun 17, 2013 11:56:08 AM org.openstreetmap.osmosis.core.Osmosis run
INFO: Pipeline executing, waiting for completion.
Jun 17, 2013 11:56:08 AM org.openstreetmap.osmosis.core.pipeline.common.ActiveTa
skManager waitForCompletion
SEVERE: Thread for task 1-read-xml failed
java.lang.AbstractMethodError: org.mapsforge.map.writer.osmosis.MapFileWriterTas
k.initialize(Ljava/util/Map;)V
at org.openstreetmap.osmosis.xml.v0_6.XmlReader.run(XmlReader.java:95)
at java.lang.Thread.run(Unknown Source)
Jun 17, 2013 11:56:08 AM 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:329)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.jav
a:239)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(La
uncher.java:409)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:
352)
at org.codehaus.classworlds.Launcher.main(Launcher.java:47)
Any ideas?
Any ideas?
I think I had the same error. I lost my solution now, but I believe it was occurring because an input file was not compatible with the parameter. I think it was just a matter of changing the parameter to the right one.
I think I had the same error. I lost my solution now, but I believe it was occurring because an input file was not compatible with the parameter. I think it was just a matter of changing the parameter to the right one.
did you need to reference an xml file at all when issuing the osmosis cmd?
did you need to reference an xml file at all when issuing the osmosis cmd?
When I try and follow the method in:
http://docs.locusmap.eu/doku.php/manu...
I am getting the following:
osmosis.bat --read-xml test.osm --mapfile-wri
ter file=test.osm.map type=ram tag-conf-file=tag-mapping-shp.xml bbox-enlargemen
t=0
Jun 18, 2013 10:36:27 AM org.openstreetmap.osmosis.core.Osmosis run
INFO: Osmosis Version 0.41
Jun 18, 2013 10:36:27 AM org.openstreetmap.osmosis.core.Osmosis run
INFO: Preparing pipeline.
[Fatal Error] :2:6: The processing instruction target matching "[xX][mM][lL]" is
not allowed.
Jun 18, 2013 10:36:27 AM org.mapsforge.map.writer.OSMTagMapping
SEVERE:
** Parsing error, line 2, uri null
Jun 18, 2013 10:36:27 AM org.openstreetmap.osmosis.core.Osmosis main
SEVERE: Execution aborted.
java.lang.IllegalStateException: org.xml.sax.SAXParseException; lineNumber: 2; c
olumnNumber: 6; The processing instruction target matching "[xX][mM][lL]" is not
allowed.
at org.mapsforge.map.writer.OSMTagMapping.(OSMTagMapping.java:280)
at org.mapsforge.map.writer.OSMTagMapping.getInstance(OSMTagMapping.java
:111)
at org.mapsforge.map.writer.model.MapWriterConfiguration.loadTagMappingF
ile(MapWriterConfiguration.java:389)
at org.mapsforge.map.writer.osmosis.MapFileWriterFactory.createTaskManag
erImpl(MapFileWriterFactory.java:54)
at org.openstreetmap.osmosis.core.pipeline.common.TaskManagerFactory.cre
ateTaskManager(TaskManagerFactory.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:329)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.jav
a:239)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(La
uncher.java:409)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:
352)
at org.codehaus.classworlds.Launcher.main(Launcher.java:47)
Caused by: org.xml.sax.SAXParseException; lineNumber: 2; columnNumber: 6; The pr
ocessing instruction target matching "[xX][mM][lL]" is not allowed.
at org.apache.xerces.parsers.DOMParser.parse(Unknown Source)
at org.apache.xerces.jaxp.DocumentBuilderImpl.parse(Unknown Source)
at javax.xml.parsers.DocumentBuilder.parse(Unknown Source)
at org.mapsforge.map.writer.OSMTagMapping.(OSMTagMapping.java:122)
... 17 more
When I try and follow the method in:
http://docs.locusmap.eu/doku.php/manu...
I am getting the following:
osmosis.bat --read-xml test.osm --mapfile-wri
ter file=test.osm.map type=ram tag-conf-file=tag-mapping-shp.xml bbox-enlargemen
t=0
Jun 18, 2013 10:36:27 AM org.openstreetmap.osmosis.core.Osmosis run
INFO: Osmosis Version 0.41
Jun 18, 2013 10:36:27 AM org.openstreetmap.osmosis.core.Osmosis run
INFO: Preparing pipeline.
[Fatal Error] :2:6: The processing instruction target matching "[xX][mM][lL]" is
not allowed.
Jun 18, 2013 10:36:27 AM org.mapsforge.map.writer.OSMTagMapping
SEVERE:
** Parsing error, line 2, uri null
Jun 18, 2013 10:36:27 AM org.openstreetmap.osmosis.core.Osmosis main
SEVERE: Execution aborted.
java.lang.IllegalStateException: org.xml.sax.SAXParseException; lineNumber: 2; c
olumnNumber: 6; The processing instruction target matching "[xX][mM][lL]" is not
allowed.
at org.mapsforge.map.writer.OSMTagMapping.(OSMTagMapping.java:280)
at org.mapsforge.map.writer.OSMTagMapping.getInstance(OSMTagMapping.java
:111)
at org.mapsforge.map.writer.model.MapWriterConfiguration.loadTagMappingF
ile(MapWriterConfiguration.java:389)
at org.mapsforge.map.writer.osmosis.MapFileWriterFactory.createTaskManag
erImpl(MapFileWriterFactory.java:54)
at org.openstreetmap.osmosis.core.pipeline.common.TaskManagerFactory.cre
ateTaskManager(TaskManagerFactory.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:329)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.jav
a:239)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(La
uncher.java:409)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:
352)
at org.codehaus.classworlds.Launcher.main(Launcher.java:47)
Caused by: org.xml.sax.SAXParseException; lineNumber: 2; columnNumber: 6; The pr
ocessing instruction target matching "[xX][mM][lL]" is not allowed.
at org.apache.xerces.parsers.DOMParser.parse(Unknown Source)
at org.apache.xerces.jaxp.DocumentBuilderImpl.parse(Unknown Source)
at javax.xml.parsers.DocumentBuilder.parse(Unknown Source)
at org.mapsforge.map.writer.OSMTagMapping.(OSMTagMapping.java:122)
... 17 more
Any help would be great.
Any help would be great.
Anyone have any ideas?
Anyone have any ideas?
Hi Nick,
Please check your tag-mapping xml file (tag-mapping-shp.xml). It seems that there is some issue on first or second line of tour definition XML file. Maybe some empty lines or non-printed characters.
Hi Nick,
Please check your tag-mapping xml file (tag-mapping-shp.xml). It seems that there is some issue on first or second line of tour definition XML file. Maybe some empty lines or non-printed characters.
What does the .xml file have to look like ?
What does the .xml file have to look like ?
Can you provide a sample?
Can you provide a sample?
Sample XML is available on the mentioned manual page http://docs.locusmap.eu/doku.php/manu...
There is a direct link for downloading: http://docs.locusmap.eu/doku.php/manu...
Sample XML is available on the mentioned manual page http://docs.locusmap.eu/doku.php/manu...
There is a direct link for downloading: http://docs.locusmap.eu/doku.php/manu...
I tried following that tutorial with those exact files and I had no success. Any ideas?
I tried following that tutorial with those exact files and I had no success. Any ideas?
Hi Nick,
Could be more specific, please? Can you also provide your result (generated map file) or maybe also the files needed for generation?
Thank you
Hi Nick,
Could be more specific, please? Can you also provide your result (generated map file) or maybe also the files needed for generation?
Thank you
I am starting to explore gis and am still kind of a noob, so bear with me. I will try to explain what I want to do the best I can. I need to provide the ability to use the GIS Maps Offline, on a Nexus 7 Tablet. Basically, I would have a base map, and in addition to the base map I would need to have specific layers added to it, for example Village Fire Hydrants, Village Water Manholes, Village Houses, Village Streets, Village Boundary, Village Water Mains, Village Water Pumps, etc.... I have .shp files for each of these layers. I think I would probably get the best performance by using .map files for offline use. Do you think that is the best way? Also I would like to be able to click/touch a house for example on the map and view the address and even add like notes or a photo for that specific location and have it saved to a database or something. Would this be possible using locus? The map i would like to use as a base map is new_york.map. I downloaded this from http://vectormaps4locus.eu/America-Un....
I downloaded the New York vector map from there. This map works very well on locus, but I can not figure out how to get my other layers to work as well. Any help would be greatly appreciated. Thanks.
I am starting to explore gis and am still kind of a noob, so bear with me. I will try to explain what I want to do the best I can. I need to provide the ability to use the GIS Maps Offline, on a Nexus 7 Tablet. Basically, I would have a base map, and in addition to the base map I would need to have specific layers added to it, for example Village Fire Hydrants, Village Water Manholes, Village Houses, Village Streets, Village Boundary, Village Water Mains, Village Water Pumps, etc.... I have .shp files for each of these layers. I think I would probably get the best performance by using .map files for offline use. Do you think that is the best way? Also I would like to be able to click/touch a house for example on the map and view the address and even add like notes or a photo for that specific location and have it saved to a database or something. Would this be possible using locus? The map i would like to use as a base map is new_york.map. I downloaded this from http://vectormaps4locus.eu/America-Un....
I downloaded the New York vector map from there. This map works very well on locus, but I can not figure out how to get my other layers to work as well. Any help would be greatly appreciated. Thanks.
Hello Nick,
Don’t worry we’ll try to help you.
So ...when you convert your SHP file into vector *.map format then you lost the ability to select point or get some metadata for converted points. So converting SHP files to the *.map is not good solution in your case.
It seems that your SHP files contain mainly data as points. From my point of view could be better to convert SHP file into KML files. If you import KML into Locus, you will be able to touch the point and see parametric data related with these points. Of course it depends how complex are your SHP file.
There is small tutorial how to convert small SHP file into KML file http://docs.locusmap.eu/doku.php/manu...
After that you can import KML file using standard Locus import function. http://docs.locusmap.eu/doku.php/manu...
What do you think?
Hello Nick,
Don’t worry we’ll try to help you.
So ...when you convert your SHP file into vector *.map format then you lost the ability to select point or get some metadata for converted points. So converting SHP files to the *.map is not good solution in your case.
It seems that your SHP files contain mainly data as points. From my point of view could be better to convert SHP file into KML files. If you import KML into Locus, you will be able to touch the point and see parametric data related with these points. Of course it depends how complex are your SHP file.
There is small tutorial how to convert small SHP file into KML file http://docs.locusmap.eu/doku.php/manu...
After that you can import KML file using standard Locus import function. http://docs.locusmap.eu/doku.php/manu...
What do you think?
Can KML files be brought in as layers though? Or could I use a .kml file as a base map and then use .shp files for layers?
Can KML files be brought in as layers though? Or could I use a .kml file as a base map and then use .shp files for layers?
I have tried loading a kml file into locus but it seems like the performance is not as good and is slower and not as responsive.
I have tried loading a kml file into locus but it seems like the performance is not as good and is slower and not as responsive.
that`s correct in case you have more lines/points. This is place where some more optimization is for sure needed ...
that`s correct in case you have more lines/points. This is place where some more optimization is for sure needed ...
Is there anyway to use layers in locus?
Is there anyway to use layers in locus?
If I provide you with a .shp file can you please try and convert it to .map?
I have not had any success in converting with osmosis. Maybe I am making an error somewhere.
If I provide you with a .shp file can you please try and convert it to .map?
I have not had any success in converting with osmosis. Maybe I am making an error somewhere.
I tried making the kml...But when I try to import it into Locus, I get the following error:
Problem with file "Locus.kml"
I tried making the kml...But when I try to import it into Locus, I get the following error:
Problem with file "Locus.kml"
Is there anyway to attach a file here so you can check it out?
Is there anyway to attach a file here so you can check it out?
Any help with this would be great.
Any help with this would be great.
sorry nick
There are a lot of free web/ftp space, free upload services, free clouds,...
Feel free to search via google. Then upload your files and share it
sorry nick
There are a lot of free web/ftp space, free upload services, free clouds,...
Feel free to search via google. Then upload your files and share it
Ok. If I can get it uploaded in a location for you .. Could you possible help me out?
Ok. If I can get it uploaded in a location for you .. Could you possible help me out?
Hello Nick,
Some tips from my site:
- As Menion wrote Locus is limited with handling of complex KML files. Is it possible to split SHP files into smaller parts before you convert them into KML files?
- Problem with file "Locus.kml” Locus supports almost all KML features. Please try to open problematic KML file in Google Earth and check if this file is opened properly.
- Unfortunately there is no way how to attach file to this topic. This is limitation of GetSatisfaction service.
- My favorite service for sharing files is http://sharegadget.com/ You can attach problematic KML files – I’ll check it.
Hello Nick,
Some tips from my site:
- As Menion wrote Locus is limited with handling of complex KML files. Is it possible to split SHP files into smaller parts before you convert them into KML files?
- Problem with file "Locus.kml” Locus supports almost all KML features. Please try to open problematic KML file in Google Earth and check if this file is opened properly.
- Unfortunately there is no way how to attach file to this topic. This is limitation of GetSatisfaction service.
- My favorite service for sharing files is http://sharegadget.com/ You can attach problematic KML files – I’ll check it.
Hey Petr I have uploaded a .shp file in a zip at the following location using the service you recommended:
http://mysharegadget.com/786008826
Could you please let me know if you are able to convert this successfully to a .map.
Thanks.
Hey Petr I have uploaded a .shp file in a zip at the following location using the service you recommended:
http://mysharegadget.com/786008826
Could you please let me know if you are able to convert this successfully to a .map.
Thanks.
Hi Nick,
Is it possible to convert your SHP into map file. Converted file with XML definition files and style is placed in file: http://mysharegadget.com/162518213
COnverted map as overlay
Hi Nick,
Is it possible to convert your SHP into map file. Converted file with XML definition files and style is placed in file: http://mysharegadget.com/162518213
COnverted map as overlay
I have tried to convert to .map but was not successful. So you were able to ? I don`t understand why I was not able to. Could you explain what you needed to do?
I have tried to convert to .map but was not successful. So you were able to ? I don`t understand why I was not able to. Could you explain what you needed to do?
How did you convert it?
How did you convert it?
When I try to add the .map file you provided to locus as an overlay I get a message saying:
"One vector file at a time or something like that."
When I try to add the .map file you provided to locus as an overlay I get a message saying:
"One vector file at a time or something like that."
Any ideas?
Any ideas?
Locus is not able to set two vector maps as overlay. Please turn-off previous vector map which you use for overlay (Menu > More > Map overlay). Then select as base map arbitrary online or personal map. Run again map overlay function and select generated vector map.
Locus is not able to set two vector maps as overlay. Please turn-off previous vector map which you use for overlay (Menu > More > Map overlay). Then select as base map arbitrary online or personal map. Run again map overlay function and select generated vector map.
Hello Nick,
As you could see, is it possible to convert your SHP file into vector *.map format. So issue is not related with Locus.
If you still have some problem with generating own vector map, please visit official Mapsforge community site:
https://groups.google.com/forum/#!for...
On this forum you can directly contact developer of Mapsforge library and map
writer plugin for osmosis. I hope that they will be able to find out more about your issue.
Regards
Petr
Hello Nick,
As you could see, is it possible to convert your SHP file into vector *.map format. So issue is not related with Locus.
If you still have some problem with generating own vector map, please visit official Mapsforge community site:
https://groups.google.com/forum/#!for...
On this forum you can directly contact developer of Mapsforge library and map
writer plugin for osmosis. I hope that they will be able to find out more about your issue.
Regards
Petr
Can I use a vector map as a base map?
Can I use a vector map as a base map?
Thank you for all the help Petr.
Thank you for all the help Petr.
Yes, you can.
Yes, you can.
first...i cant update my locus pro...after that...i uninstalled it....then i try installed it again...but it appear the same error...
can u give me solution about this matter?
first...i cant update my locus pro...after that...i uninstalled it....then i try installed it again...but it appear the same error...
can u give me solution about this matter?
Replies have been locked on this page!