Skip to content

henc · Object, Symbol & Info

Object picking, depth map, S-52 ENC symbols, S-57 / S-52 information lookup

int hencSelectObj( HENCOBJECT obj )

Sets the specified object (Object) to be displayed in the selected shape.

  • Object handle value retrieved using function
  • = 0 : Success
  • < 0 : Fail

int hencPickObj( double x, double y, list &listObjs )
  • The object being searched is limited by the display settings of the current screen. Points, lines, and areas within the range of about 10 pixels on the screen are searched with the current scale at the specified coordinates.
  • However, objects or map cells that are not currently displayed are excluded from the search.
  • double x : IN (longitude, degree)
  • double y : IN (latitude, degree)
  • list &listObjs : IN, OUT (List of unique handle values for retrieved objects)
  • = 0 : Success
  • < 0 : Fail

void hencObjToString( HENCOBJECT obj, string &str )

Converts the details of the object into a string.

  • HENCOBJECT obj : IN (Handle of ENC feature object)
  • It should be the value obtained from
  • string &str : IN, OUT (A string containing detailed information about the object.)

None


const char *hencGetFilenameOfObj( HENCOBJECT obj )

Searches the file containing the specified object and extracts the file name.

  • It should be a value obtained from hencPickObj()
  • != NULL : File name, Null-terminated string
  • == NULL : File nou found(Fail)

EEncObject hencObjGetCode( HENCOBJECT obj )

Obtains the S-57 object code value of the object.

  • It should be the value obtained from
  • S-57 Refer feature object catalog

EObjectPrimitiveType hencObjGetPrimType( HENCOBJECT obj )

Find out the Primitive Type (point, line, face) of the object’s S-57 object.

  • HENCOBJECT obj : IN (Handle of ENC feature object)
  • It should be the value obtained from

See the S-57 feature object primitive type of the object


int hencObjGetPoints( HENCOBJECT obj, S_OBJ_POLYGON *data )

Obtains the coordinate information of S-57 object.

  • HENCOBJECT obj : IN (Handle of ENC feature object)
  • It should be the value obtained from
  • S_OBJ_POLYGON * data : IN, OUT (S_OBJ_POLYGON *data)
  • It contains the information of the poly polygon as the structure of the following form.
  • == 0 : Success
  • < 0 : Fail

HENCDEPTHMAP hencDepthmapGenerate()

Collect only depth information from all currently loaded ENC map cells.

None

  • != 0 : Handle value of generated depth information
  • == 0 : Fail

int hencDepthmapSave( HENCDEPTHMAP hdd, const char *fn )

Save the created set of depth information to a file.

  • HENCDEPTHMAP hdd : IN (Depth information handle value generated by .)
  • const char * fn : IN (Filename for storing depth information)
  • = 0 : Success
  • < 0 : Fail

HENCDEPTHMAP hencDepthmapLoad( const char *fn )

Read a set of depth information from a depth information file.

const char *fn : IN (Filename for storing depth information)

  • != 0 : Handle value of depth information read
  • == 0 : Fail

int hencDepthmapGetData( HENCDEPTHMAP hdd, double x, double y, double &dep1, double &dep2 )

Find depth information at specific coordinates in the depth information set.

  • HENCDEPTHMAP hdd : IN (Handle value of the depth information set)
  • double x : IN (Longitude of depth information search location, degree)
  • double y : IN (Latitude of depth information search location, degree)
  • double &dep1 : OUT (Minimum depth)
  • double &dep2 : OUT (Maximum depth)
  • = 0 : Success
  • < 0 : Fail

int hencDepthmapDelete( HENCDEPTHMAP hdd )

Clear the memory occupied by the depth information set.

HENCDEPTHMAP hdd : IN (Handle value of the depth information set)

  • = 0 : Success
  • < 0 : Fail

int hencGetEncSymbolCount()

Obtain the number of available S-52 symbols.

None

Number of symbols available in the library


const char *hencGetEncSymbolName( int no )

Obtain the name of the string for S-52 symbol number.

int no : IN (Symbol number)

  • != NULL : Symbol name, Null-terminated string
  • Same as the name specified in the S-52 standard document
  • == NULL : Fail (Incorrect symbol number)

