henc — kernel
Core ENC kernel functions — initialization, view creation, chart loading, display, pan/zoom/rotate, layer control
hencInit
Section titled “hencInit”Prototype
Section titled “Prototype”int hencInit()Function
Section titled “Function”- Load S-52 data file.
- Load user settings(data\encoptions.ini).
Parameters
Section titled “Parameters”None
Return Value
Section titled “Return Value”- = 0 : Initialization Success
- < 0 : Initialization Fail
hencDeinit
Section titled “hencDeinit”Prototype
Section titled “Prototype”int hencDeinit()Function
Section titled “Function”- Remove all S-52 data files.
- Delete memory and data associated with the library
- Save current settings.
Parameters
Section titled “Parameters”None
Return Value
Section titled “Return Value”- = 0 : Success
- < 0 : Fail
hencLoad
Section titled “hencLoad”Prototype
Section titled “Prototype”int hencLoad( const char *fn, bool flagLoadUpdate = true )Function
Section titled “Function”- After loading the ENC cell file, convert it to SENC format.
- Load the ENC catalog files and then load multiple ENC files.
- Load the SENC files.
- After loading the SENC catalog file, convert it to SENC format and load it into memory.
- After loading the shape files, load multiple ENC files.
Parameters
Section titled “Parameters”const char *fn : IN (Filename to load)
Return Value
Section titled “Return Value”- = 0 : Success
- < 0 : Fail
hencLoadENCintoDom
Section titled “hencLoadENCintoDom”Prototype
Section titled “Prototype”int hencLoadENCintoDom( const char *fn, CDomNode *node )Function
Section titled “Function”- Load ENC files into memory in CDomNode format.
- Map information is not generated but only file contents are read.
- Only the ENC file or Dom file that stores the ENC is available.
Parameters
Section titled “Parameters”- const char *fn : IN (filename to read)
- CDomNode *node : IN, OUT (storage)
Return Value
Section titled “Return Value”-
= 0 : Read Success
- < 0 : Read Fail
hencIsUpdateENC
Section titled “hencIsUpdateENC”Prototype
Section titled “Prototype”int hencIsUpdateENC( CDomNode *node )Function
Section titled “Function”Check whether the map information is UpdateENC.
Parameters
Section titled “Parameters”- ENC information, It only works if it is a CDomNode read from a function.
Return Value
Section titled “Return Value”- == 0 : When it is judged as Update ENC
- != 0 : When it is judged as not Update ENC
hencGetEncVersion
Section titled “hencGetEncVersion”Prototype
Section titled “Prototype”int hencGetEncVersion( CDomNode *node, int &major, int &minor )Function
Section titled “Function”Load the ENC file version of the map information loaded with . It is used when comparing ENC files or comparing patch versions.
Parameters
Section titled “Parameters”- ENC Information, It must be a CDomNode read from the function to work correctly.
Return Value
Section titled “Return Value”= 0 : Success < 0 : Fail
hencUpdateENCDom
Section titled “hencUpdateENCDom”Prototype
Section titled “Prototype”int hencUpdateENCDom( CDomNode *nodeBase, CDomNode *nodeUpdate )Function
Section titled “Function”Patch the S-57 file with two ENC files loaded with the function.
Parameters
Section titled “Parameters”- CDomNode *nodeBase : IN (BASE ENC)
- CDomNode *nodeUpdate : IN (UPDATE ENC)
Return Value
Section titled “Return Value”-
= 0 : Success
- < 0 : Fail
hencLoadDom
Section titled “hencLoadDom”Prototype
Section titled “Prototype”int hencLoadDom( CDomNode *node )Function
Section titled “Function”- Read map information from data with CDomNode format.
- It must be a CDomNode read from the to work correctly.
Parameters
Section titled “Parameters”CDomNode *node : IN, OUT (storage)
Return Value
Section titled “Return Value”-
= 0 : Read Success
- < 0 : Read Fail
hencSave
Section titled “hencSave”Prototype
Section titled “Prototype”int hencSave( const char *fn )Function
Section titled “Function”- All loaded map information is saved as CATALOG.SENC and SENC file for each map cell.
- The individual map cell file is stored in the same directory path as the CATALOG file.
Parameters
Section titled “Parameters”const char *fn : IN (CATALOG file name)
Return Value
Section titled “Return Value”- = 0 : Success
- < 0 : Fail
hencLoadFileListFromCatalogFile
Section titled “hencLoadFileListFromCatalogFile”Prototype
Section titled “Prototype”int hencLoadFileListFromCatalogFile( const char *fn, list &filelist )Function
Section titled “Function”Get a list of files from an ENC or SENC Catalog file.
Parameters
Section titled “Parameters”- const char *fn : IN (catalog file name)
- list &filelist : OUT (list of files)
Return Value
Section titled “Return Value”- = 0 : Success
- < 0 : Fail
hencSaveCatalogSENC
Section titled “hencSaveCatalogSENC”Prototype
Section titled “Prototype”int hencSaveCatalogSENC( const char *fn )Function
Section titled “Function”Only the Catalog SENC file of the loaded map is saved, not the cell file.
Parameters
Section titled “Parameters”const char *fn : IN (Name of catalog file to be saved)
Return Value
Section titled “Return Value”- = 0 : Success
- < 0 : Fail
hencEncfileSaveToSENC
Section titled “hencEncfileSaveToSENC”Prototype
Section titled “Prototype”int hencEncfileSaveToSENC( int no, const char *dirSave )Function
Section titled “Function”- Save the individual map cell file as a SENC file. At this time, the stored file name is used as the loaded file name.
- Only the features set to ObjMask are saved.
- See hencSetObjMask().
Parameters
Section titled “Parameters”- int no : IN
- Number of map cell to store
- When loading map cells, they are numbered sequentially from 0th.
- By using functions such as and , you can know the already loaded file name and number.
- const char *dirSave : IN (directory name to save)
Return Value
Section titled “Return Value”- = 0 : Success
- < 0 : Fail
hencEncfileToDom
Section titled “hencEncfileToDom”Prototype
Section titled “Prototype”int hencEncfileToDom( int no, CDomNode &dom )Function
Section titled “Function”Copy the information of the individual map cell file. Only the features set to ObjMask are saved when saved. See hencSetObjMask(). You can use internal information through the class CDomNode.
Parameters
Section titled “Parameters”- Number of map cell to store
- Map cells are numbered from 0 in the order they are loaded.
- By using functions such as and , you can know the already loaded file name and number.
Return Value
Section titled “Return Value”= 0 : Success < 0 : Fail
hencEncfileSaveToMem
Section titled “hencEncfileSaveToMem”Prototype
Section titled “Prototype”int hencEncfileSaveToMem( int no, LPVOID &ptr, int &size )Function
Section titled “Function”Store and copy the information of the individual map cell file into memory with SENC. Only the features set to ObjMask are saved when saved. See .
Parameters
Section titled “Parameters”- Number of map cell to store
- Map cells are numbered from 0 in the order they are loaded.
- By using functions such as and , you can know the already loaded file name and number.
Return Value
Section titled “Return Value”= 0 : Success < 0 : Fail
hencEncfileLoadFromMem
Section titled “hencEncfileLoadFromMem”Prototype
Section titled “Prototype”int hencEncfileLoadFromMem( LPVOID ptr, int size )Function
Section titled “Function”Read SENC from memory.
Parameters
Section titled “Parameters”LPVOID ptr : IN (SENC storage memory) int size : IN (size of SENC information)
Return Value
Section titled “Return Value”= 0 : Success < 0 : Fail
hencUnload
Section titled “hencUnload”Prototype
Section titled “Prototype”int hencUnload( const char *fn )Function
Section titled “Function”Remove the map loaded with the filename from memory.
Parameters
Section titled “Parameters”- Must be the same as the file name given in the (int no).
- At this time, the file name does not include a path.
Return Value
Section titled “Return Value”= 0 : Success < 0 : Fail
Prototype
Section titled “Prototype”int hencUnload( int idx )Function
Section titled “Function”Delete the map loaded with that number from memory.
Parameters
Section titled “Parameters”int idx : IN (map number)
Return Value
Section titled “Return Value”= 0 : Success < 0 : Fail
hencUnloadAll
Section titled “hencUnloadAll”Prototype
Section titled “Prototype”int hencUnloadAll()Function
Section titled “Function”Delete loaded all map information from memory.
Parameters
Section titled “Parameters”None
Return Value
Section titled “Return Value”= 0 : Success < 0 : Fail
hencEncfileSetLimit
Section titled “hencEncfileSetLimit”Prototype
Section titled “Prototype”int hencEncfileSetLimit( int cnt )Function
Section titled “Function”Limit the number of map cells loaded into memory. This can be used to create a demo version program.
Parameters
Section titled “Parameters”int cnt : IN (maximum number of cells)
Return Value
Section titled “Return Value”= 0 : Success < 0 : Fail
hencEncfileGetCount
Section titled “hencEncfileGetCount”Prototype
Section titled “Prototype”int hencEncfileGetCount()Function
Section titled “Function”Gets the number of map cells loaded into memory.
Parameters
Section titled “Parameters”None
Return Value
Section titled “Return Value”Number of map cells loaded
hencEncfileGetName
Section titled “hencEncfileGetName”Prototype
Section titled “Prototype”const char *hencEncfileGetName( int no )Function
Section titled “Function”Obtain the filename of the loaded map cell.
Parameters
Section titled “Parameters”- Map cells are numbered from 0 in the order they are loaded.
Return Value
Section titled “Return Value”!= NULL : File name (Null-terminated string) == NULL : File name acquisition failed (file number not existing)
hencEncfileGetInfo
Section titled “hencEncfileGetInfo”Prototype
Section titled “Prototype”int hencEncfileGetInfo( int no, CDomNode &dom )Function
Section titled “Function”Acquires the file name and area information of the corresponding ENC.
Parameters
Section titled “Parameters”int no : IN (ENC number to acquire information) CDomNode &dom : OUT (Save file name and area information)
Return Value
Section titled “Return Value”= 0 : Success < 0 : Fail
hencIsENCFile
Section titled “hencIsENCFile”Prototype
Section titled “Prototype”bool hencIsENCFile( const char *fn )Function
Section titled “Function”Check that the input file is an S-57 ENC file.
Parameters
Section titled “Parameters”const char *fn : IN (inspection filename)
Return Value
Section titled “Return Value”true : If the ENC file is correct false : If it is an error or not ENC file
hencIsSENCFile
Section titled “hencIsSENCFile”Prototype
Section titled “Prototype”bool hencIsSENCFile( const char *fn )Function
Section titled “Function”Check that the input file is an hns SENC file.
Parameters
Section titled “Parameters”const char *fn : IN (inspection filename)
Return Value
Section titled “Return Value”true : If the SENC file is correct false : If it is an error or not SENC file
hencIsCatalogFile
Section titled “hencIsCatalogFile”Prototype
Section titled “Prototype”bool hencIsCatalogFile( const char *fn )Function
Section titled “Function”Check whether the file is a catalog file of ENC or SENC. And checks whether the file name is CATALOG.
Parameters
Section titled “Parameters”const char *fn : IN (inspection filename)
Return Value
Section titled “Return Value”true : Scan is successful (if the catalog file is correct) false : Check failed or error (if the catalog file does not match)
hencIsShapeFile
Section titled “hencIsShapeFile”Prototype
Section titled “Prototype”bool hencIsShapeFile( const char *fn )Function
Section titled “Function”Checks whether the file is a Shape file and confirms the extension of the file name.
Parameters
Section titled “Parameters”const char *fn : IN (inspection filename)
Return Value
Section titled “Return Value”true : Scan is successful. (if the shape file is correct) false : Check failed or error. (if the shape file does not match)
hencEncStringToMBC
Section titled “hencEncStringToMBC”Prototype
Section titled “Prototype”char *hencEncStringToMBC( const char *str )Function
Section titled “Function”It is used to decode a binary string used for storing ENC information loaded by and convert it into a multi-byte code.
Parameters
Section titled “Parameters”const char *str : IN (Encoded string)
Return Value
Section titled “Return Value”!= NULL : Converted string (Caller must free memory) == NULL : Conversion fail
The binary string that stores the ENC information has an encoding type and a binary string. It is a format for supporting the string encoding of the S-57 standard.
hencCreate
Section titled “hencCreate”Prototype
Section titled “Prototype”int hencCreate( HWND hwnd )Function
Section titled “Function”- Create HGLRC and HDC, which are information to be used for map display window.
- To use the OpenGL API, you must have a display window.
- All APIs related to the exhibition should be prepared for display via the function, and must be called after using the function before use.
- When displaying in multiple windows, use function to distinguish the window to be displayed. However, the display setting works with a single setting, and can not be set separately for each window.
Parameters
Section titled “Parameters”HWND : IN (display window)
Return Value
Section titled “Return Value”= 0 : Success < 0 : Fail
hencDelete
Section titled “hencDelete”Prototype
Section titled “Prototype”int hencDelete( HWND wnd )Function
Section titled “Function”Delete the generated HGLRC and HDC to display the map on HWND hwnd.
Parameters
Section titled “Parameters”HWND : IN (Display window)
Return Value
Section titled “Return Value”= 0 : Success < 0 : Fail
hencGetGLRC
Section titled “hencGetGLRC”Prototype
Section titled “Prototype”HGLRC hencGetGLRC( HWND hwnd )Function
Section titled “Function”Obtain the HGLRC corresponding to the specified window.
Parameters
Section titled “Parameters”HWND : IN (Display window)
Return Value
Section titled “Return Value”!= NULL : HGLRC == NULL : Failure (no information about display window)
hencGetDC
Section titled “hencGetDC”Prototype
Section titled “Prototype”HDC hencGetDC( HWND hwnd )Function
Section titled “Function”Obtain the HDC used for the specified HWND window.
Parameters
Section titled “Parameters”HWND : IN (display window)
Return Value
Section titled “Return Value”!= NULL : HDC == NULL : Failure (no information about display window)
Prototype
Section titled “Prototype”HDC hencGetDC()Function
Section titled “Function”Obtain the HDC used for the current display window.
Parameters
Section titled “Parameters”None
Return Value
Section titled “Return Value”!= NULL : HDC == NULL : Failure (no current window)
hencSelect
Section titled “hencSelect”Prototype
Section titled “Prototype”int hencSelect( HWND hwnd )Function
Section titled “Function”Specify the map display target window.
Parameters
Section titled “Parameters”HWND : IN (Display target window)
Return Value
Section titled “Return Value”= 0 : Success < 0 : Fail
hencGetHwnd
Section titled “hencGetHwnd”Prototype
Section titled “Prototype”HWND hencGetHwnd( )Function
Section titled “Function”Obtain the window handle of the set display object window.
Parameters
Section titled “Parameters”None
Return Value
Section titled “Return Value”!= NULL : HWND (Handle value of display target window) == NULL : Failure (No display target window)
hencClearBackground
Section titled “hencClearBackground”Prototype
Section titled “Prototype”int hencClearBackground()Function
Section titled “Function”Clear the entire OpenGL display buffer in the currently selected display window. Therefore, the previously drawn map contents are deleted and can not be reused. It is a function to erase only the display buffer of OpenGL, so the screen of the current window is not affected. Need function
Parameters
Section titled “Parameters”None
Return Value
Section titled “Return Value”= 0 : Success < 0 : Failure
hencSetViewport
Section titled “hencSetViewport”Prototype
Section titled “Prototype”int hencSetViewport( int x, int y, int w, int h )Function
Section titled “Function”Specifies the map area of the display buffer. Need hencSelect() function.
Parameters
Section titled “Parameters”int x : IN (WinPos, Window coordinate system, Specify the upper left corner of the display area) int y : IN (WinPos, Window coordinate system, Specify the upper left corner of the display area) int w : IN (WinPos, Window coordinate system, Specify the width of the display area) int h : IN (WinPos, Window coordinate system, Specify the height of the display area)
Return Value
Section titled “Return Value”= 0 : Success < 0 : Fail
hencClearViewport
Section titled “hencClearViewport”Prototype
Section titled “Prototype”int hencClearViewport()Function
Section titled “Function”Delete the contents of the display buffer only by the area specified by . If you are using multiple Viewports() function, you should use this function to partially clear the display buffer without using function. Need function.
Parameters
Section titled “Parameters”None
Return Value
Section titled “Return Value”= 0 : Success < 0 : Fail
hencRender
Section titled “hencRender”Prototype
Section titled “Prototype”int hencRender()Function
Section titled “Function”- Draw a map in the map area of the display buffer. It is a function that returns after drawing the whole map according to the current setting, and it may take a long time depending on the capacity of the map. It is drawn only on the buffer and does not appear on the actual display screen.
- It will actually appear on the screen after the display function is called.
- Need function.
Parameters
Section titled “Parameters”None
Return Value
Section titled “Return Value”- = 0 : Success
- < 0 : Fail
hencRenderWaitFinish
Section titled “hencRenderWaitFinish”Prototype
Section titled “Prototype”int hencRenderWaitFinish()Function
Section titled “Function”- Due to the nature of OpenGL, it takes a certain amount of time because the picture is not completed immediately after it is drawn in the buffer. This is a function to wait until the drawing is completed. In most cases, the use of this function is unnecessary.
- Need function.
Parameters
Section titled “Parameters”None
Return Value
Section titled “Return Value”- = 0 : Success
- < 0 : Fail
hencRenderReset
Section titled “hencRenderReset”Prototype
Section titled “Prototype”int hencRenderReset()Function
Section titled “Function”- Prepare a partial drawing. Unlike the function, only the display preparation is performed.
- Need function.
Parameters
Section titled “Parameters”None
Return Value
Section titled “Return Value”- = 0 : Success
- < 0 : Fail
hencRenderMore
Section titled “hencRenderMore”Prototype
Section titled “Prototype”int hencRenderMore()Function
Section titled “Function”- Draw only one element of the entire map drawing process. That is, the result is returned in a short time because it provides a partial drawing. By calling this function repeatedly, the entire drawing process can be progressed and completed in sequence.
- Need and function.
Parameters
Section titled “Parameters”None
Return Value
Section titled “Return Value”-
0 : Success in drawing one element (if more drawing elements remain)
- = 0 : Success in drawing one element (If the entire drawing is complete)
- < 0 : Fail
hencRenderStop
Section titled “hencRenderStop”Prototype
Section titled “Prototype”int hencRenderStop()Function
Section titled “Function”- The partial drawing process is interrupted, and the temporary information generated during the process is deleted.
- At this time, the unfinished map image remains in the map buffer.
- Need and function.
Parameters
Section titled “Parameters”None
Return Value
Section titled “Return Value”-
= 0 : Success
- < 0 : Fail
hencRenderMoreTimed
Section titled “hencRenderMoreTimed”Prototype
Section titled “Prototype”int hencRenderMoreTimed( DWORD msec = 100 )Function
Section titled “Function”- It is the same function as , but it is a function that draws a number of elements in a certain time. When the specified time or more elapses, the function is automatically returned.
- Need and function.
Parameters
Section titled “Parameters”None
Return Value
Section titled “Return Value”-
0 : Success in drawing one element (if more drawing elements remain)
- = 0 : Success in drawing one element (If the entire drawing is complete)
- < 0 : Fail
hencSwapBuffer
Section titled “hencSwapBuffer”Prototype
Section titled “Prototype”int hencSwapBuffer()Function
Section titled “Function”- Displays the contents of the display buffer on the screen. This function uses the characteristics of OpenGL, and what is displayed on the actual screen is an asynchronous function that occurs after the point at which the function returns. Therefore, performance can be improved by making more use of the CPU. However, it should be noted that undesirable results may occur when drawing using HDC in a window.
- When this function is called, the contents of the map may be left in the display buffer or may remain erroneous. This may vary depending on the OpenGL device driver, and generally no map content remains.
- Need function.
- Available after full or partial map drawing
- Drawing a full map :
- Drawing partial map : , , , and so on
Parameters
Section titled “Parameters”None
Return Value
Section titled “Return Value”- = 0 : Success
- < 0 : Fail
hencCopyBuffer
Section titled “hencCopyBuffer”Prototype
Section titled “Prototype”int hencCopyBuffer()Function
Section titled “Function”- Copies the contents of the display buffer to the screen. This function copies and displays the contents of the display buffer as it is on the screen.
- It is a synchronous function that performs copying after waiting for OpenGL display to complete. Since the display is waiting for completion, the CPU utilization is lower than . However, HDC can be used to draw on the display screen.
- The contents of the previous map remain in the display buffer even after this function is called
- Need function.
- Available after full map drawing or partial map drawing process
- Drawing full map :
- Drawing partial map : , , , and so on
Parameters
Section titled “Parameters”None
Return Value
Section titled “Return Value”- = 0 : Success
- < 0 : Fail
hencEncfileIsRendered
Section titled “hencEncfileIsRendered”Prototype
Section titled “Prototype”bool hencEncfileIsRendered( int no )Function
Section titled “Function”It is determined whether or not a specific ENC file is partially displayed on the current screen.
Parameters
Section titled “Parameters”- Map cells are numbered from 0 in the order they are loaded.
Return Value
Section titled “Return Value”- true : It means that some or all are being displayed on the screen.
- false : It means that it is not included in the screen area
hencSetCenter
Section titled “hencSetCenter”Prototype
Section titled “Prototype”int hencSetCenter( double cx, double cy )Function
Section titled “Function”Used to specify the center point of map display.
Parameters
Section titled “Parameters”- double cx : IN (longitude, degree)
- double cy : IN (latitude, degree)
Return Value
Section titled “Return Value”- = 0 : Success
- < 0 : Fail
hencGetCenter
Section titled “hencGetCenter”Prototype
Section titled “Prototype”int hencGetCenter( double &cx, double &cy )Function
Section titled “Function”It is used to obtain the current map center point.
Parameters
Section titled “Parameters”- double &cx : OUT (longitude, degree)
- double &cy : OUT (latitude, degree)
Return Value
Section titled “Return Value”- = 0 : Success
- < 0 : Fail
hencGetCenterX
Section titled “hencGetCenterX”Prototype
Section titled “Prototype”double hencGetCenterX()Function
Section titled “Function”Obtain the longitude value of the current map center point.
Parameters
Section titled “Parameters”None
Return Value
Section titled “Return Value”Longitude value of the map center point
hencGetCenterY
Section titled “hencGetCenterY”Prototype
Section titled “Prototype”double hencGetCenterY()Function
Section titled “Function”Obtain the latitude value of the current map center point.
Parameters
Section titled “Parameters”None
Return Value
Section titled “Return Value”Latitude value of the map center point
hencSetZoom
Section titled “hencSetZoom”Prototype
Section titled “Prototype”int hencSetZoom( double scale )Function
Section titled “Function”- This function is used to specify the magnification ratio of the map. It specifies the ratio of one angle of latitude and longitude to one pixel of the screen.
- It works in conjunction with the function, only in units..
Parameters
Section titled “Parameters”scale : IN (magnification ratio)
Return Value
Section titled “Return Value”- = 0 : Success
- < 0 : Fail
hencGetZoom
Section titled “hencGetZoom”Prototype
Section titled “Prototype”double hencGetZoom()Function
Section titled “Function”- As a function that obtain zoom ratio of map, set the ratio between lat/lng 1 degree and 1 pixel in screen.
- It is linked with function, and there is only difference in unit.
Parameters
Section titled “Parameters”None
Return Value
Section titled “Return Value”Map zoom ratio value
hencGetScale
Section titled “hencGetScale”Prototype
Section titled “Prototype”double hencGetScale()Function
Section titled “Function”- This value is a value indicating the ratio of the actual distance to the pixel size on the actual screen specified by the function.
Parameters
Section titled “Parameters”None
Return Value
Section titled “Return Value”Scale value N in 1:N
hencSetScale
Section titled “hencSetScale”Prototype
Section titled “Prototype”int hencSetScale( double value )Function
Section titled “Function”- This function is used to specify the scale value of the map. It specifies the value of N in the map scale value expressed by 1: N.
- This value determines the reduction ratio of the screen by calculating the appropriate ratio from the pixel size on the actual screen specified by the or function.
- It is interlocked with the function, and only the units are different.
Parameters
Section titled “Parameters”value : IN (Scale)
Return Value
Section titled “Return Value”- = 0 : Success
- < 0 : Fail
hencSetRotation
Section titled “hencSetRotation”Prototype
Section titled “Prototype”int hencSetRotation( double deg )Function
Section titled “Function”Specify the angle of rotation of the map on the screen.
Parameters
Section titled “Parameters”deg : IN (CW, degree)
Return Value
Section titled “Return Value”- = 0 : Success
- < 0 : Fail
hencGetRotation
Section titled “hencGetRotation”Prototype
Section titled “Prototype”double hencGetRotation()Function
Section titled “Function”Obtain the angle of rotation of the map currently displayed on the screen.
Parameters
Section titled “Parameters”None
Return Value
Section titled “Return Value”Map rotation angle. CW(Unit: Degree)
hencSetMapArea
Section titled “hencSetMapArea”Prototype
Section titled “Prototype”int hencSetMapArea( double minx, double miny, double maxx, double maxy )Function
Section titled “Function”Set the map scale value so that the area of the specified square block is displayed in the map display area. At this time, the rotation value is set to zero.
Parameters
Section titled “Parameters”- double minx : IN (longitude, Minimum longitude value in the area)
- double miny : IN (latitude, Minimum latitude value in the area값)
- double maxx : IN (longitude, Maximum longitude value in the area)
- double maxy : IN (latitude, Maximum latitude value in the area)
Return Value
Section titled “Return Value”- = 0 : Success
- < 0 : Fail
hencGetMapArea
Section titled “hencGetMapArea”Prototype
Section titled “Prototype”int hencGetMapArea( double &minx, double &miny, double &maxx, double &maxy )Function
Section titled “Function”Obtains the latitude and longitude coordinates of the map currently displayed on the screen.
Parameters
Section titled “Parameters”- double &minx : OUT (longitude, Minimum longitude value in the area)
- double &miny : OUT (latitude, Minimum latitude value in the area)
- double &maxx : OUT (longitude, Maximum longitude value in the area)
- double &maxy : OUT (latitude, Maximum latitude value in the area)
Return Value
Section titled “Return Value”- = 0 : Success
- < 0 : Fail
The value obtained by this function may be different from the value set by function.
hencSetMapParameter
Section titled “hencSetMapParameter”Prototype
Section titled “Prototype”int hencSetMapParameter( double cx, double cy, double zoom, double rotation)Function
Section titled “Function”- Center coordinates, magnification ratio, and rotation are set at once.
Parameters
Section titled “Parameters”- double cx : IN (Center longitude of display area, degree)
- double cy : IN (Center latitude of display area, degree)
- double zoom : IN (Map scaling rate, Ratio of 1 latitude to 1 pixel on screen)
- double rotation : IN (Map rotation angle, CW, degree)
Return Value
Section titled “Return Value”- = 0 : Success
- < 0 : Fail
hencGetMapParameter
Section titled “hencGetMapParameter”Prototype
Section titled “Prototype”int hencGetMapParameter( double &cx, double &cy, double &zoom, double &rotation )Function
Section titled “Function”Obtains screen settings collectively.
Parameters
Section titled “Parameters”- double &cx : OUT (Center longitude of display area, degree)
- double &cy : OUT (Center latitude of display area, degree)
- double &zoom : OUT (Map zoom ration, Ratio of 1 latitude to 1 pixel on screen)
- double &rotation : OUT (Map rotation angle, CW, degree)
Return Value
Section titled “Return Value”- = 0 : Success
- < 0 : Fail
hencIsMapRectInView
Section titled “hencIsMapRectInView”Prototype
Section titled “Prototype”bool hencIsMapRectInView( double minx, double miny, double maxx, double maxy )Function
Section titled “Function”It is checked whether or not the specified area is partially included in the display area.
Parameters
Section titled “Parameters”- double minx : IN (longitude, Minimum longitude value in the area)
- double miny : IN (latitude, Minimum latitude value in the area)
- double maxx : IN (longitude, Maximum longitude value in the area)
- double maxy : IN (latitude, Maximum latitude value in the area)
Return Value
Section titled “Return Value”- true : Indicates that the specified area is partially contained within the screen
- false : Indicates that the specified area is out of the screen
hencIsGlRectInView
Section titled “hencIsGlRectInView”Prototype
Section titled “Prototype”bool hencIsGlRectInView( double minx, double miny, double maxx, double maxy )Function
Section titled “Function”It is checked whether or not the specified area is partially included in the display area.
Parameters
Section titled “Parameters”- double minx : IN (GIPos, Minimum x value in the area)
- double miny : IN (GIPos, Minimum y value in the area)
- double maxx : IN (GIPos, Maximum x value in the area)
- double maxy : IN (GIPos, Maximum y value in the area)
Return Value
Section titled “Return Value”- true : Indicates that the specified area is partially contained within the screen
- false : Indicates that the specified area is out of the screen
hencGetMapLevelMask
Section titled “hencGetMapLevelMask”Prototype
Section titled “Prototype”DWORD hencGetMapLevelMask()Function
Section titled “Function”- The ENC map has six map levels. This function obtains a flag value indicating whether or not the current map is displayed for each level. That is, the display setting value for each level is obtained.
- For each level, the bit values of LSBs 0 to 5 correspond to 1 to 6 S-57 codes. Depending on the value of each bit, the corresponding level is not displayed or displayed on the screen.
- 0 : not display, 1: display
Parameters
Section titled “Parameters”None
Return Value
Section titled “Return Value”Bit Mask per each level
hencSetMapLevelMask
Section titled “hencSetMapLevelMask”Prototype
Section titled “Prototype”void hencSetMapLevelMask( DWORD mask )Function
Section titled “Function”- This function sets whether to display the map by level. Whether or not to set an display for each map level is specified in the form of a bit mask.
- For each level, the bit values of LSBs 0 to 5 correspond to 1 to 6 S-57 codes. Depending on the value of each bit, the level does not display or display the map on the screen.
- If it is 0, it is not displayed. If it is 1, it is displayed.
Parameters
Section titled “Parameters”- Levels 0 ~ 5 correspond to S-57 Code 1 ~ 6 and decide whether each map is displayed or not.
Return Value
Section titled “Return Value”None
Remarks
Section titled “Remarks”- When the electronic chart is loaded, the level value is set to the value of L when the file name of the map cell is xxLxxxxx.xxx. This value can be set from 1 to 6 as S-57 code value. The internally stored level value is set to one less than the S-57 code value.
- (Ex) Level 0 = S-57 Code 1
- If the level value can not be checked, set it to “0”.
- Level 10 is treated separately as a top level, and is drawn at the top level of all maps.
- You can change the level value of the map with the result of the function.
hencEncfileGetVisible
Section titled “hencEncfileGetVisible”Prototype
Section titled “Prototype”int hencEncfileGetVisible( int no )Function
Section titled “Function”Checke whether the display is set for each map cell.
Parameters
Section titled “Parameters”int no : IN (Map number)
Return Value
Section titled “Return Value”-
0 : Display
- == 0 : Not display
- < 0 : Fail (Map number error)
Remarks
Section titled “Remarks”- See “Map File I / O” for details.
hencEncfileSetVisible
Section titled “hencEncfileSetVisible”Prototype
Section titled “Prototype”int hencEncfileSetVisible( int no, int isShow )Function
Section titled “Function”- If the flag is 0, the map cell is hidden from view on the screen.
Parameters
Section titled “Parameters”- int no : IN (Map number)
- int isShow : IN (0 : Not display, 1 : Display)
Return Value
Section titled “Return Value”- = 0 : Success
- < 0 : Fail
hencEncfileSetLevel
Section titled “hencEncfileSetLevel”Prototype
Section titled “Prototype”int hencEncfileSetLevel( int no, int level )Function
Section titled “Function”- Change the level of the individual map file.
- When loading each map, the display level is determined according to the S-57 code value included in the file name.
- If the upper level (the higher the number) is overlapped with the lower level map, the upper level map will cover the lower level map.
Parameters
Section titled “Parameters”- int no : IN (Map number)
- int level : IN (Map level, 0~5 or available up to 10)
Return Value
Section titled “Return Value”- = 0 : Success
- < 0 : Fail
hencEncfileGetLevel
Section titled “hencEncfileGetLevel”Prototype
Section titled “Prototype”int hencEncfileGetLevel( int no )Function
Section titled “Function”Obtain the currently configured level value of the map file (Map File).
Parameters
Section titled “Parameters”int no : IN (Map number)
Return Value
Section titled “Return Value”- 0~5 or 10 : Success (Level value)
- < 0 : Fail
hencEncfileSetBottom
Section titled “hencEncfileSetBottom”Prototype
Section titled “Prototype”int hencEncfileSetBottom( int no )Function
Section titled “Function”Set a specific map cell to level 0 so that it is drawn on the lower layer of another map on the screen.
Parameters
Section titled “Parameters”None
Return Value
Section titled “Return Value”- = 0 : Success
- < 0 : Fail
hencEncfileSetTopMost
Section titled “hencEncfileSetTopMost”Prototype
Section titled “Prototype”int hencEncfileSetTopMost( int no )Function
Section titled “Function”Designate a specific map cell at level 10 so that it is drawn on the upper layer of another map on the screen.
Parameters
Section titled “Parameters”None
Return Value
Section titled “Return Value”- = 0 : Success.
- < 0 : Fail
hencEncfileSetScaleForTopmost
Section titled “hencEncfileSetScaleForTopmost”Prototype
Section titled “Prototype”int hencEncfileSetScaleForTopmost( int scale )Function
Section titled “Function”- That is, this can be applied to a purpose of using a map that is additionally overlayed on an existing electronic chart.
Parameters
Section titled “Parameters”- 0 : Always display
-
0 : Display when N value is lower than scale on 1:N scale
Return Value
Section titled “Return Value”- = 0 : Success
- < 0 : Fail
hencSetObjMask
Section titled “hencSetObjMask”Prototype
Section titled “Prototype”int hencSetObjMask( EEncObject obj, bool flag )Function
Section titled “Function”Specifies whether to display the ENC Feature Object by type.
Parameters
Section titled “Parameters”- EEncObject obj : IN (ENC Feature Object Code)
- Refer the chapter 2.23.1 S-57 Feature Object Catalog< in API reference manual/li>
- bool flag : IN
- true : Display
- false : Do not display
Return Value
Section titled “Return Value”- = 0 : Success
- < 0 : Fail
hencGetObjMask
Section titled “hencGetObjMask”Prototype
Section titled “Prototype”bool hencGetObjMask( EEncObject obj )Function
Section titled “Function”Obtains the display mask of each ENC Feature Object.
Parameters
Section titled “Parameters”- Refer S-57 Feature Object Catalog in chapter 2.23.1 in API reference manual
Return Value
Section titled “Return Value”- true : Display
- false : Not display
hencSetPixelSize
Section titled “hencSetPixelSize”Prototype
Section titled “Prototype”int hencSetPixelSize( double meter )Function
Section titled “Function”- Specifies the size of the screen pixels used to scale the map. (Unit : Meter)
- It is interlocked with the function, and only the units are different.
Parameters
Section titled “Parameters”double meter : IN (1 pixel size of screen기, meter)
Return Value
Section titled “Return Value”- = 0 : Success
- < 0 : Fail
Remarks
Section titled “Remarks”Default setting : 0.000265 ~= 96DPI
hencSetPixelDPI
Section titled “hencSetPixelDPI”Prototype
Section titled “Prototype”int hencSetPixelDPI( int dpi )Function
Section titled “Function”- Specifies the size of the screen pixels used to scale the map. (Unit : Number of pixels, DPI)
- It is interlocked with function and there is only difference in unit.
Parameters
Section titled “Parameters”int dpi : IN (Pixels per inch of screen, DPI)
Return Value
Section titled “Return Value”- = 0 : Success
- < 0 : Fail
Remarks
Section titled “Remarks”Default setting : 0.000265 ~= 96DPI
hencGetPixelSize
Section titled “hencGetPixelSize”Prototype
Section titled “Prototype”double hencGetPixelSize()Function
Section titled “Function”It converts the size value of 1 pixel of the screen into metric unit and returns it.
Parameters
Section titled “Parameters”None
Return Value
Section titled “Return Value”Size value corresponding to 1 pixel of the screen (meter unit)
Remarks
Section titled “Remarks”Default setting : 0.000265 ~= 96DPI
hencGetPixelDPI
Section titled “hencGetPixelDPI”Prototype
Section titled “Prototype”int hencGetPixelDPI()Function
Section titled “Function”Converts the size value of 1 pixel of the screen into DPI unit and returns it.
Parameters
Section titled “Parameters”None
Return Value
Section titled “Return Value”Screen DPI value
Remarks
Section titled “Remarks”Default setting : 0.000265 ~= 96DPI
hencGetSymbolScale
Section titled “hencGetSymbolScale”Prototype
Section titled “Prototype”double hencGetSymbolScale()Function
Section titled “Function”Obtains the size values of S-52 Symbol, Pattern, Line and so on.
Parameters
Section titled “Parameters”None
Return Value
Section titled “Return Value”Symbol scale value
hencSetSymbolScale
Section titled “hencSetSymbolScale”Prototype
Section titled “Prototype”int hencSetSymbolScale( double scale )Function
Section titled “Function”Specify the size value of the S-52’s Symbol, Pattern, Line, and so on. Depending on the ratio of these values, each symbol, pattern, and line change at the same rate.
Parameters
Section titled “Parameters”double scale : IN (Symbol Scale)
Return Value
Section titled “Return Value”- = 0 : Success
- < 0 : Fail
Remarks
Section titled “Remarks”Default setting : 0.033333 ~= 96DPI
hencIsAutoScaleToZoom
Section titled “hencIsAutoScaleToZoom”Prototype
Section titled “Prototype”bool hencIsAutoScaleToZoom()Function
Section titled “Function”Confirm whether you are using the automatic magnification adjustment function when changing the latitude.
Parameters
Section titled “Parameters”None
Return Value
Section titled “Return Value”- true : Use auto scaling
- false : Do not use auto scaling
hencSetAutoScaleToZoom
Section titled “hencSetAutoScaleToZoom”Prototype
Section titled “Prototype”int hencSetAutoScaleToZoom( bool flag )Function
Section titled “Function”Confirm whether you are using the automatic magnification adjustment function when changing the latitude.
Parameters
Section titled “Parameters”- true : Use auto scaling
- false : Do not use auto scaling
Return Value
Section titled “Return Value”- = 0 : Success
- < 0 : Fail
hencIsMercator
Section titled “hencIsMercator”Prototype
Section titled “Prototype”bool hencIsMercator()Function
Section titled “Function”Check whether Mercator projection is used.
Parameters
Section titled “Parameters”None
Return Value
Section titled “Return Value”- true : Use Mercator projection
- false : Do not use Mercator projection
hencSetMercator
Section titled “hencSetMercator”Prototype
Section titled “Prototype”void hencSetMercator( bool flag )Function
Section titled “Function”Specifies whether to use the Mercator projection.
Parameters
Section titled “Parameters”- true : Use Mercator projection
- false : Do not use Mercator projection
Return Value
Section titled “Return Value”None
hencSetSimplifiedSymbol
Section titled “hencSetSimplifiedSymbol”Prototype
Section titled “Prototype”void hencSetSimplifiedSymbol( bool flag )Function
Section titled “Function”Specifies whether Simpilfied Symbol should be used when displaying S-52 symbols, patterns, and lines.
Parameters
Section titled “Parameters”- true : Use simpilfied symbol, pattern and line
- false : Do not use simpilfied symbol, pattern and line
Return Value
Section titled “Return Value”None
hencIsSimplifiedSymbol
Section titled “hencIsSimplifiedSymbol”Prototype
Section titled “Prototype”bool hencIsSimplifiedSymbol()Function
Section titled “Function”Check whether Simpilfied Symbol is used when displaying S-52 symbols, patterns and lines.
Parameters
Section titled “Parameters”None
Return Value
Section titled “Return Value”- true : Use simpilfied Symbols, Patterns, and Lines
- false : Do not use simpilfied Symbols, Patterns, and Lines
hencGetDisplayCategory
Section titled “hencGetDisplayCategory”Prototype
Section titled “Prototype”EDisplayCategory hencGetDisplayCategory()Function
Section titled “Function”Obtain display category.(Refer S-52 Display Category in chapter 2.23.5 in API reference manual)
Parameters
Section titled “Parameters”None
Return Value
Section titled “Return Value”Current setting of EDisplayCategory
hencSetDisplayCategory
Section titled “hencSetDisplayCategory”Prototype
Section titled “Prototype”void hencSetDisplayCategory( EDisplayCategory c )Function
Section titled “Function”Specify the display category.(Refer chapter 2.23.5 in API reference manual.)
Parameters
Section titled “Parameters”EDisplayCategory c : IN (EDisplayCategory setting value)
Return Value
Section titled “Return Value”None
hencSetNationalLanguage
Section titled “hencSetNationalLanguage”Prototype
Section titled “Prototype”void hencSetNationalLanguage( bool flag )Function
Section titled “Function”- Specifies whether to use the local language in the ENC file.
- When displaying the information of each ENC Feature Object, it specifies whether to use the local language information if it contains the local language information. When disabled, it is always displayed in English.
Parameters
Section titled “Parameters”- true : Use local language
- false : Use English only
Return Value
Section titled “Return Value”None
hencIsNationalLanguage
Section titled “hencIsNationalLanguage”Prototype
Section titled “Prototype”bool hencIsNationalLanguage()Function
Section titled “Function”Check whether the local language is used in the ENC file.
Parameters
Section titled “Parameters”None
Return Value
Section titled “Return Value”- true : Use local language
- false : English only
hencGetUseScaleMinMax
Section titled “hencGetUseScaleMinMax”Prototype
Section titled “Prototype”int hencGetUseScaleMinMax()Function
Section titled “Function”Check whether SCAMIN and SCAMAX values are used in the ENC Feature Object.
Parameters
Section titled “Parameters”None
Return Value
Section titled “Return Value”- != 0 : In use
- ==0 : Not use
- < 0 : Fail
hencSetUseScaleMinMax
Section titled “hencSetUseScaleMinMax”Prototype
Section titled “Prototype”void hencSetUseScaleMinMax( int flag )Function
Section titled “Function”Specifies whether to use the SCAMIN, SCAMAX values within the ENC Feature Object to display.
Parameters
Section titled “Parameters”- != 0 : Use
- ==0 : Do not use
Return Value
Section titled “Return Value”None
hencGetViewMapByScale
Section titled “hencGetViewMapByScale”Prototype
Section titled “Prototype”int hencGetViewMapByScale()Function
Section titled “Function”Obtains using status of the function which determines whether to display according to the level when display map.
Parameters
Section titled “Parameters”None
Return Value
Section titled “Return Value”- != 0 : In use
- ==0 : Not use
- < 0 : Fail
hencSetViewMapByScale
Section titled “hencSetViewMapByScale”Prototype
Section titled “Prototype”void hencSetViewMapByScale( int flag )Function
Section titled “Function”Set whether or not to use the function to decide whether to display or not according to the level when displaying the map. Below the specified scale, set the function to hide the detail map on the screen.
Parameters
Section titled “Parameters”- != 0 : Use
- ==0 : Do not use
Return Value
Section titled “Return Value”None
hencSetDepth
Section titled “hencSetDepth”Prototype
Section titled “Prototype”int hencSetDepth( EDepthType t, double depth )Function
Section titled “Function”Change the setting value that shows the currently set water depth. S-52 Sets water depth value used for color and line segment display by depth defined in CSP.
Parameters
Section titled “Parameters”- EDepthType t: IN (Depth type)
- double depth : IN (depth value, meter)
Return Value
Section titled “Return Value”-
= 0 : Success
- < 0 : Fail
hencGetDepth
Section titled “hencGetDepth”Prototype
Section titled “Prototype”double hencGetDepth( EDepthType t );Function
Section titled “Function”- Obtains the setting value for the currently configured water depth display.
- Refer function for the details
Parameters
Section titled “Parameters”EDepthType t : IN (Water depth type) enum EDepthType { SHALLOW_CONTOUR, DEEP_CONTOUR, SAFETY_CONTOUR, SAFETY_DEPTH, DEPTHTYPE_MAX };
Return Value
Section titled “Return Value”Current setting
hencSetShallowPattern
Section titled “hencSetShallowPattern”Prototype
Section titled “Prototype”int hencSetShallowPattern( bool flag )Function
Section titled “Function”Set whether or not to display a shallow depth pattern (shallow pattern) for displaying the shallow water depth.
Parameters
Section titled “Parameters”- true : Display shallow pattern
- false : Do not display shallow pattern
Return Value
Section titled “Return Value”-
= 0 : Success
- < 0 : Fail
hencIsShallowPattern
Section titled “hencIsShallowPattern”Prototype
Section titled “Prototype”bool hencIsShallowPattern()Function
Section titled “Function”Obtains setting value of whether to display of the low-water depth pattern (Shallow pattern) for displaying the shallow water depth.
Parameters
Section titled “Parameters”None
Return Value
Section titled “Return Value”Setting value of whether to display of the low-water depth pattern
hencSetTwoShades
Section titled “hencSetTwoShades”Prototype
Section titled “Prototype”int hencSetTwoShades( bool flag )Function
Section titled “Function”- Set whether to use only two colors when displaying the depth of sea level area.
- The sea level is represented by two colors or four different colors, depending on the depth of the water. Specify the number of colors to use at this time.
Parameters
Section titled “Parameters”- true : Use two colors only
- false : Use more than 2 colors
Return Value
Section titled “Return Value”-
= 0 : Success
- < 0 : Fail
hencIsTwoShades
Section titled “hencIsTwoShades”Prototype
Section titled “Prototype”bool hencIsTwoShades()Function
Section titled “Function”Obtain whether to use two colors mode when displaying sea level.
Parameters
Section titled “Parameters”None
Return Value
Section titled “Return Value”1 : Use two colors mode 0 : Do not use two colors mode(4 colors are used)
hencSetHideMeta
Section titled “hencSetHideMeta”Prototype
Section titled “Prototype”int hencSetHideMeta( bool flag )Function
Section titled “Function”Sets whether to display the object corresponding to the Meta Object(300th Object Code) among the Feature Objects of the S-57 ENC.
Parameters
Section titled “Parameters”- true : Do not display meta-objects
- false : Display meta-objects
Return Value
Section titled “Return Value”-
= 0 : Success
- < 0 : Fail
hencIsHideMeta
Section titled “hencIsHideMeta”Prototype
Section titled “Prototype”bool hencIsHideMeta()Function
Section titled “Function”Obtain the display setting value of the meta-object.
Parameters
Section titled “Parameters”None
Return Value
Section titled “Return Value”Whether the meta-object is displayed
hencSetColorset
Section titled “hencSetColorset”Prototype
Section titled “Prototype”int hencSetColorset( EEncColorset colorset )Function
Section titled “Function”Specify the color of the map display. (Refer S-52 Color)
Parameters
Section titled “Parameters”EEncColorset colorset : IN (Value of color table) enum EEncColorset { COLORSET_DAY_BRIGHT, COLORSET_DAY_WHITEBACK, COLORSET_DAY_BLACKBACK, COLORSET_DUSK, COLORSET_NIGHT, COLORSET_USER, COLORSET_MAX };
Return Value
Section titled “Return Value”- = 0 : Success
- < 0 : Fail
hencGetColorset
Section titled “hencGetColorset”Prototype
Section titled “Prototype”EEncColorset hencGetColorset()Function
Section titled “Function”Obtain the map display color table value in use. (Refer S-52 Color)
Parameters
Section titled “Parameters”None
Return Value
Section titled “Return Value”Map display color table value in use. enum EEncColorset { COLORSET_DAY_BRIGHT, COLORSET_DAY_WHITEBACK, COLORSET_DAY_BLACKBACK, COLORSET_DUSK, COLORSET_NIGHT, COLORSET_USER, COLORSET_MAX };
hencFontGet
Section titled “hencFontGet”Prototype
Section titled “Prototype”int hencFontGet( LOGFONT *lf )Function
Section titled “Function”Obtain the setting value for the font to be used for map display.
Parameters
Section titled “Parameters”LOGFONT *lf : IN, OUT (Win32 LOGFONT structure)
Return Value
Section titled “Return Value”- = 0 : Success
- < 0 : Fail
hencFontSet
Section titled “hencFontSet”Prototype
Section titled “Prototype”int hencFontSet( LOGFONT *lf )Function
Section titled “Function”Specify the setting value of the font to be used for map display.
Parameters
Section titled “Parameters”LOGFONT *lf : IN (Win32 LOGFONT structure)
Return Value
Section titled “Return Value”- = 0 : Success
- < 0 : Fail
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
hencGetUserColor
Section titled “hencGetUserColor”Prototype
Section titled “Prototype”COLORREF hencGetUserColor( EEncColor eco )Function
Section titled “Function”Obtain the RGB value corresponding to the S-52 color code in the user’s color table.
Parameters
Section titled “Parameters”EEncColor eco : IN (S-52 color code value)
Return Value
Section titled “Return Value”RGB color value
hencSetUserColor
Section titled “hencSetUserColor”Prototype
Section titled “Prototype”void hencSetUserColor( EEncColor eco, COLORREF co )Function
Section titled “Function”Set the RGB value corresponding to the S-52 color code in the user’s color table.
Parameters
Section titled “Parameters”- EEncColor eco : IN (S-52 Color code)
- COLORREF co : IN (RGB color)
Return Value
Section titled “Return Value”None
hencResetUserColor
Section titled “hencResetUserColor”Prototype
Section titled “Prototype”void hencResetUserColor()Function
Section titled “Function”Set all color values in the custom palette to the standard day color palette
Parameters
Section titled “Parameters”None
Return Value
Section titled “Return Value”None
hencUserImageNew
Section titled “hencUserImageNew”Prototype
Section titled “Prototype”CEncUserImage *hencUserImageNew( const char *fnBmp )Function
Section titled “Function”Creates an image from an image file.
Parameters
Section titled “Parameters”const char * fnBmp : IN (Image file name)
Return Value
Section titled “Return Value”- != NULL : Image Object
- == NULL : Read Fail
hencUserImageDelete
Section titled “hencUserImageDelete”Prototype
Section titled “Prototype”int hencUserImageDelete( CEncUserImage * hui )Function
Section titled “Function”Releases the memory of the image object.
Parameters
Section titled “Parameters”- It must be a value generated by the function.
Return Value
Section titled “Return Value”- = 0 : Success
- < 0 : Fail
hencUserImageDrawAtMapPos
Section titled “hencUserImageDrawAtMapPos”Prototype
Section titled “Prototype”int hencUserImageDrawAtMapPos( CEncUserImage * hui, double x, double y, double angle = 0, double scale = 1.0)Function
Section titled “Function”Draw an image object on the map’s top coordinate.
Parameters
Section titled “Parameters”- CEncUserImage * hui : IN (Image Object)
- It must be a value generated by the function.
- double x : IN (longitude, degree)
- double y : IN (latitude, degree)
- double angle : IN (Rotation angle, CW, degree)
- double scale : IN (Zoom scale)
Return Value
Section titled “Return Value”hencUserImageDrawAtGlPos
Section titled “hencUserImageDrawAtGlPos”Prototype
Section titled “Prototype”int hencUserImageDrawAtGlPos( CEncUserImage * hui, double x, double y, double z = 0, double angle = 0, double scale = 1)Function
Section titled “Function”- Specifies z-coordinate
Parameters
Section titled “Parameters”- CEncUserImage * hui : IN (Image Object)
- It must be a value generated by the function.
- double x : IN (GlPos)
- double y : IN (GlPos)
- double z : IN (GlPos)
- double angle : IN (Rotation angle, CW, degree)
- double scale : IN (Zoom scale)
Return Value
Section titled “Return Value”- = 0 : Success
- < 0 : Fail
hencUsersymbolInit
Section titled “hencUsersymbolInit”Prototype
Section titled “Prototype”int hencUsersymbolInit()Function
Section titled “Function”- Initialize a user-defined symbol.
- Load previously registered user defined symbols into memory.
- There is no need to call it separately because it is called automatically in the library.
Parameters
Section titled “Parameters”None
Return Value
Section titled “Return Value”- = 0 : Success
- < 0 : Fail
hencUsersymbolClear
Section titled “hencUsersymbolClear”Prototype
Section titled “Prototype”void hencUsersymbolClear()Function
Section titled “Function”- Releases the memory occupied by the user-defined symbol.
- There is no need to call it separately because it is called automatically in the library.
Parameters
Section titled “Parameters”None
Return Value
Section titled “Return Value”None
hencUsersymbolDel
Section titled “hencUsersymbolDel”Prototype
Section titled “Prototype”int hencUsersymbolDel( const char *name )Function
Section titled “Function”Delete the user-defined symbol corresponding to the name. At this time, the image file of the directory storing the user-defined symbol is also deleted.
Parameters
Section titled “Parameters”const char * name : IN (Object name, Null-terminated string)
Return Value
Section titled “Return Value”- = 0 : Success
- < 0 : Fail
Prototype
Section titled “Prototype”int hencUsersymbolDel( CEncUserImage *img )Function
Section titled “Function”Delete the user-defined symbol corresponding to the object pointer. At this time, the image file of the directory storing the custom symbol is also deleted.
Parameters
Section titled “Parameters”CEncUserImage * img : IN (Pointer of user-defined symbol)
Return Value
Section titled “Return Value”- = 0 : Success
- < 0 : Fail
hencUsersymbolAddNewImage
Section titled “hencUsersymbolAddNewImage”Prototype
Section titled “Prototype”int hencUsersymbolAddNewImage( CEncUserImage *imgNew, const char *fname)Function
Section titled “Function”- Register a user-defined symbol.
- The file can be saved as an image in PNG format in the directory where user defined symbols are stored, and can be used at the next execution.
Parameters
Section titled “Parameters”- CEncUserImage *imgNew : IN (User-defined image objects)
- After registering, the library manages the memory directly, so you should not delete or free the memory.
- const char *name : IN (The name of the custom image object., Null-terminated string)
- Must be a suitable string as a file name.
Return Value
Section titled “Return Value”- = 0 : Success
- < 0 : Fail
hencUsersymbolAddToMap
Section titled “hencUsersymbolAddToMap”Prototype
Section titled “Prototype”int hencUsersymbolAddToMap( CEncUserImage *imgNew, const char *name )Function
Section titled “Function”- Temporarily register with user symbols.
- In this case, the file is not stored in the user-defined symbol storage directory. Therefore, it can be used only at the time of this execution, and can not be used at the next execution.
Parameters
Section titled “Parameters”- CEncUserImage *imgNew : IN (User-defined image object)
- After registering, the library manages the memory directly, so you should not delete or free the memory.
- const char *name : IN (Name of user-defined image object, Null-terminated string)
- Must be a suitable string as a file name
Return Value
Section titled “Return Value”- = 0 : Success
- < 0 : Fail
hencUsersymbolGetCount
Section titled “hencUsersymbolGetCount”Prototype
Section titled “Prototype”int hencUsersymbolGetCount()Function
Section titled “Function”The number of registered user defined symbols is obtained.
Parameters
Section titled “Parameters”None
Return Value
Section titled “Return Value”The number of registered user defined symbols
hencUsersymbolGetName
Section titled “hencUsersymbolGetName”Prototype
Section titled “Prototype”const char * hencUsersymbolGetName( int no )Function
Section titled “Function”- Obtains the name from the number of registered user-defined symbols.
- The number of the user-defined symbol may be changed when a new symbol is registered or deleted, so the name according to the number must be checked each time.
Parameters
Section titled “Parameters”int no : IN (Symbol number)
Return Value
Section titled “Return Value”- != NULL : The name of the user-defined image object. (Null-terminated string)
- == NULL : Fail (Incorrect symbol number)
Prototype
Section titled “Prototype”const char * hencUsersymbolGetName( CEncUserImage *img )Function
Section titled “Function”Obtain the symbol name of the object.
Parameters
Section titled “Parameters”CEncUserImage *img : IN (Pointer of Image Object)
Return Value
Section titled “Return Value”- != NULL : The name of the user-defined image object.
- == NULL : Fail (Incorrect symbol number)
hencUsersymbolGetImage
Section titled “hencUsersymbolGetImage”Prototype
Section titled “Prototype”CEncUserImage * hencUsersymbolGetImage( int no )Function
Section titled “Function”- The name is obtained from the number of registered user-defined symbols.
- The number of the user-defined symbol may be changed when a new symbol is registered or deleted, so the name according to the number must be checked each time.
Parameters
Section titled “Parameters”int no : IN (심볼 번호)
Return Value
Section titled “Return Value”- != NULL : Image Object
- Since the library is an object that manages memory directly, it should not be deleted or freed.
- == NULL : Fail (Incorrect symbol number)
Prototype
Section titled “Prototype”CEncUserImage *hencUsersymbolGetImage( const char *name )Function
Section titled “Function”- Obtain an object from the name of the user-defined symbol.
- Since the library is an object that manages memory directly, it should not be deleted or freed.
Parameters
Section titled “Parameters”const char *name : IN (Object name, Null-terminated string)
Return Value
Section titled “Return Value”- != NULL : Success (Object pointer)
- == NULL : Fail (Not existed object)
hencUserobjAdd
Section titled “hencUserobjAdd”Prototype
Section titled “Prototype”CEncUserObject * hencUserobjAdd( double x, double y, LPCTSTR name )Function
Section titled “Function”Add a user symbol on the map.
Parameters
Section titled “Parameters”- double x : IN (longitude, degree)
- double y : IN (latitude, degree)
- const char *name : IN (The name of the symbol registered in the user symbol repository., Null-terminated string)
Return Value
Section titled “Return Value”- != NULL : Pointer value of a user defined object
- This object is managed by the library and should not be deleted or freed manually
- == NULL : Fail
Prototype
Section titled “Prototype”CEncUserObject * hencUserobjAdd( double x, double y, CEncUserImage *img )Function
Section titled “Function”- Adds a user-loaded image to the map.
- If the image is not registered in the user defined symbol repository, it is not saved at the end of the program because it has no name. Therefore, the next execution will not be restored on the map.
Parameters
Section titled “Parameters”- double x : IN (longitude, degree)
- double y : IN (latitude, degree)
- CEncUserImage *img : IN (Image object pointer)
Return Value
Section titled “Return Value”- != NULL : Pointer value of a user defined object
- This object is managed by the library and should not be deleted or freed manually
- == NULL : Fail
hencUserobjDel
Section titled “hencUserobjDel”Prototype
Section titled “Prototype”int hencUserobjDel( CEncUserObject *obj )Function
Section titled “Function”Delete user symbols on the map. Delete the object using the object pointer obtained when creating the object.
Parameters
Section titled “Parameters”CEncUserObject *obj : IN (object pointer obtained when creating the object.)
Return Value
Section titled “Return Value”-
= 0 : Success (Number of deleted userobj)
- < 0 : Fail
Prototype
Section titled “Prototype”int hencUserobjDel( CEncUserImage *obj )Function
Section titled “Function”Delete user symbols on the map. Deletes symbols at all positions using the image object of the same symbol.
Parameters
Section titled “Parameters”CEncUserImage *obj : IN (User symbol image object)
Return Value
Section titled “Return Value”-
= 0 : Success (Number of deleted userobj)
- < 0 : Fail
Prototype
Section titled “Prototype”int hencUserobjDel( double x, double y, LPCTSTR name )Function
Section titled “Function”Deletes the user-defined symbol with the specified location and the specified name.
Parameters
Section titled “Parameters”- double x : IN (longitude, degree)
- double y : IN (latitude, degree)
- const LPCTSTR : IN (The name of the symbol registered in the symbol repository, Null-terminated string)
Return Value
Section titled “Return Value”-
= 0 : Success (Number of deleted userobj)
- < 0 : Fail
Prototype
Section titled “Prototype”int hencUserobjDel( const char *name )Function
Section titled “Function”Delete user symbols on the map. Deletes symbols at all positions using symbol image objects of the same name.
Parameters
Section titled “Parameters”const char *name : IN (The name of the symbol registered in the symbol repository, Null-terminated string)
Return Value
Section titled “Return Value”-
= 0 : Success (Number of deleted userobj)
- < 0 : Fail
Prototype
Section titled “Prototype”int hencUserobjDel( double x, double y )Function
Section titled “Function”Delete all user-defined symbols at the specified location on the map.
Parameters
Section titled “Parameters”- double x : IN (longitude, degree)
- double y : IN (latitude, degree)
Return Value
Section titled “Return Value”-
= 0 : Success (Number of deleted userobj)
- < 0 : Fail
hencUserobjGet
Section titled “hencUserobjGet”Prototype
Section titled “Prototype”CEncUserObject * hencUserobjGet( int no )Function
Section titled “Function”Returns the object of the no-th user defined symbol.
Parameters
Section titled “Parameters”int no : IN (User object number)
Return Value
Section titled “Return Value”- != NULL : Pointer value of user-defined object
- This object is managed by the library and should not be deleted or freed manually
- == NULL : Fail
hencUserobjGetCount
Section titled “hencUserobjGetCount”Prototype
Section titled “Prototype”int hencUserobjGetCount()Function
Section titled “Function”Returns the number of registered user defined symbols.
Parameters
Section titled “Parameters”None
Return Value
Section titled “Return Value”Number of user-defined symbols
hencOptGetInt
Section titled “hencOptGetInt”Prototype
Section titled “Prototype”int hencOptGetInt( const char *str, int def = 0 )Function
Section titled “Function”Reads the variable value with the name specified in the electronic chart setting INI file.
Parameters
Section titled “Parameters”- const char *str : IN (variable name)
- int def : IN (The default value to use when the variable does not exist)
Return Value
Section titled “Return Value”setting value
hencOptSetInt
Section titled “hencOptSetInt”Prototype
Section titled “Prototype”int hencOptSetInt( const char *str, int no )Function
Section titled “Function”Change the value of the variable with the name specified in the electronic chart setting INI file.
Parameters
Section titled “Parameters”- const chat *str : IN (variable name)
- int no : IN (setting value)
Return Value
Section titled “Return Value”- = 0 : Success
- < 0 : Fail
hencOptSave
Section titled “hencOptSave”Prototype
Section titled “Prototype”int hencOptSave()Function
Section titled “Function”Save the electronic chart settings as an INI file.
Parameters
Section titled “Parameters”None
Return Value
Section titled “Return Value”- = 0 : Success
- < 0 : Fail
hencMapPosToWinPos
Section titled “hencMapPosToWinPos”Prototype
Section titled “Prototype”int hencMapPosToWinPos( double &x, double &y )Function
Section titled “Function”Calculate the coordinate value of the GDI Window corresponding to the coordinate value of the coordinates of latitude/longitude on the map.
Parameters
Section titled “Parameters”- double &x : IN, OUT
- IN : longitude(degree)
- OUT : The x coordinate value of the GDI Pixel
- double &y: IN, OUT
- IN : latitude(degree)
- OUT : The y coordinate value of the GDI Pixel
Return Value
Section titled “Return Value”- = 0 : Success
- < 0 : Fail
hencWinPosToMapPos
Section titled “hencWinPosToMapPos”Prototype
Section titled “Prototype”int hencWinPosToMapPos( double &x, double &y )Function
Section titled “Function”Calculates the coordinate value on the map corresponding to the Window GDI coordinate value.
Parameters
Section titled “Parameters”- double &x : IN, OUT
- IN : X coordinate of GDI Pixel
- OUT : longitude(degree)
- double &y: IN, OUT
- IN : Y coordinate of GDI Pixel
- OUT : latitude(degree)
Return Value
Section titled “Return Value”- = 0 : Success
- < 0 : Fail
hencMapPosToGlPos
Section titled “hencMapPosToGlPos”Prototype
Section titled “Prototype”int hencMapPosToGlPos( double &x, double &y )Function
Section titled “Function”Calculate the OpenGL coordinate value set in the library corresponding to the coordinate value of the latitude and longitude on the map.
Parameters
Section titled “Parameters”- x : IN, OUT
- IN : longitude(degree)
- OUT : X coordinate value of OpenGL Viewport
- y: IN, OUT
- IN : latitude(degree)
- OUT : Y coordinate value of OpenGL Viewport
Return Value
Section titled “Return Value”- = 0 : Success
- < 0 : Fail
hencGlPosToMapPos
Section titled “hencGlPosToMapPos”Prototype
Section titled “Prototype”int hencGlPosToMapPos( double &x, double &y )Function
Section titled “Function”Calculates the map coordinate value corresponding to the OpenGL coordinate value set in the library.
Parameters
Section titled “Parameters”- double &x : IN, OUT
- IN : X coordinate value of OpenGL Viewport
- OUT : longitude(degree)
- double &y: IN, OUT
- IN : Y coordinate value of OpenGL Viewport
- OUT : latitude(degree)
Return Value
Section titled “Return Value”- = 0 : Success
- < 0 : Fail
hencWinPosToGlPos
Section titled “hencWinPosToGlPos”Prototype
Section titled “Prototype”int hencWinPosToGlPos( double &x, double &y )Function
Section titled “Function”Calculate the library setting OpenGL coordinate value corresponding to GDI Pixel coordinate value.
Parameters
Section titled “Parameters”- double &x : IN, OUT
- IN : X coordinate of GDI Pixel
- OUT : X coordinate of OpenGL Viewport
- double &y: IN, OUT
- IN : Y coordinate of GDI Pixel
- OUT : Y coordinate of OpenGL Viewport
Return Value
Section titled “Return Value”- = 0 : Success
- < 0 : Fail
hencGlPosToWinPos
Section titled “hencGlPosToWinPos”Prototype
Section titled “Prototype”int hencGlPosToWinPos( double &x, double &y )Function
Section titled “Function”Calculates the GDI pixel coordinate value corresponding to the OpenGL coordinate value set in the library.
Parameters
Section titled “Parameters”- double &x : IN, OUT
- IN : X coordinate value of OpenGL Viewport
- OUT : X coordinate value in GDI pixel
- double &y: IN, OUT
- IN : Y coordinate value of OpenGL Viewport
- OUT : X coordinate value in GDI pixel
Return Value
Section titled “Return Value”- = 0 : Success
- < 0 : Fail
hencWgs84ToMercator
Section titled “hencWgs84ToMercator”Prototype
Section titled “Prototype”double hencWgs84ToMercator( double lat )Function
Section titled “Function”Calculate the Mercator projection coordinate value corresponding to the WGS84 latitude value.
Parameters
Section titled “Parameters”double lat : IN (WGS84 latitude, degree)
Return Value
Section titled “Return Value”Mercator projection coordinate (latitude. degree)
hencMercatorToWgs84
Section titled “hencMercatorToWgs84”Prototype
Section titled “Prototype”double hencMercatorToWgs84( double mercator_y )Function
Section titled “Function”Calculates the WGS84 latitude value corresponding to the Mercator projection coordinate value.
Parameters
Section titled “Parameters”double mercator_y : IN, Coordinate by Mecator projection. (latitude, degree)
Return Value
Section titled “Return Value”Coordinate by WGS84 projection (latitude. degree)
hencCaptureMapTexture
Section titled “hencCaptureMapTexture”Prototype
Section titled “Prototype”GLuint hencCaptureMapTexture( GLuint texture = 0 )Function
Section titled “Function”- Make the entire contents of the buffer for the current map display into a texture.
- If the texture number is 0, create a new one.
- If the Texture number is not 0, reuse the given Texture number.
Parameters
Section titled “Parameters”GLuint texture : IN (OpenGL Texture name)
Return Value
Section titled “Return Value”OpenGL Texture name
hencRenderMapTexture
Section titled “hencRenderMapTexture”Prototype
Section titled “Prototype”void hencRenderMapTexture( GLuint tex )Function
Section titled “Function”Draw a map on the screen using the buffer store Texutre for the previously stored map display. The same window as at the time of capturing, and it is normally drawn only when there is no change in the size of the window.
Parameters
Section titled “Parameters”GLuint texture : IN (OpenGL Texture name)
Return Value
Section titled “Return Value”None
hencGetMapUpdateCounter
Section titled “hencGetMapUpdateCounter”Prototype
Section titled “Prototype”DWORD hencGetMapUpdateCounter()Function
Section titled “Function”- 현재창에 대한 변경사항 카운터 값을 획득한다.
- 변경사항 카운터 값을 클리어(clear) 한 후 전시 버퍼를 새로 그려야 하는 설정의 변경사항을 확인할 수 있는 카운터 값이다.
- 이 값은 개별창을 기준으로 전시 버퍼에 대한 변동치 값이다.
- 지도 설정이 바뀔 경우에는 모든 전시창의 변동치 값이 올라가고,
- 개별창의 전시 설정이 바뀔 경우에는 해당하는 창의 변동치 값만 올라간다.
- 단일 Viewport에 대해서만 유효한 값이며, 다수의 Viewport인 경우에는 직접 변동 여부를 확인해야 한다.
Parameters
Section titled “Parameters”None
Return Value
Section titled “Return Value”변경사항 카운터 값
hencClearMapUpdateCounter
Section titled “hencClearMapUpdateCounter”Prototype
Section titled “Prototype”void hencClearMapUpdateCounter()Function
Section titled “Function”Clear the change counter value for the current window.
Parameters
Section titled “Parameters”None
Return Value
Section titled “Return Value”None
hencIncMapUpdateCounter
Section titled “hencIncMapUpdateCounter”Prototype
Section titled “Prototype”void hencIncMapUpdateCounter()Function
Section titled “Function”Manually indicates that there are changes to the current window.
Parameters
Section titled “Parameters”None
Return Value
Section titled “Return Value”None
hencIncMapUpdateCounterAll
Section titled “hencIncMapUpdateCounterAll”Prototype
Section titled “Prototype”void hencIncMapUpdateCounterAll()Function
Section titled “Function”Manually indicates that there is a change to the entire window.
Parameters
Section titled “Parameters”None
Return Value
Section titled “Return Value”None
hencClearMapUpdateCounterAll
Section titled “hencClearMapUpdateCounterAll”Prototype
Section titled “Prototype”void hencClearMapUpdateCounterAll()Function
Section titled “Function”Clear change counters for all windows.
Parameters
Section titled “Parameters”None
Return Value
Section titled “Return Value”None
hencPrintf
Section titled “hencPrintf”Prototype
Section titled “Prototype”int hencPrintf( double x, double y, COLORREF co, const char *fmt, ... )Function
Section titled “Function”- Draws a string with the color specified in the specified coordinates in the same font as the font used for map display.
- This function has a formatting functionality like printf of C language.
Parameters
Section titled “Parameters”- double x : IN (OpenGL x coordinate value to display text)
- double y : IN (OpenGL y coordinate value to display text)
- COLORREF co : IN (Text color)
- const char *fmt : IN (String to display on screen, Null-terminated string)
- See the printf format specification of C language.
Return Value
Section titled “Return Value”-
= 0 : Success
- < 0 : Fail
Prototype
Section titled “Prototype”int hencPrintf( double x, double y, double z, COLORREF co, const char *fmt, ... )Function
Section titled “Function”- Draws a string with the color specified in the specified coordinates in the same font as the font used for map display. (including z-coordinate)
- This function has a formatting functionality like printf of C language.
Parameters
Section titled “Parameters”- double x : IN (OpenGL x coordinate value to display tex)
- double y : IN (OpenGL y coordinate value to display tex)
- double z : IN (OpenGL z coordinate value to display tex값)
- COLORREF co : IN (Text color)
- const char *fmt : IN (String to display on screen, Null-terminated string)
- See the printf format specification of C language.
Return Value
Section titled “Return Value”-
= 0 : Success
- < 0 : Fail
hencDrawVRM
Section titled “hencDrawVRM”Prototype
Section titled “Prototype”void hencDrawVRM( double cx, double cy, double radius, int resoultion = 360 )Function
Section titled “Function”VRM(Variable Range Marker) As a drawing function, draw a polygon that connects points of the same distance with respect to the center point.
Parameters
Section titled “Parameters”- double cx : IN (Center Longitude, degree)
- double cy : IN (Center Latitude, degree)
- double radius : IN (Distance from center, meter)
- int resolution : IN (Number of faces of polygon)
Return Value
Section titled “Return Value”None
hencDrawEBL
Section titled “hencDrawEBL”Prototype
Section titled “Prototype”void hencDrawEBL( double cx, double cy, double bearing, double radius1, double radius2 )Function
Section titled “Function”EBL(Electronic Bearing Line) drawing function
Parameters
Section titled “Parameters”- double cx : IN (Center point longitude, degree)
- double cy : IN (Center point latitude, degree)
- double bearing : IN (Angle. 0 degree northward direction, CW, degree)
- double radius1 : IN (Distance from the center point to the starting point of the EBL, meter)
- double radius2 : IN (Distance from the center point to the end point of the EBL, meter)
Return Value
Section titled “Return Value”None