Jump to content

 
Photo

Warping a raster image

- - - - -

  • Please log in to reply
8 replies to this topic

#1
craigspc

craigspc

    Contributor

  • Validated Member
  • PipPip
  • 18 posts
  • Germany

Hi,

As a bit of a novice, I'm not quite sure how to word this question. I'll try my best though. :)

I have a raster image (drawn map), which I would like to permanently allign with google earth/map's satellite imagery. The only way that I have managed this is as follows:

1) Export a JPEG from Google Earth
2) Load the JPEG into Photoshop
3) Open my own map drawing and paste it as a new layer (on top of the Google image)
4) Make the new layer slightly transparent (so that I can see the google image underneath)
5) use the Free transform tool to bend/twist/warp my image to match by hand
6) Save the modified layer as a new image

I understant that there are a number of applications that will allow me to georeference a raster image and save it as a GeoTIFF, but none of the programs I've tried appear to let me export a single warped image.

Is there an easier way than the method that I'm currently using?

Thanks in advance,
Craig.

#2
Nick H

Nick H

    Legendary Contributor

  • Validated Member
  • PipPipPipPipPip
  • 307 posts
  • Gender:Male
  • Location:Caversham, Reading, England.
  • United Kingdom

I understant that there are a number of applications that will allow me to georeference a raster image and save it as a GeoTIFF, but none of the programs I've tried appear to let me export a single warped image.

Is there an easier way than the method that I'm currently using.


Yes! Provided you have a geofererenced image to start with you can warp it to any projection using GDALWARP from a command line. For example:

gdalwarp -s_srs EPSG:4326 -t_srs EPSG:27700 homewgs84.bmp homeOS.tif

will warp the WGS84 bitmap 'homewgs84.bmp' to the UK Ordnance Survey geotiff 'homeOS.tif' (in this case the source bitmap was calibrated with a world file).

http://fwtools.maptools.org/

Regards, N.
Caversham, Reading, England.

#3
craigspc

craigspc

    Contributor

  • Validated Member
  • PipPip
  • 18 posts
  • Germany

Yes! Provided you have a geofererenced image to start with you can warp it to any projection using GDALWARP from a command line. For example:

gdalwarp -s_srs EPSG:4326 -t_srs EPSG:27700 homewgs84.bmp homeOS.tif

will warp the WGS84 bitmap 'homewgs84.bmp' to the UK Ordnance Survey geotiff 'homeOS.tif' (in this case the source bitmap was calibrated with a world file).

http://fwtools.maptools.org/

Regards, N.


Thank you very much, Nick! :)

#4
ProMapper

ProMapper

    Master Contributor

  • Validated Member
  • PipPipPipPip
  • 216 posts
  • Gender:Female
  • Location:India
  • Interests:promapper@gmail.com
  • India

Hi Craig

If it is just one image just send it across and I will do it for you.

However if you want to really get deeper into the realm of Georeferencing then download Global Mapper (ver11 now). It has many features enabled even in the Trial version. Just play around with it and its help file, you will get a lot of solutions.

Anu
http://www.mapsandlocations.com

#5
frax

frax

    Hall of Fame

  • Associate Admin
  • PipPipPipPipPipPipPip
  • 2,299 posts
  • Gender:Male
  • Location:Stockholm, Sweden
  • Interests:music, hiking, friends, nature, photography, traveling. and maps!
  • Sweden

Do you know what projection your original drawing is in? You might want to look into Google Earth Pro too.
Hugo Ahlenius
Nordpil - custom maps and GIS
http://nordpil.com/
Twitter

#6
craigspc

craigspc

    Contributor

  • Validated Member
  • PipPip
  • 18 posts
  • Germany

Sorry for the slow reply. I've been away for a couple of days and just saw the messages this afternoon...

Anu: Thank you VERY much for the kind offer of doing this for me, but its not just one image. It would also be good if I could do this myself - otherwise I'd only be back in a couple of weeks with exactly the same problem :-)

Well, I had a bit of a play around with GDALWARP, but I'm struggling to get the right output. Even though I do get a new/warped image, it doesn't match up with the Google satellite imagery at all. This is undoubtedly user error on my part though.

My image is drawn to line up perfectly with a UK Ordnance Survey map. However, the georeferencing was done by linking points of the drawing with corresponding Lat/Long coordinates obtained via Google Earth. I believe I did this with the demo version of GeographicImager 2.5, which has now expired.

