1

I have a 3.3GB .osm file and I'm trying to convert it to .map with Osmosis with the following

osmosis --read-xml mexico.osm --mapfile-writer file=mexico.map

but I get the java.lang.OutOfMemoryError, I guess because of the file size.

Is there another way to convert it?

1

2 Answers 2

1

I did something similar once. Load your osm file to some gis software, edit it (keep only what you really need) and then save it as csv. I thing you are talking about mapserver when you refer to a map file, if so, just call your csv from the DATA tag.

2
  • As per the Tour please do not include chit chat like Hope That Helps in your posts.
    – PolyGeo
    Commented Aug 12, 2017 at 21:23
  • .map file is different from mapserver map file. this one is used in android.
    – neogeomat
    Commented Mar 17, 2018 at 6:49
0

.osm is an xml based format which has very big size. You should convert it to binary .pbf format to reduce the size and then convert it to .map. Since binary process faster the 2 step process should be faster than direct conversion

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.