Blank map after conversion of shapefile to .map (mapsforge)

122 просмотра
Перейти к первому непрочитанному сообщению

Wagner de Carvalho Ferreira

не прочитано,
25 сент. 2016 г., 16:03:4025.09.2016
– mapsforge-dev
Hi Guys,

I am currently developing an android app with mapsforge. And I need to display a shapefile with mapsforge.
I know that there were some post's about this subject here in this forum. However I've just started
work with all this (android and mapsforge). Sorry if this is a dumb question.
However I couldn't be able to figure it out what I am doing wrong.
I'm getting a blank map after converting .shp to .map

I downloaded brazil.map from http://download.geofabrik.de/south-america.html and follow the steps of
this link: https://groups.google.com/forum/#!topic/mapsforge-dev/WCpBoO1tA8M.

I'm using Merkaartor version 0.18.2 and the latest version of osmosis (0.45).
file:///home/wagner/maps/bb.map

That's the command that I used to do the conversion.
bin/osmosis --rx file=/home/wagner/maps/brazil.osm --sort --mw file=/home/wagner/maps/bb.map bbox=-23.805,-47.065,-23.383,-46.077 map-start-zoom=15 tag-conf-file=/home/wagner/maps/tagmap.xml

Could anyone please help me figure it out what am I doing wrong ?

Wagner de Carvalho Ferreira

не прочитано,
25 сент. 2016 г., 16:15:2325.09.2016
– mapsforge-dev
bb.map
tagmap.xml

Wagner

не прочитано,
25 сент. 2016 г., 16:25:0625.09.2016
– mapsfo...@googlegroups.com
It's worth mentioning that to generate 'brazil.osm'  file, I imported 'brazil_location.shp' (http://download.geofabrik.de/) and using Merkaartor I exported to .osm. After that, using a text editor, I went to the end of the file and got rid of the tag: <bound box="-0.000305,-0.000662,0.000047,-0.000259" origin="http://www.openstreetmap.org/api/0.6"/>

-- Wagner

--
You received this message because you are subscribed to a topic in the Google Groups "mapsforge-dev" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/mapsforge-dev/YW0ZvKLcEv4/unsubscribe.
To unsubscribe from this group and all its topics, send an email to mapsforge-dev+unsubscribe@googlegroups.com.
To post to this group, send email to mapsfo...@googlegroups.com.
Visit this group at https://groups.google.com/group/mapsforge-dev.
To view this discussion on the web visit https://groups.google.com/d/msgid/mapsforge-dev/b1d4d8dd-0dcd-487a-aa00-fe0e4524852c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Emux

не прочитано,
26 сент. 2016 г., 03:05:0726.09.2016
– mapsfo...@googlegroups.com
You want to make a map file using osm / pbf from Geofabrik?

You don't need any shp files for that, those osm / pbf files already contain all the data.
Also it's recommended to use the compressed pbf files.

You need to take care the tag-mapping (if you use a custom one) to be in match with the render theme used later. i.e. the tags used in both should be similar and existent

See the default tag-mapping and theme as guides.

Also be careful with the bounding box you use, it's in degrees with the form: minLat,minLon,maxLat,maxLon.

e.g. in your tag-mapping you have only nodes (not ways / areas) and do those exist in the render theme?

--
Emux

Wagner

не прочитано,
26 сент. 2016 г., 11:51:2126.09.2016
– mapsfo...@googlegroups.com
Hi Emux,

First of all I'd like to thank you for taking the time to answer my post.

Emux,

I got a little confused now with your answer.

So ... just to clarify, I am developing an android app for agricultural area, and one of the scopes of this project is to display a shapefile in my app using mapsforge.

So in order to do that, I downloaded some shapefiles from different sources like: http://download.geofabrik.de/, https://market.trimbledata.com and etc. Then I've been using Merkaartor + osmosis to convert it to .map. I've been testing shapefiles from different sources. But so far without success.

Like I said earlier I was following the instructions from this post: https://groups.google.com/forum/#!topic/mapsforge-dev/WCpBoO1tA8M, to convert .shp to .map.

I don't know if I understood what you said, but I think you said that the .osm file would suffice for what I am trying to do. Is that correct ? That's why I got a little confused.