I've now downloaded the demo of Global Mapper 11, which has no problem opening my image (GeoTIFF). After loading the image, it appears in the main window in a kind of perspective view. I then tried using the "Export to Google Maps" option, just to see if that would work. Although this is not what I am trying to achieve, I though that it would prove whether I'd georeferenced the image correctly or not. I found that this worked very well and the overlay aligns exactly with the Google map imagery.

Does that info help at all? Sorry to be a pain...

#7
Nick H

Nick H

    Legendary Contributor

  • Validated Member
  • PipPipPipPipPip
  • 307 posts
  • Gender:Male
  • Location:Caversham, Reading, England.
  • United Kingdom

My image is drawn to line up perfectly with a UK Ordnance Survey map. However, the georeferencing was done by linking points of the drawing with corresponding Lat/Long coordinates obtained via Google Earth. I believe I did this with the demo version of GeographicImager 2.5, which has now expired.

I've now downloaded the demo of Global Mapper 11, which has no problem opening my image (GeoTIFF). After loading the image, it appears in the main window in a kind of perspective view. I then tried using the "Export to Google Maps" option, just to see if that would work. Although this is not what I am trying to achieve, I though that it would prove whether I'd georeferenced the image correctly or not. I found that this worked very well and the overlay aligns exactly with the Google map imagery.


So, you've reached the point where you can overlay your drawing on Google Maps but now you want to save the drawing for use in Google Earth? I hope I've got this right .

I would have thought the easy way would be to load the image into Google Maps and then click the 'View in Google Earth' button. This should start GE and overlay the image. Then, in GE save the image as a KMZ file ('Save place as').

But I get an awful feeling that I'm missing something here :( .

Regards, N.
Caversham, Reading, England.

#8
craigspc

craigspc

    Contributor

  • Validated Member
  • PipPip
  • 18 posts
  • Germany

So, you've reached the point where you can overlay your drawing on Google Maps but now you want to save the drawing for use in Google Earth? I hope I've got this right .

I would have thought the easy way would be to load the image into Google Maps and then click the 'View in Google Earth' button. This should start GE and overlay the image. Then, in GE save the image as a KMZ file ('Save place as').

But I get an awful feeling that I'm missing something here :( .

Regards, N.


Looks like I'm confusing everyone :-(

Your original understanding was 100% correct. I simply want to take my drawing (which currently aligns with an OS map) and obtain a new image that would have the same shape and form as a google maps satellite image. I then wish to continue editing the new image in Photoshop.

In your first post, you mentioned that this should work using GDALWARP, providing that I have a georeferenced image to work from. However, because GDALWARP wasn't giving me the expected result, I thought that I had made some errors when georeferencing the image. By testing GlobalMapper's "Export to Google Maps" option, I simply figured that if I had made any errors - they would show up here too. However, they didn't.

Regards,
Craig

#9
ProMapper

ProMapper

    Master Contributor

  • Validated Member
  • PipPipPipPip
  • 216 posts
  • Gender:Female
  • Location:India
  • Interests:promapper@gmail.com
  • India

Well if you did not find any errors showing up, will it not mean that there are no errors. But sometimes our gut feeling is to the contrary. Why don't you try the whole process afresh with Global Mapper.

So, you've reached the point where you can overlay your drawing on Google Maps but now you want to save the drawing for use in Google Earth? I hope I've got this right .

I would have thought the easy way would be to load the image into Google Maps and then click the 'View in Google Earth' button. This should start GE and overlay the image. Then, in GE save the image as a KMZ file ('Save place as').

But I get an awful feeling that I'm missing something here :( .

Regards, N.


Looks like I'm confusing everyone :-(

Your original understanding was 100% correct. I simply want to take my drawing (which currently aligns with an OS map) and obtain a new image that would have the same shape and form as a google maps satellite image. I then wish to continue editing the new image in Photoshop.

In your first post, you mentioned that this should work using GDALWARP, providing that I have a georeferenced image to work from. However, because GDALWARP wasn't giving me the expected result, I thought that I had made some errors when georeferencing the image. By testing GlobalMapper's "Export to Google Maps" option, I simply figured that if I had made any errors - they would show up here too. However, they didn't.

Regards,
Craig






0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

-->