Author Topic: (MicroStation) HMR to GeoTiff and World File  (Read 6819 times)

0 Members and 1 Guest are viewing this topic.

ronjonp

  • Needs a day job
  • Posts: 7526
(MicroStation) HMR to GeoTiff and World File
« on: July 08, 2010, 03:16:16 PM »
Okay ... let me start this off by saying I'm fairly Microstation illiterate  :-D

I just received an HMR file and have successfully converted it to a GeoTiff using Microstation V8i. What I cannot figure out is how to generate the world file so I can insert it into AutoCAD at the correct scale and coordinates.

I checked the element information and to me it appears that this image does NOT have the correct world info ... does my assumption seem correct or am I missing a step?

Windows 11 x64 - AutoCAD /C3D 2023

Custom Build PC

mjfarrell

  • Seagull
  • Posts: 14444
  • Every Student their own Lesson
Re: HMR to GeoTiff and World File
« Reply #1 on: July 08, 2010, 08:28:01 PM »
from this page: http://www.remotesensing.org/geotiff/faq.html

Quote


How do I convert between ESRI world files, and GeoTIFF?
While it is presumably possible to accomplish this with ESRI software, it is also possible to use the listgeo and geotifcp executables distributed with libgeotiff to accomplish this. Recent binaries for selected platforms, and source, can be found at:
ftp://ftp.remotesensing.org/geotiff/libgeotiff/

To convert a TIFF file (abc.tif) and a world file (abc.tfw) into a simple GeoTIFF file (geo_abc.tif) without a projection definition use the following command:

  % geotifcp -e abc.tfw abc.tif geo_abc.tif

If a geotifcp compatible metadata file defining the coordinates system is also available (such as produced by listgeo run on a comparible GeoTIFF file), it can be combined with the georeferencing information of the world file to produce a fully defined GeoTIFF file using a command like this:
  % geotifcp -e abc.tfw -g projdef.txt abc.tif geo_abc.tif

The listgeo executable can be used to produce a geo_abc..tfw file from a GeoTIFF file (geo_abc.tif) using a command like this:
  % listgeo -tfw geo_abc.tif > projdef.txt

How do I preserve GeoTIFF info when editing my image?
When I edit my GeoTIFF image in Photoshop or other applications, and then save the result the geotiff information is lost. How can I avoid this?
If a given applications does not support the GeoTIFF tags it will generally discard them when reading a GeoTIFF image and they won't be present after a save. However, it is possible to save the GeoTIFF metadata and reapply it to the image later using commandline utilities distributed with libgeotiff.

Given a GeoTIFF file named original.tif, and a modified file (modified.tif) without the GeoTIFF tags, but still the same size and region:


  listgeo -no_norm original.tif > original.geo
  geotifcp -g original.geo modified.tif modified_geotiff.tif

The listgeo utility is saving a text version of the geotiff tags in the file original.geo, and then geotifcp is copying the modified image, and in the process reapplying the GeoTIFF tags to produce a modified GeoTIFF file. This process only works properly if the modified.tif is the same number of pixels and lines as the original file, and represents the same region on the earth.
Be your Best


Michael Farrell
http://primeservicesglobal.com/

ronjonp

  • Needs a day job
  • Posts: 7526
Re: HMR to GeoTiff and World File
« Reply #2 on: July 08, 2010, 11:49:58 PM »
Thanks for the info Michael  :-) I ended up using the image size (pixels \ 2) assuming 1/2 meter accuracy (crossed checked with Google Earth). I had contours for the same section and was able to lineup the two.  :angel:

Windows 11 x64 - AutoCAD /C3D 2023

Custom Build PC