Yow to offset Image in GdalRasterLayer?

Topics: SharpMap Project
Jul 22, 2008 at 11:46 AM
Hi all.
I have a problem with image location in GdalRasterLayer.
Default location on layer:  left = 999.5, right = 1000.5. But i need 8303027.5, 4735208.5.
I tried to offset layer envelope  //rasterLayer.Envelope.Offset(new SharpMap.Geometries.Point(8303027.5, 4735208.5)); 
but it provoke exception in GetNonRotatedPreview method.

How can I do this?

thanks

Jul 22, 2008 at 3:04 PM


nigR0NYX wrote:
Hi all.
I have a problem with image location in GdalRasterLayer.
Default location on layer:  left = 999.5, right = 1000.5. But i need 8303027.5, 4735208.5.
I tried to offset layer envelope  //rasterLayer.Envelope.Offset(new SharpMap.Geometries.Point(8303027.5, 4735208.5)); 
but it provoke exception in GetNonRotatedPreview method.

How can I do this?

thanks





You need to create a 'World File' for  your image.

For your case you would use the values:

1
0
0
-1
8303027.5
4735208.5


http://en.wikipedia.org/wiki/World_file
http://freegeographytools.com/2007/worldfile-basics
Jul 23, 2008 at 5:27 AM
Edited Jul 23, 2008 at 5:28 AM


You need to create a 'World File' for  your image.

For your case you would use the values:

1
0
0
-1
8303027.5
4735208.5



dan3258
It is work.
Thanks for your help!