PDA

View Full Version : write world file


mgb3
2007-10-18, 10:17 AM
I have inherited dwgs which include png rasters. I want to pull the rasters into ArcMap using the co-ordinates that they have in Autocad. How can I attach or extract the coordinate information in Autocad to write a world file? Is anyone aware of a script for this?
Autocad 2004.

Thanks

Matt

tedg
2007-10-18, 05:33 PM
I have inherited dwgs which include png rasters. I want to pull the rasters into ArcMap using the co-ordinates that they have in Autocad. How can I attach or extract the coordinate information in Autocad to write a world file? Is anyone aware of a script for this?
Autocad 2004.
Thanks
Matt
What's a "world file"?

jmiller.123103
2007-10-18, 06:45 PM
Do you have Autocad Map or just plain Autocad?

mgb3
2007-10-19, 09:40 AM
Sorry, a world file to me is small file that contains the georeference information for a raster image. It is usually named the same as a raster file, but with different suffix (a *.tiff might have a world file *.tfw) and means the file can be loaded directly into a GIS application and go to the right place at the correct scale and rotation. I am using Autocad 2004 straight.

This definition of a world file is from
http://www.gdal.org/frmt_various.html#WLD

"A world file file is a plain ASCII text file consisting of six values separated by newlines. The format is:

pixel X size
rotation about the Y axis (usually 0.0)
rotation about the X axis (usually 0.0)
negative pixel Y size
X coordinate of upper left pixel center
Y coordinate of upper left pixel center

For example:

60.0000000000
0.0000000000
0.0000000000
-60.0000000000
440750.0000000000
3751290.0000000000

You can construct that file simply by using your favorite text editor.
World file usually has suffix .wld, but sometimes it may has .tfw, tifw, .jgw or other suffixes depending on the image file it comes with."

Opie
2007-10-19, 03:36 PM
Can you attach a sample drawing with a single image and its' associated world file? Preferably one that has a rotation associated with the image.

mgb3
2007-10-22, 02:35 PM
A colleague has just pointed me here

http://www.xanadu.cz/en/develop.asp#free

where there is a script that moves file within Autocad according to the information within a world file

Utility "GeoRefImg"

Sorry, bit rushed at the moment - will find dwg with raster/world file when I have a little more time.

Matt