[GRASSLIST:5792] Re: GRASS Novice Needs Help
Ian MacMillan
ian_macmillan at umail.ucsb.edu
Tue Feb 15 15:52:03 EST 2005
John, I will try to explain my reasoning a little more clearly. Now
then, I could be wrong, but hopefully if someone else sees that I am
leading you astray, they will chime in to this thread.
1) OK, I was trying to say that it sounds like your reprojection with
r.proj is not going to work because your regions don't match in between
your two locations. To reproject something from location 1 to location
2, you need to have the region in location 2 contain the coordinates of
your raster from location 1. For example, you are trying to project a
raster with bounding coord's of
north: 52.3
south: 52.15
west: -7.4
east: -6.85
into a location with coord's of
north: 54N
south: 52N
west: 9W
east: 5W
Normally this would work. However your coord's from the first location
are not 52.3 degrees north to 52.15 degrees south, etc. They are 52.3
METERS north of the equator (or whatever the origin is for Irish grid),
and -7.4 METERS west of the central meridian. Therefore your region in
your latlong location does not contain the coordinates of your raster
from your irish grid location. Following along these lines, I think
your raster is georeferenced incorrectly in your Irish grid location.
Now then, if I understand what you are doing (taking a
non-georeferenced raster image, and converting it into a georeferenced
raster image such as a geotiff), here is the approach I would take.
Make an XY location, and import your nongeoreferenced rasters. Make a
new location with projection parameters that match your final desired
product. Go to the XY location, and use i.group, i.target, i.points,
i.rectify. Open up your second location, and export your rasters with
r.out.gdal.
2) It sounds like you are also having problems with the edges of your
rasters, and you would like to crop them, and or patch them together to
get rid of these blemishes. If you use r.patch, make sure that the
first map listed in input= is the top map. If you want to crop the
maps, just set your region to the raster with g.region rast=your_rast.
Then run d.zoom, and zoom into the region that you want to be the new
'cropped' raster. Exit d.zoom, and run r.mapcalc
your_newrast=your_rast. This will give you a cropped map based on the
extent of the region settings.
Hope this helps
-Ian
On Feb 15, 2005, at 12:23 PM, John Ronan wrote:
>
> On 15 Feb 2005, at 18:49, Ian MacMillan wrote:
>
>> John,
>> I think your problem is that your Irish grid is in transverse
>> mercator, which means the units of measurement is meters, not
>> degrees. Typically your coordinates will be measured in several
>> hundred thousand to millions of meters. Latlong locations measure
>> everything in degrees (like you have). Somehow, you will need to get
>> the correct coordinates in meters for your irish grid first, and then
>> r.proj into your latlong grid. Or mebbe you can try to just go
>> straight into your latlong grid? Not sure if this is super helpful
>> but mebbe this can help get you started.
>>
> Ok, I'm not following at all here...
>
> Though I think I know what your getting at.. its not as simple
> converting from one projection system to another.
>
> I've got the tiles in Irish Grid, and I can export them and gdalwarp
> them to unprojected lat/long which work fine (in xastir). As I can
> figure out the correct co-ordinates in Irish Grid (I had to in order
> to reproject the tiles in the first place) I'm not sure exactly how
> that helps me?
>
> Of course the question remains, is this the correct way to 'patch' two
> 'tiles' together, which is my ultimate goal.
>
> Regards
> John
> --
> John Ronan <jronan at tssg dot org>, +353-51-302938
> Telecommunications Software & Systems Group, http://www.tssg.org
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: text/enriched
Size: 3987 bytes
Desc: not available
Url : http://lists.osgeo.org/pipermail/grass-user/attachments/20050215/65af10ab/attachment.bin
More information about the grass-user
mailing list