[gdal-dev] How to create GeoTiff from image and UTM Coordinates

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

[gdal-dev] How to create GeoTiff from image and UTM Coordinates

gregsmk
Hi,

i am a very beginner in GeoTiff and Georeferencing.

_ i have an image in .emf file format.
_ i also have these UTM informations:
Easting,Northing,Zone,Hemisphere
Exemple: 400000,4379520,24,N

How can i use GDAL to create a geotiff from these informations ?
(My GeoTiff need to be in wgs84, epsg:4326)
(i need to use command line tools, no GUI)

i think i need to convert .emf to a file format which can be supported by GDAL such as .bmp ou "standard" .tif. But After ?
Maybe with gdal_translate and/or gdalwarp, but how ?

Note: i am a very beginner.

Regards

_______________________________________________
gdal-dev mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/gdal-dev
Reply | Threaded
Open this post in threaded view
|

Re: How to create GeoTiff from image and UTM Coordinates

Adrien ANDRÉ
Hi,

you need to know your data spatial resolution and the pixel coordinates
corresponding to (Easting,Northing).

If GDAL cannot read the .emf file, try using ImageMagick:
convert image.emf my_raster.png

Then, you might try to create a worldfile my_raster.wld (See [0]).
The attached example is for a resolution of 10x10m and if
(Easting,Northing) is for your image upper-left corner.

Then provide source SRS info and warp:
gdalwarp -s_srs EPSG:32624 -t_srs EPSG:4326 my_raster.png my_raster-geo-tif

[0] https://en.wikipedia.org/wiki/World_file

Hope this helps,

regards

Le 19-01-08 à 05 h 04, gregsmk a écrit :

> Hi,
>
> i am a very beginner in GeoTiff and Georeferencing.
>
> _ i have an image in .emf file format.
> _ i also have these UTM informations:
> Easting,Northing,Zone,Hemisphere
> Exemple: 400000,4379520,24,N
>
> How can i use GDAL to create a geotiff from these informations ?
> (My GeoTiff need to be in wgs84, epsg:4326)
> (i need to use command line tools, no GUI)
>
> i think i need to convert .emf to a file format which can be supported
> by GDAL such as .bmp ou "standard" .tif. But After ?
> Maybe with gdal_translate and/or gdalwarp, but how ?
>
> Note: i am a very beginner.
>
> Regards

_______________________________________________
gdal-dev mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/gdal-dev

my_raster.wld (36 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: How to create GeoTiff from image and UTM Coordinates

Mike Taves
On Sat, 26 Jan 2019 at 05:50, Adrien André <[hidden email]> wrote:
> If GDAL cannot read the .emf file, try using ImageMagick:
> convert image.emf my_raster.png

This is a good approach, however you will also need to pay attention
to convert's -density and -units options [1] to maintain some sort of
meaningful scale between projected meters and whatever resolution is
used with the original vector image. Also, you can directly write a
.tif file instead of .png to start making a GeoTIFF.

> Then, you might try to create a worldfile my_raster.wld (See [0]).
> The attached example is for a resolution of 10x10m and if
> (Easting,Northing) is for your image upper-left corner.

Be aware that a wordfile references the center of the upper-left cell,
not the corner. An alternative tool that can directly modify a raster
is gdal_edit.py [2], e.g. spatial extent, resolution and CRS. This
tool (as well as GDAL) references the corners of cells, as expected.

After making a georeferenced raster in a projected CRS (e.g. UTM),
then you can create a second raster reprojected in WGS84 using
gdalwarp [3], or just allow GIS software to reproject on-the-fly (e.g.
QGIS does this nicely).

[1] https://imagemagick.org/script/command-line-options.php#density
[2] https://www.gdal.org/gdal_edit.html
[3] https://www.gdal.org/gdalwarp.html
_______________________________________________
gdal-dev mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/gdal-dev