int hencDrawEncSymbol( LPCTSTR name )

Display the S-52 symbol on the screen.

  • const char *name : IN (Null-terminated string)
  • Same as the name specified in the S-52 standard document
  • = 0 : Success
  • < 0 : Fail

int hencDrawEncSymbolAtGlPos( const char *name, double x, double y, double z, double angle = 0, double scale = 1.0 )

Display the S-52 symbol on the screen.

  • const char *name : IN (Null-terminated string, Same as the name specified in the S-52 standard document)
  • double x : IN (The x value of the OpenGL coordinate system)
  • double y : IN (The y value of the OpenGL coordinate system)
  • double z : IN (The z value of the OpenGL coordinate system)
  • double angle : IN (CW, Rotation Angle, degree)
  • double scale : IN (Zoom-in/Zoom-out value)
  • = 0 : Success
  • < 0 : Fail

int hencDrawEncSymbolAtWinPos( const char *name, double x, double y )

Display the S-52 symbol on the screen.

  • const chat *name : IN (Null-terminated string, Same as the name specified in the S-52 standard document)
  • double x : IN (The x value of the Window GDI coordinate system)
  • double y : IN (The y value of the Window GDI coordinate system)
  • = 0 : Success
  • < 0 : Fail

int hencDrawEncSymbolAtMapPos( const char *name, double x, double y )

Display the S-52 symbol on the screen.

  • const char *name : IN (Null-terminated string, Same as the name specified in the S-52 standard document)
  • double x : IN (longitude, degree)
  • double y : IN (latitude, degree)
  • = 0 : Success
  • < 0 : Fail

int hencGetEncLineCount()

Obtain the number of available S-52 Complex Lines.

None

Number of Complex Lines available in the library


const char *hencGetEncLineName( int no )

Obtain the name of the string for the S-52 Complex Line number.

int no : IN (Complex Line number)

  • != NULL : String of Complex Line number, Null-terminated string
  • Same as the name specified in the S-52 standard document
  • == NULL : Fail (Incorrect number)

int hencDrawEncLineAtGlPos( LPCTSTR name, double x1, double y1, double x2, double y2, double z )

Display the S-52 complex line on the screen.

  • LPCTSTR name : IN (Null-terminated string, Use the name obtained with )
  • double x1 : IN (The x value of the line starting point, OpenGL coordinate system)
  • double y1 : IN (The y value of the line starting point, OpenGL coordinate system)
  • double x2 : IN (The x value of the line end point, OpenGL coordinate system)
  • double y2 : IN (The y value of the line end point, OpenGL coordinate system)
  • double z : IN (z value in OpenGL coordinate system)
  • = 0 : Success
  • < 0 : Fail

int hencDrawEncLineAtWinPos( LPCTSTR name, double x1, double y1, double x2, double y2, double z )

Display the S-52 complex line on the screen.

  • LPCTSTR name : IN (Null-terminated string, Use the name obtained with )
  • double x1 : IN (The x value of the line start point, the Windows GDI coordinate system)
  • double y1 : IN (The y value of the line start point, the Windows GDI coordinate system)
  • double x2 : IN (The x value of the line end point, the Windows GDI coordinate system)
  • double y2 : IN (The y value of the line end point, the Windows GDI coordinate system)
  • double z : IN (The z value of the line, the OpenGL coordinate system)
  • = 0 : Success
  • < 0 : Fail

int hencDrawEncLineAtMapPos( LPCTSTR name, double x1, double y1, double x2, double y2, double z )

Display the S-52 complex line on the screen.

  • LPCTSTR name : IN (Null-terminated string, Use the name obtained with )
  • double x1 : IN (The longitude value of the line start point, degree, Geographic coordinate system)
  • double y1 : IN (The latitude value of the line start point, degree, Geographic coordinate system)
  • double x2 : IN (The longitude value of the line end point, degree, Geographic coordinate system)
  • double y2 : IN (The latitude value of the end start point, degree, Geographic coordinate system)
  • double z : IN (The z value of the line, the OpenGL coordinate system)
  • = 0 : Success
  • < 0 : Fail

int hencGetEncPatternCount()

Obtain the number of available S-52 Fill patterns.

