NOTICE: help.openstreetmap.org is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum

I have used a soft called osm2shp, but when I converting, some bugs popup, so I need an effective way to solve the problem.I will be grateful for your help!

asked 03 Jan '12, 06:46

Silian1988's gravatar image

Silian1988
1111
accept rate: 0%

2

Please explain what you mean by "some bugs popup". What input files did you try to process, what was the expected outcome, and what did you get instead?

(03 Jan '12, 08:38) Frederik Ramm ♦

To Frederik Ramm, I'm sorry I didn't explain my question clearly. I want to get the world map of shape files(.shp), but now I only have OSM file(.osm format), I have used a soft called OSM2SHP,but when I converting, a dialog saying “Exception of type 'System.OutOfMemoryException' was thrown.” pops up, the system I used is windows xp.

(03 Jan '12, 15:11) Silian1988

For the first there are several programs named osm2shp. I do not know what you have problems with. There is an overview of different programs on the wiki.

The error message System.OutOfMemoryException indicates that this is a .net application. You may find information on how to resolve it by searching the error. Or try another application based on a better framework.

Whenever you are working with big amounts of data like the planet file, you are going to use a lot of memmory. Use a computer with enough memmory and a 64-bit address space.

permanent link

answered 03 Jan '12, 17:25

Gnonthgol's gravatar image

Gnonthgol ♦
13.8k16103198
accept rate: 16%

Try using QGIS - Just import osm file using OpenStreetMap plugin (which comes with the default QGIS software).

Then left click the layers and save as shp files.

The only problem I've found is that some tags I think are truncated to 256 characters I think. But most tags aren't this long anyway.

permanent link

answered 03 Jan '12, 21:48

Hawkeye's gravatar image

Hawkeye
2412511
accept rate: 0%

I'm guessing (from the .NET error) that you're using the Google Code osm2shp and (from the fact that you're running Windows XP) that you haven't got much memory on your PC. The page that Gnonthgol referred to describes several alternatives - I'd read up about those and use one of them instead (at least one seems to support a temporary local database rather than in-memory storage which might be better for you).

You'll also probably need to think about what features you want in the resulting shapefiles, and try a small area first.

One final question - have you checked that the zipped shapefiles that are available for areas from e.g. here don't do what you want?

permanent link

answered 03 Jan '12, 18:36

SomeoneElse's gravatar image

SomeoneElse ♦
36.9k71370866
accept rate: 16%

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×4

question asked: 03 Jan '12, 06:46

question was seen: 31,801 times

last updated: 03 Jan '12, 21:48

NOTICE: help.openstreetmap.org is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum