Skip to content

read_world_fileReadWorldFileReadWorldFileread_world_fileT_read_world_file🔗

Short description🔗

read_world_fileReadWorldFileReadWorldFileread_world_fileT_read_world_file — Read the geo coding from an ARC/INFO world file.

Signature🔗

read_world_file( filename.read FileName, out hom_mat2d WorldTransformation )void ReadWorldFile( const HTuple& FileName, HTuple* WorldTransformation )static void HOperatorSet.ReadWorldFile( HTuple fileName, out HTuple worldTransformation )def read_world_file( file_name: str ) -> Sequence[float]

Herror T_read_world_file( const Htuple FileName, Htuple* WorldTransformation )

void HHomMat2D::ReadWorldFile( const HString& FileName )

void HHomMat2D::ReadWorldFile( const char* FileName )

void HHomMat2D::ReadWorldFile( const wchar_t* FileName ) (Windows only)

void HHomMat2D.ReadWorldFile( string fileName )

Description🔗

read_world_fileReadWorldFile reads a geocoding from an ARC/INFO world file with the file name FileNamefileNamefile_name and returns it as a homogeneous 2D transformation matrix in WorldTransformationworldTransformationworld_transformation. To find the file FileNamefileNamefile_name, all directories contained in the HALCON system variable 'image_dir'"image_dir" (usually this is the content of the environment variable HALCONIMAGES) are searched (see read_imageReadImage). This transformation matrix can be used to transform XLD contours to the world coordinate system before writing them with write_contour_xld_arc_infoWriteContourXldArcInfo. If the matrix WorldTransformationworldTransformationworld_transformation is inverted by calling hom_mat2d_invertHomMat2dInvert, the resulting matrix can be used to transform contours that have been read with read_contour_xld_arc_infoReadContourXldArcInfo to the image coordinate system.

Execution information🔗

Execution information
  • Multithreading type: reentrant (runs in parallel with non-exclusive operators).

  • Multithreading scope: global (may be called from any thread).

  • Processed without parallelization.

Parameters🔗

FileNamefileNamefile_name (input_control) filename.read → (string)HTuple (HString)HTuple (string)strHtuple (char*)

Name of the ARC/INFO world file.

WorldTransformationworldTransformationworld_transformation (output_control) hom_mat2d → (real)HTuple (double)HHomMat2D, HTuple (double)Sequence[float]Htuple (double)

Transformation matrix from image to world coordinates.

Result🔗

If the parameters are correct and the world file could be read, the operator read_world_fileReadWorldFile returns the value 2 (H_MSG_TRUE). Otherwise an exception is raised.

Combinations with other operators🔗

Combinations

Possible successors

hom_mat2d_invertHomMat2dInvert, affine_trans_contour_xldAffineTransContourXld, affine_trans_polygon_xldAffineTransPolygonXld

See also

write_contour_xld_arc_infoWriteContourXldArcInfo, read_contour_xld_arc_infoReadContourXldArcInfo, write_polygon_xld_arc_infoWritePolygonXldArcInfo, read_polygon_xld_arc_infoReadPolygonXldArcInfo

Module🔗

Foundation