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.


5 Answers 5


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


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


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



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


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
    Commented Aug 24, 2011 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
    Commented Aug 26, 2011 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
    Commented Aug 26, 2011 at 3:27
  • See this tutorial: youtube.com/watch?v=u5coUxUXe9s Maybe can ease your work. Good luck!
    – zearth
    Commented Oct 6, 2011 at 4:46

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