So .. Let's start all over. I think I am doing all wrong here. Sorry about my ignorance in this subject !

What should I need to do in order to display a shapefile in my android app ? Could you please guide me in this process ?

I am using mapsforge, because my app needs to use offline maps, due to bad celular coverage in the agricultural area here in Brazil.

As far as I know Mapsforge use a .map file, so I did some research and I've learned that what I needed to do, was to get a shapefile from the region that I want to display and convert it to .map.  At least that what was done by some people that wanted to convert .shp to .map.
So, this path that I am following is correct ? or should I do that differently ?

Thanks in advance,

Wagner

-- Wagner

--
You received this message because you are subscribed to a topic in the Google Groups "mapsforge-dev" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/mapsforge-dev/YW0ZvKLcEv4/unsubscribe.
To unsubscribe from this group and all its topics, send an email to mapsforge-dev+unsubscribe@googlegroups.com.
To post to this group, send email to mapsfo...@googlegroups.com.
Visit this group at https://groups.google.com/group/mapsforge-dev.

Emux

не прочитано,
26 сент. 2016 г., 14:05:5626.09.2016
– mapsfo...@googlegroups.com
No need for sorry, we'll here to help. :)

(I thought that you want to render only OSM data from Geofabrik, that's why I said that you could just use their osm/pbf files for convenience)

Ok you want to include in the map also custom data from shp files, that's a little different.

As you already found, Mapsforge map-writer is a plugin for Osmosis tool which uses for input mainly osm/pbf files.
So you need to convert any other format (e.g. shp) in osm/pbf, see here a list of more such tools.

The path you follow is indeed correct. Most important thing you need to take care is the element tags.

For any element entering the map file, there are tags that describe it.
Those tags must exist in the tag-mapping AND in the render theme you'll use next.
And if they are not regular OSM tags, but your custom ones, you have to add them.

Let's take for example the declaration in tag-mapping for place=city.
This rule exists also in render theme describing its rendering.

e.g. if I use the following command
osmosis --rb file=brazil-latest.osm.pbf --mw file=brazil.map bbox=-23.805,-47.065,-23.383,-46.077
then a filled brazil.map of 16.6MB is built (see screenshot).

The bounding box seems right inside Brazil, I don't know if the conversion of shp files was right.
Have you opened the .osm file with Josm?

--
Emux
brazil.png

Wagner

не прочитано,
27 сент. 2016 г., 13:01:5627.09.2016
– mapsfo...@googlegroups.com
Hello Emux,

I tried to run the same command in my machine. However I got the error below.

wagner@wagner-pc:~/osmosis$ bin/osmosis --rb file=/home/wagner/maps/brazil-latest.osm.pbf --mw file=/home/wagner/maps/brazil.map bbox=-23.805,-47.065,-23.383,-46.077
set 27, 2016 1:26:45 PM org.openstreetmap.osmosis.core.Osmosis run
INFO: Osmosis Version 0.45
set 27, 2016 1:26:46 PM org.openstreetmap.osmosis.core.Osmosis run
INFO: Preparing pipeline.
set 27, 2016 1:26:46 PM org.mapsforge.map.writer.osmosis.MapFileWriterTask <init>
INFO: mapfile-writer version: mapsforge-map-writer-0.6.1
set 27, 2016 1:26:46 PM org.mapsforge.map.writer.osmosis.MapFileWriterTask <init>
INFO: mapfile format specification version: 3
set 27, 2016 1:26:46 PM org.openstreetmap.osmosis.core.Osmosis run
INFO: Launching pipeline execution.
set 27, 2016 1:26:46 PM org.openstreetmap.osmosis.core.Osmosis run
INFO: Pipeline executing, waiting for completion.
set 27, 2016 1:26:47 PM org.mapsforge.map.writer.osmosis.MapFileWriterTask process
INFO: start reading data...
set 27, 2016 1:27:15 PM org.openstreetmap.osmosis.core.pipeline.common.ActiveTaskManager waitForCompletion
SEVERE: Thread for task 1-rb failed
java.lang.OutOfMemoryError: Java heap space
    at gnu.trove.map.hash.TLongObjectHashMap.rehash(TLongObjectHashMap.java:157)
    at gnu.trove.impl.hash.THash.postInsertHook(THash.java:388)
    at gnu.trove.map.hash.TLongObjectHashMap.doPut(TLongObjectHashMap.java:248)
    at gnu.trove.map.hash.TLongObjectHashMap.put(TLongObjectHashMap.java:222)
    at org.mapsforge.map.writer.RAMTileBasedDataProcessor.addNode(RAMTileBasedDataProcessor.java:81)
    at org.mapsforge.map.writer.osmosis.MapFileWriterTask.process(MapFileWriterTask.java:160)
    at crosby.binary.osmosis.OsmosisBinaryParser.parseDense(OsmosisBinaryParser.java:138)
    at org.openstreetmap.osmosis.osmbinary.BinaryParser.parse(BinaryParser.java:124)
    at org.openstreetmap.osmosis.osmbinary.BinaryParser.handleBlock(BinaryParser.java:68)
    at org.openstreetmap.osmosis.osmbinary.file.FileBlock.process(FileBlock.java:135)
    at org.openstreetmap.osmosis.osmbinary.file.BlockInputStream.process(BlockInputStream.java:34)
    at crosby.binary.osmosis.OsmosisReader.run(OsmosisReader.java:45)
    at java.lang.Thread.run(Thread.java:745)

set 27, 2016 1:27:15 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.waitForCompletion(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(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launchStandard(Launcher.java:330)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:238)
    at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
    at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
    at org.codehaus.classworlds.Launcher.main(Launcher.java:47)


It seems my JVM is running out of memory. Is there something that I could do to have the same result that you had ?


The output of the command osmosis --rb file=brazil-latest.osm.pbf --mw file=brazil.map bbox=-23.805,-47.065,-23.383,-46.077 is a shapefile ?

Just to give you an example, follow attached an example of shapefile imported into googlemaps. That's what I am trying to do in my android app.


-- Wagner

--
You received this message because you are subscribed to a topic in the Google Groups "mapsforge-dev" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/mapsforge-dev/YW0ZvKLcEv4/unsubscribe.
To unsubscribe from this group and all its topics, send an email to mapsforge-dev+unsubscribe@googlegroups.com.
To post to this group, send email to mapsfo...@googlegroups.com.
Visit this group at https://groups.google.com/group/mapsforge-dev.
map_01.jpg
map_02.jpg
machine.png

Emux

не прочитано,
27 сент. 2016 г., 14:12:0427.09.2016
– mapsfo...@googlegroups.com
Osmosis needs more memory, you can do that by editing the "osmosis" or "osmosis.bat" in "osmosis/bin" folder and add on top:

JAVACMD_OPTIONS="-Xmx6g"

The -Xmx value should be based on your available RAM, try above and put smaller if problem.

Another thing to try is to use the type=hd parameter in command line for map-writer (see here).
That will use also the HD for the map creation but the process could take a lot longer.

The output of the command is a Mapsforge vector map file.

You will be able to include your data in a map file, see previous post for tag details.

--
Emux

Wagner

не прочитано,
27 сент. 2016 г., 16:18:3727.09.2016
– mapsfo...@googlegroups.com
Hello Emux,

You were completely right. I do need more memory.
I won't be able to run that command with only 8Gb of RAM. However I found a smaller map (https://mapzen.com/data/metro-extracts/metro/sao-paulo_brazil/), to try that command. It's a map of Sao paulo.

Command used:
bin/osmosis --rb file=/home/wagner/maps/sao-paulo_brazil.osm.pbf --mw file=/home/wagner/maps/saopaulo.map bbox=-24.046,-47.120,-23.373,-46.176

I also downloaded the sao-paulo_brazil.osm file, that way I could learn what tags is being used.
So in order to do that I grepped the .osm file.
grep "<tag k=" sao-paulo_brazil.osm | sort | uniq | >> tags.txt

The file tags.txt is attached to this e-mail.

So ... analysing this tag files, I've learned that there are a bunch of tags. So suppose that I want to display a shapefile of a landuse of Sao Paulo.

Below is all the tag related to landuse, that I found in sao-paulo_brazil.osm file
        <tag k="landuse" v="allotments"/>
        <tag k="landuse" v="basin"/>
        <tag k="landuse" v="brownfield"/>
        <tag k="landuse" v="cemetery"/>
        <tag k="landuse" v="commercial"/>
        <tag k="landuse" v="condominium"/>
        <tag k="landuse" v="conservation"/>
        <tag k="landuse" v="construction"/>
        <tag k="landuse" v="events"/>
        <tag k="landuse" v="farm"/>
        <tag k="landuse" v="farmland"/>
        <tag k="landuse" v="farmyard"/>
        <tag k="landuse" v="forest"/>
        <tag k="landuse" v="garages"/>
        <tag k="landuse" v="grass"/>
        <tag k="landuse" v="greenfield"/>
        <tag k="landuse" v="industrial"/>
        <tag k="landuse" v="landfill"/>
        <tag k="landuse" v="meadow"/>
        <tag k="landuse" v="military"/>
        <tag k="landuse" v="orchard"/>
        <tag k="landuse" v="park"/>
        <tag k="landuse" v="plant_nursery"/>
        <tag k="landuse" v="port"/>
        <tag k="landuse" v="quarry"/>
        <tag k="landuse" v="railway"/>
        <tag k="landuse" v="recreation_ground"/>
        <tag k="landuse" v="religious"/>
        <tag k="landuse" v="reservoir"/>
        <tag k="landuse" v="residential"/>
        <tag k="landuse" v="retail"/>
        <tag k="landuse" v="trees"/>
        <tag k="landuse" v="village_green"/>
        <tag k="landuse" v="vineyard"/>
        <tag k="landuse" v="yes"/>

Comparing the tags above with the tag-mapping.xml file that you cited earlier, the tags below were missing. Then I added it in a file called tag-sp.xml.
        <tag k="landuse" v="condominium"/>
        <tag k="landuse" v="conservation"/>
        <tag k="landuse" v="events"/>
        <tag k="landuse" v="garages"/>
        <tag k="landuse" v="park"/>
        <tag k="landuse" v="plant_nursery"/>
        <tag k="landuse" v="port"/>
        <tag k="landuse" v="religious"/>
        <tag k="landuse" v="trees"/>

I don't know if this file (tag-sp.xml) is correct.  I've just edited accordingly with the original (tag-mapping.xml). I really don't know if I need to provide any other tags.

Should I edit the osmarender.xml to add those new tags that I find too ?

Another question, How shoul I do to input this new files (tag-sp.xml and osmarender.xml) in the osmosis command ?

is It via osmosis that I'm goona end up with this shapefile (landuse) ? Is it correct ?



-- Wagner

--
You received this message because you are subscribed to a topic in the Google Groups "mapsforge-dev" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/mapsforge-dev/YW0ZvKLcEv4/unsubscribe.
To unsubscribe from this group and all its topics, send an email to mapsforge-dev+unsubscribe@googlegroups.com.
To post to this group, send email to mapsfo...@googlegroups.com.
Visit this group at https://groups.google.com/group/mapsforge-dev.
saopaulo.png
tags.txt.tar.bz2
tag-sp.xml

Emux

не прочитано,
28 сент. 2016 г., 02:30:2528.09.2016
– mapsfo...@googlegroups.com
8GB is sufficient memory for various Java tasks, provided you have most of it free, i.e. close any other applications.
Java default Xmx is often small, so you can try -Xmx6g or another value first to see what happens.

And you don't need a smaller osm/pbf in order to build a smaller map file, you simply change the map-writer's bounding box parameter.

In default tag-mapping we have included the most commonly used tags, I'm sure there many others.
In order to produce a full map with extra elements you need to modify original tag-mapping, not erasing it completely and inserting only your tags. Because in that case you'll produce an empty map.

So take the original and just modify the part you need, leaving the rest file 'as is'.
Then you can feed it to the map-writer with the parameter "tag-conf-file" and your mapping file path.

Of course then you have to edit the osmarender.xml theme accordingly adding the new tags with rules for how to be rendered.

- The tag-mapping is used in map-writer to guide it what tags to include in the built map (not shp) file.
- The render theme (e.g. osmarender) is used in the application for the reader to know how to render that map.

I suggest to invest some time and study our documentation, e.g. map-writer and render themes where we describe those and many other things.

--
Emux

Wagner

не прочитано,
29 сент. 2016 г., 19:44:2529.09.2016
– mapsfo...@googlegroups.com
Hello Emux,

I haven't had the time to look into the issue related to the supposedely lack of memory that I ran into when I ran the osmosis command. Bu t I will soon.

Emux,

When I ran that command that you have exemplified in one of your previous e-mail, I got a map identical with the map that I have downloaded from here.

If I understood correctly, when I ran the osmosis command, the tag-mapping (as it is) is used by default. That's why I got a full map exactly as the map that I have downloaded from the link above.

So the tag-mapping file have all the tags to generate a full map. Correct ?

I read the documents about map-writer and rendertheme that you have mentioned, and things became a little bit more clear. However this subject is not so easy to grasp, that's why I have some many doubts yet. Once again sorry about that!

So, if I remove some tags that it's not important to my project, I'll be able to generate a map with only the data that it's important to me. Is that correct ?

However I must to figure out what are the minimum tags that a custom tag-mapping file must have, to show only data related to landuse for instace, so I don´t end up with a blank map. Is my understanding correctly so far ?

I was poking around in the tag-mapping file, and I've learned that it has two main sections (main tags), which are POIS and WAYS. Those two tags are somehow linked. I've just haven't figure out how yet.

I was trying to generate a map, with a custom tag-mapping with only landuse tags, which is by the way included in the WAYS section. I even sent this file (tag-sp.xml) to you earlier. However I end up with a blank map. That's how I fond out that I needed more than landuse tags in this file.

My question is how can I know what tags do I need to provide, to have in a simple custom tag-mapping file that can generates a map related to landuse or highway only for instance ? I know that the answer for this question could be in the links that you have mentioned earlier. But I could not understand how so far.

Thanks in advance,

Wagner

-- Wagner

--
You received this message because you are subscribed to a topic in the Google Groups "mapsforge-dev" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/mapsforge-dev/YW0ZvKLcEv4/unsubscribe.
To unsubscribe from this group and all its topics, send an email to mapsforge-dev+unsubscribe@googlegroups.com.
To post to this group, send email to mapsfo...@googlegroups.com.
Visit this group at https://groups.google.com/group/mapsforge-dev.

Wagner

не прочитано,
29 сент. 2016 г., 20:52:4629.09.2016
– mapsfo...@googlegroups.com
Emux,

Another thing that I forgot to ask you is related to those shapefiles images that I sent you earlier.

Those images are shapefiles that were imported into google maps. So we have an image (shapes) over the map (google maps). Image over image.

The way I see, If I want a map similar to the map in those images, I have to customize the tag-mapping in order to have a map with the shapes that is related to my project.

So if I want to see in my map water(oceans, sea, lakes etc), I need to customize the tag-mapping with natural tags, if want to see only highways I have to customize the tag-mapping with highway tags and so on. Is my understanding correct?

If yes using mapsforge, the map will be a little different compared to the map in those images. I mean, there won't be an image (shape) over a map (google maps) like the ones in those images that I sent you. It will be just a map with the shapes (natural, highway, landuse) that I have predefined.

I don' t know if I was able to make myself clear. But could you understand my point ?

-- Wagner

Emux

не прочитано,
30 сент. 2016 г., 02:14:0330.09.2016
– mapsfo...@googlegroups.com
On 30/09/2016 02:44 πμ, Wagner wrote:
I haven't had the time to look into the issue related to the supposedely lack of memory that I ran into when I ran the osmosis command. Bu t I will soon.
I suggest to look at it, using the memory is much faster to build maps.
So the tag-mapping file have all the tags to generate a full map. Correct ?
Yes, if don't specify a tag-mapping, then the default included one is used.
So, if I remove some tags that it's not important to my project, I'll be able to generate a map with only the data that it's important to me. Is that correct ? However I must to figure out what are the minimum tags that a custom tag-mapping file must have, to show only data related to landuse for instace, so I don´t end up with a blank map. Is my understanding correctly so far ?
Both correctly.
My question is how can I know what tags do I need to provide, to have in a simple custom tag-mapping file that can generates a map related to landuse or highway only for instance ? I know that the answer for this question could be in the links that you have mentioned earlier. But I could not understand how so far.
There are many landuse and highway tags in OSM and each area usually can have some (or all) of them. So need searching them and "trial and error" for creating a minimal map. Or go the other way, keep the map file 'as is' and start commenting rules in render theme, seeing the result on screen.
-- Emux

Emux

не прочитано,
30 сент. 2016 г., 02:31:3030.09.2016
– mapsfo...@googlegroups.com
On 30/09/2016 03:52 πμ, Wagner wrote:
So if I want to see in my map water(oceans, sea, lakes etc), I need to customize the tag-mapping with natural tags, if want to see only highways I have to customize the tag-mapping with highway tags and so on. Is my understanding correct?
There is no need to re-create a map (i.e. modifying tag-mapping) for hiding existing elements, unless you care for map file size. You can comment the rules in the render theme instead. Adding new elements requires to include them in the map, i.e. follow the whole process of add them in both tag-mapping and render theme.
-- Emux

Wagner

не прочитано,
5 окт. 2016 г., 16:10:3605.10.2016
– mapsfo...@googlegroups.com
Hello Emux,

Thank you very much for your help.

I was able to run the osmosis command after setting the JAVACMD_OPTIONS="-Xmx6g" variable as you have said. That way I could generate a full map of Brazil with 17MB. Like you warned me this task took about 32 minutes.
I was also able to customize the tag-mapping in order to generate a map with only landuse tags.
Once again thank you very much for your support.

Emux,

I've just one more question, in order to proceed to the next phase of my project. I'd like to mark an area of the map. Suppose for a moment that I have a set of coordinates that create a rectangle (could be any other shape) for instance. Is it possible to mark this coordinates in the map and highlight this area in the map ?

Thanks in advance,

Wagner

-- Wagner

--
You received this message because you are subscribed to a topic in the Google Groups "mapsforge-dev" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/mapsforge-dev/YW0ZvKLcEv4/unsubscribe.
To unsubscribe from this group and all its topics, send an email to mapsforge-dev+unsubscribe@googlegroups.com.
To post to this group, send email to mapsfo...@googlegroups.com.
Visit this group at https://groups.google.com/group/mapsforge-dev.

Emux

не прочитано,
6 окт. 2016 г., 02:24:3606.10.2016
– mapsfo...@googlegroups.com
On 05/10/2016 11:10 μμ, Wagner wrote:
I've just one more question, in order to proceed to the next phase of my project. I'd like to mark an area of the map. Suppose for a moment that I have a set of coordinates that create a rectangle (could be any other shape) for instance. Is it possible to mark this coordinates in the map and highlight this area in the map ?

An easy way to mark an area on the map is with drawing an overlay, e.g. a line rectangle or a semi-transparent polygon.

This is handy specially if the marked area is not fixed, i.e. you change the coordinates often.
See here for how the Mapsforge overlay API works with examples.

--
Emux

Wagner

не прочитано,
11 окт. 2016 г., 10:17:3411.10.2016
– mapsfo...@googlegroups.com
It worked !

Thank you very much.

Emux,

Today I've got a shapefile from a farm, and I'd like to convert to osm.pbf and then to .map. Is there a easy way to do that ?

I' ve learn that there is a tool called osmconverter. Is that tool the best approach ?

I saw an example when the .shp file is exported to .osm using merkaartor or josm and then osmconverter, to convert to .pbf

Something like that: osmconvert sp.osm --out-pbf > sp.pbf

-- Wagner

--
You received this message because you are subscribed to a topic in the Google Groups "mapsforge-dev" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/mapsforge-dev/YW0ZvKLcEv4/unsubscribe.
To unsubscribe from this group and all its topics, send an email to mapsforge-dev+unsubscribe@googlegroups.com.
To post to this group, send email to mapsfo...@googlegroups.com.
Visit this group at https://groups.google.com/group/mapsforge-dev.

Emux

не прочитано,
11 окт. 2016 г., 11:48:4711.10.2016
– mapsfo...@googlegroups.com
I had mentioned above a list of various tools for shp -> osm conversion.

When you get your osm, you can use it directly in map-writer.

Osmosis can read osm and pbf, and also convert between them.

--
Emux
Ответить всем
Отправить сообщение автору
Переслать
0 новых сообщений