None

Number of Fill patterns available in the library


const char * hencGetEncPatternName( int no )

Obtain the string name for S-52 Fill pattern number.

int no : IN (Fill pattern number)

  • != NULL : String of pattern number, Null-terminated string
  • Same as the name specified in the S-52 standard document
  • == NULL : Fail (Incorrect pattern number)

int hencDrawEncPatternFillAtGlPos( LPCTSTR name, int cntPts, double *x, double *y, double z )

Fill the given area with the S-52 fill pattern.

  • LPCTSTR name : IN (Null-terminated string, S-52 fill pattern name, Use the name obtained with i>
  • int cntPts : Number of region polygon coordinates
  • double *x : IN (X coordinate array of region polygon, OpenGL coordinate system)
  • double *y : IN (Y coordinate array of region polygon, OpenGL coordinate system)
  • double z : IN (Z value of line, OpenGL coordinate system, same as all coordinates)
  • = 0 : Success
  • < 0 : Fail

int hencDrawEncPatternFillAtWinPos( LPCTSTR name, int cntPts, double *x, double *y )

Fill the given area with the S-52 fill pattern.

  • LPCTSTR name : IN (Null-terminated string, S-52 fill pattern name, Use the name obtained with i>
  • int cntPts : Number of region polygon coordinates
  • double *x : IN (X coordinate array of region polygon, Windows GDI coordinate system)
  • double *y : IN (Y coordinate array of region polygon, Windows GDI coordinate system)
  • = 0 : Success
  • < 0 : Fail

int hencDrawEncPatternFillAtMapPos( LPCTSTR name, int cntPts, double *x, double *y )

Fill the given area with the S-52 fill pattern.

  • LPCTSTR name : IN (Null-terminated string, S-52 fill pattern name, Use the name obtained with i>
  • int cntPts : Number of area polygon coordinates
  • double *x : IN (Longitude coordinate array of region polygon)
  • double *y : IN (Latitude coordinate array of region polygon)
  • = 0 : Success
  • < 0 : Fail

COLORREF hencGetColor( EEncColor color )
  • Refer S-52 Color

EEncColor color : IN (S-52 color code value)

RGB value

COLORREF hencGetColor( EEncColorset setNo, EEncColor color )
  • Refer S-52 Color
  • EEncColorset setNo : Specify the color you want to acquire
  • EEncColor color : IN (S-52 color code value)

RGB value

COLORREF hencGetColor( const char *acronym )
  • Refer S-52 Color

const char *acronym : IN (S-52 color acronym string)

RGB value


const char * hencGetColorName( EEncColor color )

Obtain an acronym corresponding to the color code.

EEncColor color : IN (S-52 color code)

  • != NULL : S-52 color acronym string
  • == NULL : Fail (Incorrect string)

const char * hencGetPrimName( EObjectPrimitiveType t )
  • Refer the S-57 ENC Object Primitive Type

EObjectPrimitiveType t : IN (S-57 ENC Object Primitive Type)

  • != NULL : String
  • == NULL : Fail

const char * hencGetObjectName( EEncObject obj )

Obtains the acronym string corresponding to the S-57 Feature Object Code.

EEncObject obj : IN (S-57 Feature Object Code)

  • != NULL : String
  • == NULL : Fail

const char * hencGetObjectDesc( EEncObject obj )

Obtains the description string corresponding to the S-57 Feature Object Code.

EEncObject obj : IN (S-57 Feature Object Code)

  • != NULL : String
  • == NULL : Fail

const char * hencGetAttrName( EEncAttr attr )

Obtain the acronym string corresponding to S-57 Feature Attribute Code.

EEncAttr attr : IN (S-57 Feature Attribute Code)

  • != NULL : String
  • == NULL : Fail

EEncAttr hencEnumAttr( const char *acronym )

Obtain the code value corresponding to S-57 feature attribute acronym.

const char *acronym : IN (S-57 feature attribute acronym string)

S-57 Feature Attribute Code


EEncObject hencEnumObjectName( const char *acronym )

Obtain the code value corresponding to S-57 feature attribute acronym.

const char *acronym : IN (S-57 Feature Object acronym string)

S-57 Feature Object Code