FAQ
Dear all,

The answer may well be 'no', but does anyone know of a straightforward way to import into R a map in the form of a simple jpeg (or bmp, gif, etc.) image file?

I'm thinking of a situation where you have something like this:

http://www.learnnc.org/lp/media/uploads/2007/09/1492spain.jpg

or

http://www.spainthenandnow.com/userimages/Spain%20General%20Map%20Wikimedia.png

Latitude and longitude lines are given in the image, and they should be usable for identifying the geographical location of any given pixel, but the projection of the map is not immediately apparent, and the map is not in a vector format where lines or polygons can be easily identified. What I'd like to do is read in this kind of file, have R find the edges (identified somehow by differences in pixel colours I guess), and convert the areas defined by those edges into a SpatialPolygons object, with lat/long coordinates.

There may well be no easy way to do this (or not even a difficult way), but I thought I'd check if anyone has any ideas. I prefer to use R, but if some other (preferably open source) software could help me, I'd be interested to know. Even suggestions like "IF you could get it into X format, THEN you could�" might be useful. I'm not a GIS person, unfortunately. On the other hand, I am pretty handy with R, and a regular user of several of the maps/spatial/raster packages.

Any help would be much appreciated.

- Malcolm

Search Discussions

Discussion Posts

Follow ups

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 1 of 3 | next ›
Discussion Overview
groupr-sig-geo @
categoriesr
postedSep 13, '11 at 10:33a
activeSep 13, '11 at 5:09p
posts3
users3
websiter-project.org
irc#r

People

Translate

site design / logo © 2022 Grokbase