28

What is the best way of converting a gif of a map into a vector format, such as a shapefile? enter image description here

The only relevant parts that I am interested in are the outline of the island so I realize some manual work will be necessary where it is shaded orange; is there a way to handle the rest?

Regarding copyright, it's from the 1980s and it's being used for academic research.

22

GRASS GIS has a tool to convert raster lines to vector. The procedure is:

First open the map in an image editor (GIMP), select by colors with some tolerance and select the black color. Invert selection and delete non-black stuff. Save as Tiff WITH NO COMPRESSION.

Then in GRASS:

r.in.gdal - import raster
r.thin - Thins non-zero cells that denote linear features in a raster map.
r.to.vect - Converts a raster map into a vector map layer.

You will have problem with the texts and the grid. Some cleaning is essential for a good result.

As an example, here is a real screenshot of vector output of your image after the procedure in GRASS: enter image description here

8

Georeference the image and capture by hand. This is by far the best way as it is less prone to error.

6

I haven't used it, but you may want to try the gdal_polygonize script that comes with GDAL

http://www.gdal.org/gdal_polygonize.html

3

If you have ArcGIS you could use the ArcScan extension if you have the license for it.

  • It depends on the imagery or raster itself, it can go really slow..if it is a small one it should be able to convert quick as long as if you have a powerful computer. – PROBERT Aug 24 '11 at 1:46
0

You just can open them in Google Earth and digitize them. And save it as KML file. Done!

KML file is a good vector format supported by most GIS software.

  • 1
    Hi Zearth - what do you mean 'digitize' them? Can google earth convert an image into a vector? – djq Aug 24 '11 at 13:02
  • Hi back, celemius. Definitely. Well, I'm not a GIS expert but what I can tell you about digitize is you can upload image above and put coordinates on the map. (I believe that is Singapore map, right?) And figuratively, you can save them as KML or KMZ (compressed KML) files. Click this link: iapad.org/p3dm_process/step_04b.htm – zearth Aug 26 '11 at 2:22
  • 1
    I understand the principle - I don't believe google earth can convert an image (or raster) into a vector though. – djq Aug 26 '11 at 3:27
  • See this tutorial: youtube.com/watch?v=u5coUxUXe9s Maybe can ease your work. Good luck! – zearth Oct 6 '11 at 4:46

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.