[Geotiff] Conversion from lat/long to PCS to raster
noelkhan
noel.khan at rdmd.ocgov.com
Fri Jul 1 13:38:43 EST 2011
DISCLAIMER: As noted above, I'm a newbie and its been a while since I played
around with geoTiffs.
Kevan,
*[Step 2]*
CONCEPT: The idea behind step 2 (above) is to relate some coordinate on the
image to some coordinate in the real world. Imagine dividing your image into
a grid (of I-columns and J-rows). Define the top-left corner (I,J) of your
image as (0,0).
Suppose you had an image depicting parcels in your neighborhood. Now suppose
you superimposed this image onto Google Maps, such that the outline of
parcels from the image matched the satellite imagry. While you were busy
matching up parcel/fence lines, you paid no attention to the top-left corner
of the image, but that's actually what we need. So what real-world
coordinate (Xt,Yt) corresponds to the top-left corner (0,0) of your image?
*[Steps 3 and 4]*
CONCEPT: But what if your image doesn't quite match up with the satellite
photo? What if the image looks like it needs to be stretched to properly
overlay onto the satellite imagery? In this case, you need to scale your
image along the image's x or y dimensions. Let's keep track of that
stretching in (Sx, Sy).
Now imagine you have a diamond in the center of your image. Imagine that
diamond corresponded to a baseball field on satellite imagery. Using the
process described above, I could relate the left-most point of the diamond
(I,J) to the left-most point of the baseball field (Xt,Yt). If the diamond
is now adaquately superimposed over the baseball field, we're done. If not,
we either (1) scale the image along a dimension or (2) change the tie point
(Xt,Yt).
For example, suppose you had to scale the image to make the right-most point
of the diamond match the right-most point of the baseball field. Using your
image's grid, identify the deltaX between the left and right -most points of
the diamond; call this Dx_img. Using Google Maps, similarly identify the
difference between X-ordinates; let's call this Dx_wrd. Now find Sx: Dx_wrd
= Dx_img x Sx. Similarly, find Sy.
PRACTICE: You determine the relationship between raster-space (your image)
and the model-space (representation of the real world) by: (1) getting that
information from the provider of your imagery or (2) trail-and-error;
superimposing the image until it fits (described here). (3) Most people
simply use specialized "georeferencing" software that allows them to
identify points on the image and corresponding points in the model and let
software superimpose handle all the details.
RECOMMENDED READING: GeoTiff Spec (http://trac.osgeo.org/geotiff/)
*[Re Snipets]*
Unfortunately I won't be much help here. I got involved with geotiffs while
writing a library in VB that read tif tags and geotif keys. Anyhow, GDAL
appears easy enough to use:
From
http://lists.maptools.org/pipermail/mapserver-west/2005-June/000131.html
>> For multiple points (e.g. one for each corner) you just add another -gcp
>> option with the values. So, you might do something like:
>>
>> gdal_translate -gcp 0 0 -180 90 -gcp 0 300 -180 -90 -gcp 600 0 180 -90
>> -gcp
>> 600 300 180 90 input.tif output.tif
>>
>> Then run it through gdalwarp to transform the image. Hope that helps!
>>
>> Tyler
>
Regards,
Noel
(Newbie)
--
View this message in context: http://osgeo-org.1803224.n2.nabble.com/Conversion-from-lat-long-to-PCS-to-raster-tp5947410p6538768.html
Sent from the GeoTIFF mailing list archive at Nabble.com.
More information about the Geotiff
mailing list