henc · Object, Symbol & Info
Object picking, depth map, S-52 ENC symbols, S-57 / S-52 information lookup
hencSelectObj
Section titled “hencSelectObj”Prototype
Section titled “Prototype”int hencSelectObj( HENCOBJECT obj )Function
Section titled “Function”Sets the specified object (Object) to be displayed in the selected shape.
Parameters
Section titled “Parameters”- Object handle value retrieved using function
Return Value
Section titled “Return Value”- = 0 : Success
- < 0 : Fail
hencPickObj
Section titled “hencPickObj”Prototype
Section titled “Prototype”int hencPickObj( double x, double y, list &listObjs )Function
Section titled “Function”- 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.
Parameters
Section titled “Parameters”- double x : IN (longitude, degree)
- double y : IN (latitude, degree)
- list
&listObjs : IN, OUT (List of unique handle values for retrieved objects)
Return Value
Section titled “Return Value”- = 0 : Success
- < 0 : Fail
hencObjToString
Section titled “hencObjToString”Prototype
Section titled “Prototype”void hencObjToString( HENCOBJECT obj, string &str )Function
Section titled “Function”Converts the details of the object into a string.
Parameters
Section titled “Parameters”- 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.)
Return Value
Section titled “Return Value”None
hencGetFilenameOfObj
Section titled “hencGetFilenameOfObj”Prototype
Section titled “Prototype”const char *hencGetFilenameOfObj( HENCOBJECT obj )Function
Section titled “Function”Searches the file containing the specified object and extracts the file name.
Parameters
Section titled “Parameters”- It should be a value obtained from hencPickObj()
Return Value
Section titled “Return Value”- != NULL : File name, Null-terminated string
- == NULL : File nou found(Fail)
hencObjGetCode
Section titled “hencObjGetCode”Prototype
Section titled “Prototype”EEncObject hencObjGetCode( HENCOBJECT obj )Function
Section titled “Function”Obtains the S-57 object code value of the object.
Parameters
Section titled “Parameters”- It should be the value obtained from
Return Value
Section titled “Return Value”- S-57 Refer feature object catalog
hencObjGetPrimType
Section titled “hencObjGetPrimType”Prototype
Section titled “Prototype”EObjectPrimitiveType hencObjGetPrimType( HENCOBJECT obj )Function
Section titled “Function”Find out the Primitive Type (point, line, face) of the object’s S-57 object.
Parameters
Section titled “Parameters”- HENCOBJECT obj : IN (Handle of ENC feature object)
- It should be the value obtained from
Return Value
Section titled “Return Value”See the S-57 feature object primitive type of the object
hencObjGetPoints
Section titled “hencObjGetPoints”Prototype
Section titled “Prototype”int hencObjGetPoints( HENCOBJECT obj, S_OBJ_POLYGON *data )Function
Section titled “Function”Obtains the coordinate information of S-57 object.
Parameters
Section titled “Parameters”- 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.
Return Value
Section titled “Return Value”- == 0 : Success
- < 0 : Fail
hencDepthmapGenerate
Section titled “hencDepthmapGenerate”Prototype
Section titled “Prototype”HENCDEPTHMAP hencDepthmapGenerate()Function
Section titled “Function”Collect only depth information from all currently loaded ENC map cells.
Parameters
Section titled “Parameters”None
Return Value
Section titled “Return Value”- != 0 : Handle value of generated depth information
- == 0 : Fail
hencDepthmapSave
Section titled “hencDepthmapSave”Prototype
Section titled “Prototype”int hencDepthmapSave( HENCDEPTHMAP hdd, const char *fn )Function
Section titled “Function”Save the created set of depth information to a file.
Parameters
Section titled “Parameters”- HENCDEPTHMAP hdd : IN (Depth information handle value generated by .)
- const char * fn : IN (Filename for storing depth information)
Return Value
Section titled “Return Value”- = 0 : Success
- < 0 : Fail
hencDepthmapLoad
Section titled “hencDepthmapLoad”Prototype
Section titled “Prototype”HENCDEPTHMAP hencDepthmapLoad( const char *fn )Function
Section titled “Function”Read a set of depth information from a depth information file.
Parameters
Section titled “Parameters”const char *fn : IN (Filename for storing depth information)
Return Value
Section titled “Return Value”- != 0 : Handle value of depth information read
- == 0 : Fail
hencDepthmapGetData
Section titled “hencDepthmapGetData”Prototype
Section titled “Prototype”int hencDepthmapGetData( HENCDEPTHMAP hdd, double x, double y, double &dep1, double &dep2 )Function
Section titled “Function”Find depth information at specific coordinates in the depth information set.
Parameters
Section titled “Parameters”- 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)
Return Value
Section titled “Return Value”- = 0 : Success
- < 0 : Fail
hencDepthmapDelete
Section titled “hencDepthmapDelete”Prototype
Section titled “Prototype”int hencDepthmapDelete( HENCDEPTHMAP hdd )Function
Section titled “Function”Clear the memory occupied by the depth information set.
Parameters
Section titled “Parameters”HENCDEPTHMAP hdd : IN (Handle value of the depth information set)
Return Value
Section titled “Return Value”- = 0 : Success
- < 0 : Fail
hencGetEncSymbolCount
Section titled “hencGetEncSymbolCount”Prototype
Section titled “Prototype”int hencGetEncSymbolCount()Function
Section titled “Function”Obtain the number of available S-52 symbols.
Parameters
Section titled “Parameters”None
Return Value
Section titled “Return Value”Number of symbols available in the library
hencGetEncSymbolName
Section titled “hencGetEncSymbolName”Prototype
Section titled “Prototype”const char *hencGetEncSymbolName( int no )Function
Section titled “Function”Obtain the name of the string for S-52 symbol number.
Parameters
Section titled “Parameters”int no : IN (Symbol number)
Return Value
Section titled “Return Value”- != NULL : Symbol name, Null-terminated string
- Same as the name specified in the S-52 standard document
- == NULL : Fail (Incorrect symbol number)
hencDrawEncSymbol
Section titled “hencDrawEncSymbol”Prototype
Section titled “Prototype”int hencDrawEncSymbol( LPCTSTR name )Function
Section titled “Function”Display the S-52 symbol on the screen.
Parameters
Section titled “Parameters”- const char *name : IN (Null-terminated string)
- Same as the name specified in the S-52 standard document
Return Value
Section titled “Return Value”- = 0 : Success
- < 0 : Fail
hencDrawEncSymbolAtGlPos
Section titled “hencDrawEncSymbolAtGlPos”Prototype
Section titled “Prototype”int hencDrawEncSymbolAtGlPos( const char *name, double x, double y, double z, double angle = 0, double scale = 1.0 )Function
Section titled “Function”Display the S-52 symbol on the screen.
Parameters
Section titled “Parameters”- 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)
Return Value
Section titled “Return Value”- = 0 : Success
- < 0 : Fail
hencDrawEncSymbolAtWinPos
Section titled “hencDrawEncSymbolAtWinPos”Prototype
Section titled “Prototype”int hencDrawEncSymbolAtWinPos( const char *name, double x, double y )Function
Section titled “Function”Display the S-52 symbol on the screen.
Parameters
Section titled “Parameters”- 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)
Return Value
Section titled “Return Value”- = 0 : Success
- < 0 : Fail
hencDrawEncSymbolAtMapPos
Section titled “hencDrawEncSymbolAtMapPos”Prototype
Section titled “Prototype”int hencDrawEncSymbolAtMapPos( const char *name, double x, double y )Function
Section titled “Function”Display the S-52 symbol on the screen.
Parameters
Section titled “Parameters”- 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)
Return Value
Section titled “Return Value”- = 0 : Success
- < 0 : Fail
hencGetEncLineCount
Section titled “hencGetEncLineCount”Prototype
Section titled “Prototype”int hencGetEncLineCount()Function
Section titled “Function”Obtain the number of available S-52 Complex Lines.
Parameters
Section titled “Parameters”None
Return Value
Section titled “Return Value”Number of Complex Lines available in the library
hencGetEncLineName
Section titled “hencGetEncLineName”Prototype
Section titled “Prototype”const char *hencGetEncLineName( int no )Function
Section titled “Function”Obtain the name of the string for the S-52 Complex Line number.
Parameters
Section titled “Parameters”int no : IN (Complex Line number)
Return Value
Section titled “Return Value”- != NULL : String of Complex Line number, Null-terminated string
- Same as the name specified in the S-52 standard document
- == NULL : Fail (Incorrect number)
hencDrawEncLineAtGlPos
Section titled “hencDrawEncLineAtGlPos”Prototype
Section titled “Prototype”int hencDrawEncLineAtGlPos( LPCTSTR name, double x1, double y1, double x2, double y2, double z )Function
Section titled “Function”Display the S-52 complex line on the screen.
Parameters
Section titled “Parameters”- 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)
Return Value
Section titled “Return Value”- = 0 : Success
- < 0 : Fail
hencDrawEncLineAtWinPos
Section titled “hencDrawEncLineAtWinPos”Prototype
Section titled “Prototype”int hencDrawEncLineAtWinPos( LPCTSTR name, double x1, double y1, double x2, double y2, double z )Function
Section titled “Function”Display the S-52 complex line on the screen.
Parameters
Section titled “Parameters”- 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)
Return Value
Section titled “Return Value”- = 0 : Success
- < 0 : Fail
hencDrawEncLineAtMapPos
Section titled “hencDrawEncLineAtMapPos”Prototype
Section titled “Prototype”int hencDrawEncLineAtMapPos( LPCTSTR name, double x1, double y1, double x2, double y2, double z )Function
Section titled “Function”Display the S-52 complex line on the screen.
Parameters
Section titled “Parameters”- 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)
Return Value
Section titled “Return Value”- = 0 : Success
- < 0 : Fail
hencGetEncPatternCount
Section titled “hencGetEncPatternCount”Prototype
Section titled “Prototype”int hencGetEncPatternCount()Function
Section titled “Function”Obtain the number of available S-52 Fill patterns.
Parameters
Section titled “Parameters”None
Return Value
Section titled “Return Value”Number of Fill patterns available in the library
hencGetEncPatternName
Section titled “hencGetEncPatternName”Prototype
Section titled “Prototype”const char * hencGetEncPatternName( int no )Function
Section titled “Function”Obtain the string name for S-52 Fill pattern number.
Parameters
Section titled “Parameters”int no : IN (Fill pattern number)
Return Value
Section titled “Return Value”- != NULL : String of pattern number, Null-terminated string
- Same as the name specified in the S-52 standard document
- == NULL : Fail (Incorrect pattern number)
hencDrawEncPatternFillAtGlPos
Section titled “hencDrawEncPatternFillAtGlPos”Prototype
Section titled “Prototype”int hencDrawEncPatternFillAtGlPos( LPCTSTR name, int cntPts, double *x, double *y, double z )Function
Section titled “Function”Fill the given area with the S-52 fill pattern.
Parameters
Section titled “Parameters”- 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)
Return Value
Section titled “Return Value”- = 0 : Success
- < 0 : Fail
hencDrawEncPatternFillAtWinPos
Section titled “hencDrawEncPatternFillAtWinPos”Prototype
Section titled “Prototype”int hencDrawEncPatternFillAtWinPos( LPCTSTR name, int cntPts, double *x, double *y )Function
Section titled “Function”Fill the given area with the S-52 fill pattern.
Parameters
Section titled “Parameters”- 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)
Return Value
Section titled “Return Value”- = 0 : Success
- < 0 : Fail
hencDrawEncPatternFillAtMapPos
Section titled “hencDrawEncPatternFillAtMapPos”Prototype
Section titled “Prototype”int hencDrawEncPatternFillAtMapPos( LPCTSTR name, int cntPts, double *x, double *y )Function
Section titled “Function”Fill the given area with the S-52 fill pattern.
Parameters
Section titled “Parameters”- 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)
Return Value
Section titled “Return Value”- = 0 : Success
- < 0 : Fail
hencGetColor
Section titled “hencGetColor”Prototype
Section titled “Prototype”COLORREF hencGetColor( EEncColor color )Function
Section titled “Function”- Refer S-52 Color
Parameters
Section titled “Parameters”EEncColor color : IN (S-52 color code value)
Return Value
Section titled “Return Value”RGB value
Prototype
Section titled “Prototype”COLORREF hencGetColor( EEncColorset setNo, EEncColor color )Function
Section titled “Function”- Refer S-52 Color
Parameters
Section titled “Parameters”- EEncColorset setNo : Specify the color you want to acquire
- EEncColor color : IN (S-52 color code value)
Return Value
Section titled “Return Value”RGB value
Prototype
Section titled “Prototype”COLORREF hencGetColor( const char *acronym )Function
Section titled “Function”- Refer S-52 Color
Parameters
Section titled “Parameters”const char *acronym : IN (S-52 color acronym string)
Return Value
Section titled “Return Value”RGB value
hencGetColorName
Section titled “hencGetColorName”Prototype
Section titled “Prototype”const char * hencGetColorName( EEncColor color )Function
Section titled “Function”Obtain an acronym corresponding to the color code.
Parameters
Section titled “Parameters”EEncColor color : IN (S-52 color code)
Return Value
Section titled “Return Value”- != NULL : S-52 color acronym string
- == NULL : Fail (Incorrect string)
hencGetPrimName
Section titled “hencGetPrimName”Prototype
Section titled “Prototype”const char * hencGetPrimName( EObjectPrimitiveType t )Function
Section titled “Function”- Refer the S-57 ENC Object Primitive Type
Parameters
Section titled “Parameters”EObjectPrimitiveType t : IN (S-57 ENC Object Primitive Type)
Return Value
Section titled “Return Value”- != NULL : String
- == NULL : Fail
hencGetObjectName
Section titled “hencGetObjectName”Prototype
Section titled “Prototype”const char * hencGetObjectName( EEncObject obj )Function
Section titled “Function”Obtains the acronym string corresponding to the S-57 Feature Object Code.
Parameters
Section titled “Parameters”EEncObject obj : IN (S-57 Feature Object Code)
Return Value
Section titled “Return Value”- != NULL : String
- == NULL : Fail
hencGetObjectDesc
Section titled “hencGetObjectDesc”Prototype
Section titled “Prototype”const char * hencGetObjectDesc( EEncObject obj )Function
Section titled “Function”Obtains the description string corresponding to the S-57 Feature Object Code.
Parameters
Section titled “Parameters”EEncObject obj : IN (S-57 Feature Object Code)
Return Value
Section titled “Return Value”- != NULL : String
- == NULL : Fail
hencGetAttrName
Section titled “hencGetAttrName”Prototype
Section titled “Prototype”const char * hencGetAttrName( EEncAttr attr )Function
Section titled “Function”Obtain the acronym string corresponding to S-57 Feature Attribute Code.
Parameters
Section titled “Parameters”EEncAttr attr : IN (S-57 Feature Attribute Code)
Return Value
Section titled “Return Value”- != NULL : String
- == NULL : Fail
hencEnumAttr
Section titled “hencEnumAttr”Prototype
Section titled “Prototype”EEncAttr hencEnumAttr( const char *acronym )Function
Section titled “Function”Obtain the code value corresponding to S-57 feature attribute acronym.
Parameters
Section titled “Parameters”const char *acronym : IN (S-57 feature attribute acronym string)
Return Value
Section titled “Return Value”S-57 Feature Attribute Code
hencEnumObjectName
Section titled “hencEnumObjectName”Prototype
Section titled “Prototype”EEncObject hencEnumObjectName( const char *acronym )Function
Section titled “Function”Obtain the code value corresponding to S-57 feature attribute acronym.
Parameters
Section titled “Parameters”const char *acronym : IN (S-57 Feature Object acronym string)
Return Value
Section titled “Return Value”S-57 Feature Object Code