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?


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.

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

.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, privacy policy and cookie policy

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