Skip to content

henc — kernel

Core ENC kernel functions — initialization, view creation, chart loading, display, pan/zoom/rotate, layer control

int hencInit()
  • Load S-52 data file.
  • Load user settings(data\encoptions.ini).

None

  • = 0 : Initialization Success
  • < 0 : Initialization Fail

int hencDeinit()
  • Remove all S-52 data files.
  • Delete memory and data associated with the library
  • Save current settings.

None

  • = 0 : Success
  • < 0 : Fail

int hencLoad( const char *fn, bool flagLoadUpdate = true )
  • 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.

const char *fn : IN (Filename to load)

  • = 0 : Success
  • < 0 : Fail

int hencLoadENCintoDom( const char *fn, CDomNode *node )
  • 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.
  • const char *fn : IN (filename to read)
  • CDomNode *node : IN, OUT (storage)
  • = 0 : Read Success

  • < 0 : Read Fail

int hencIsUpdateENC( CDomNode *node )

Check whether the map information is UpdateENC.

  • ENC information, It only works if it is a CDomNode read from a function.
  • == 0 : When it is judged as Update ENC
  • != 0 : When it is judged as not Update ENC

int hencGetEncVersion( CDomNode *node, int &major, int &minor )

Load the ENC file version of the map information loaded with . It is used when comparing ENC files or comparing patch versions.

  • ENC Information, It must be a CDomNode read from the function to work correctly.

= 0 : Success < 0 : Fail


int hencUpdateENCDom( CDomNode *nodeBase, CDomNode *nodeUpdate )

Patch the S-57 file with two ENC files loaded with the function.

  • CDomNode *nodeBase : IN (BASE ENC)
  • CDomNode *nodeUpdate : IN (UPDATE ENC)
  • = 0 : Success

  • < 0 : Fail

int hencLoadDom( CDomNode *node )
  • Read map information from data with CDomNode format.
  • It must be a CDomNode read from the to work correctly.

CDomNode *node : IN, OUT (storage)

  • = 0 : Read Success

  • < 0 : Read Fail

int hencSave( const char *fn )
  • 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.

const char *fn : IN (CATALOG file name)

  • = 0 : Success
  • < 0 : Fail

int hencLoadFileListFromCatalogFile( const char *fn, list &filelist )

Get a list of files from an ENC or SENC Catalog file.

  • const char *fn : IN (catalog file name)
  • list &filelist : OUT (list of files)
  • = 0 : Success
  • < 0 : Fail

int hencSaveCatalogSENC( const char *fn )

Only the Catalog SENC file of the loaded map is saved, not the cell file.

const char *fn : IN (Name of catalog file to be saved)

  • = 0 : Success
  • < 0 : Fail

int hencEncfileSaveToSENC( int no, const char *dirSave )
  • 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().
  • 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)
  • = 0 : Success
  • < 0 : Fail

int hencEncfileToDom( int no, CDomNode &dom )

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.

  • 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.

= 0 : Success < 0 : Fail


int hencEncfileSaveToMem( int no, LPVOID &ptr, int &size )

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 .

  • 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.

= 0 : Success < 0 : Fail


int hencEncfileLoadFromMem( LPVOID ptr, int size )

Read SENC from memory.

LPVOID ptr : IN (SENC storage memory) int size : IN (size of SENC information)

= 0 : Success < 0 : Fail


int hencUnload( const char *fn )

Remove the map loaded with the filename from memory.

  • Must be the same as the file name given in the (int no).
  • At this time, the file name does not include a path.

= 0 : Success < 0 : Fail

int hencUnload( int idx )

Delete the map loaded with that number from memory.

int idx : IN (map number)

= 0 : Success < 0 : Fail


int hencUnloadAll()

Delete loaded all map information from memory.

None

= 0 : Success < 0 : Fail


int hencEncfileSetLimit( int cnt )

Limit the number of map cells loaded into memory. This can be used to create a demo version program.

int cnt : IN (maximum number of cells)

= 0 : Success < 0 : Fail


int hencEncfileGetCount()

Gets the number of map cells loaded into memory.

None

Number of map cells loaded


const char *hencEncfileGetName( int no )

Obtain the filename of the loaded map cell.

  • Map cells are numbered from 0 in the order they are loaded.

!= NULL : File name (Null-terminated string) == NULL : File name acquisition failed (file number not existing)


int hencEncfileGetInfo( int no, CDomNode &dom )

Acquires the file name and area information of the corresponding ENC.

int no : IN (ENC number to acquire information) CDomNode &dom : OUT (Save file name and area information)

= 0 : Success < 0 : Fail


bool hencIsENCFile( const char *fn )

Check that the input file is an S-57 ENC file.

const char *fn : IN (inspection filename)

true : If the ENC file is correct false : If it is an error or not ENC file


bool hencIsSENCFile( const char *fn )

Check that the input file is an hns SENC file.

const char *fn : IN (inspection filename)

true : If the SENC file is correct false : If it is an error or not SENC file


bool hencIsCatalogFile( const char *fn )

Check whether the file is a catalog file of ENC or SENC. And checks whether the file name is CATALOG.

const char *fn : IN (inspection filename)

true : Scan is successful (if the catalog file is correct) false : Check failed or error (if the catalog file does not match)


bool hencIsShapeFile( const char *fn )

Checks whether the file is a Shape file and confirms the extension of the file name.

const char *fn : IN (inspection filename)

true : Scan is successful. (if the shape file is correct) false : Check failed or error. (if the shape file does not match)


char *hencEncStringToMBC( const char *str )

It is used to decode a binary string used for storing ENC information loaded by and convert it into a multi-byte code.

const char *str : IN (Encoded string)

!= 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.


int hencCreate( HWND hwnd )
  • 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.

HWND : IN (display window)

= 0 : Success < 0 : Fail


int hencDelete( HWND wnd )

Delete the generated HGLRC and HDC to display the map on HWND hwnd.

HWND : IN (Display window)

= 0 : Success < 0 : Fail


HGLRC hencGetGLRC( HWND hwnd )

Obtain the HGLRC corresponding to the specified window.

HWND : IN (Display window)

!= NULL : HGLRC == NULL : Failure (no information about display window)


HDC hencGetDC( HWND hwnd )

Obtain the HDC used for the specified HWND window.

HWND : IN (display window)

!= NULL : HDC == NULL : Failure (no information about display window)

HDC hencGetDC()

Obtain the HDC used for the current display window.

None

!= NULL : HDC == NULL : Failure (no current window)


int hencSelect( HWND hwnd )

Specify the map display target window.

HWND : IN (Display target window)

= 0 : Success < 0 : Fail


HWND hencGetHwnd( )

Obtain the window handle of the set display object window.

None

!= NULL : HWND (Handle value of display target window) == NULL : Failure (No display target window)


int hencClearBackground()

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

None

= 0 : Success < 0 : Failure


int hencSetViewport( int x, int y, int w, int h )

Specifies the map area of the display buffer. Need hencSelect() function.

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)

= 0 : Success < 0 : Fail


int hencClearViewport()

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.

None

= 0 : Success < 0 : Fail


int hencRender()
  •  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.

None

  • = 0 : Success
  • < 0 : Fail

int hencRenderWaitFinish()
  • 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.

None

  • = 0 : Success
  • < 0 : Fail

int hencRenderReset()
  • Prepare a partial drawing. Unlike the function, only the display preparation is performed.
  • Need function.

None

  • = 0 : Success
  • < 0 : Fail

int hencRenderMore()
  • 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.

None

  • 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

int hencRenderStop()
  • 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.

None

  • = 0 : Success

  • < 0 : Fail

int hencRenderMoreTimed( DWORD msec = 100 )
  • 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.

None

  • 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

int hencSwapBuffer()
  • 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

None

  • = 0 : Success
  • < 0 : Fail

int hencCopyBuffer()
  • 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

None

  • = 0 : Success
  • < 0 : Fail

bool hencEncfileIsRendered( int no )

It is determined whether or not a specific ENC file is partially displayed on the current screen.

  • Map cells are numbered from 0 in the order they are loaded.
  • 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

int hencSetCenter( double cx, double cy )

Used to specify the center point of map display.

  • double cx : IN (longitude, degree)
  • double cy : IN (latitude, degree)
  • = 0 : Success
  • < 0 : Fail

int hencGetCenter( double &cx, double &cy )

It is used to obtain the current map center point.

  • double &cx : OUT (longitude, degree)
  • double &cy : OUT (latitude, degree)
  • = 0 : Success
  • < 0 : Fail

double hencGetCenterX()

Obtain the longitude value of the current map center point.

None

Longitude value of the map center point


double hencGetCenterY()

Obtain the latitude value of the current map center point.

None

Latitude value of the map center point


int hencSetZoom( double scale )
  • 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..

scale : IN (magnification ratio)

  • = 0 : Success
  • < 0 : Fail

double hencGetZoom()
  • 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.

None

Map zoom ratio value


double hencGetScale()
  • This value is a value indicating the ratio of the actual distance to the pixel size on the actual screen specified by the function.

None

Scale value N in 1:N


int hencSetScale( double value )
  • 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.

value : IN (Scale)

  • = 0 : Success
  • < 0 : Fail

int hencSetRotation( double deg )

Specify the angle of rotation of the map on the screen.

deg : IN (CW, degree)

  • = 0 : Success
  • < 0 : Fail

double hencGetRotation()

Obtain the angle of rotation of the map currently displayed on the screen.

None

Map rotation angle. CW(Unit: Degree)


int hencSetMapArea( double minx, double miny, double maxx, double maxy )

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.

  • 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)
  • = 0 : Success
  • < 0 : Fail

int hencGetMapArea( double &minx, double &miny, double &maxx, double &maxy )

Obtains the latitude and longitude coordinates of the map currently displayed on the screen.

  • 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)
  • = 0 : Success
  • < 0 : Fail

The value obtained by this function may be different from the value set by function.


int hencSetMapParameter( double cx, double cy, double zoom, double rotation)
  • Center coordinates, magnification ratio, and rotation are set at once.
  • 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)
  • = 0 : Success
  • < 0 : Fail

int hencGetMapParameter( double &cx, double &cy, double &zoom, double &rotation )

Obtains screen settings collectively.

  • 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)
  • = 0 : Success
  • < 0 : Fail

bool hencIsMapRectInView( double minx, double miny, double maxx, double maxy )

It is checked whether or not the specified area is partially included in the display area.

  • 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)
  • true : Indicates that the specified area is partially contained within the screen
  • false : Indicates that the specified area is out of the screen

bool hencIsGlRectInView( double minx, double miny, double maxx, double maxy )

It is checked whether or not the specified area is partially included in the display area.

  • 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)
  • true : Indicates that the specified area is partially contained within the screen
  • false : Indicates that the specified area is out of the screen

DWORD hencGetMapLevelMask()
  • 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

None

Bit Mask per each level


void hencSetMapLevelMask( DWORD mask )
  • 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.
  • Levels 0 ~ 5 correspond to S-57 Code 1 ~ 6 and decide whether each map is displayed or not.

None

  • 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.

int hencEncfileGetVisible( int no )

Checke whether the display is set for each map cell.

int no : IN (Map number)

  • 0 : Display

  • == 0 : Not display
  • < 0 : Fail (Map number error)
  • See “Map File I / O” for details.

int hencEncfileSetVisible( int no, int isShow )
  • If the flag is 0, the map cell is hidden from view on the screen.
  • int no : IN (Map number)
  • int isShow : IN (0 : Not display, 1 : Display)
  • = 0 : Success
  • < 0 : Fail

int hencEncfileSetLevel( int no, int level )
  • 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.
  • int no : IN (Map number)
  • int level : IN (Map level, 0~5 or available up to 10)
  • = 0 : Success
  • < 0 : Fail

int hencEncfileGetLevel( int no )

Obtain the currently configured level value of the map file (Map File).

int no : IN (Map number)

  • 0~5 or 10 : Success (Level value)
  • < 0 : Fail

int hencEncfileSetBottom( int no )

Set a specific map cell to level 0 so that it is drawn on the lower layer of another map on the screen.

None

  • = 0 : Success
  • < 0 : Fail

int hencEncfileSetTopMost( int no )

Designate a specific map cell at level 10 so that it is drawn on the upper layer of another map on the screen.

None

  • = 0 : Success.
  • < 0 : Fail

int hencEncfileSetScaleForTopmost( int scale )
  • That is, this can be applied to a purpose of using a map that is additionally overlayed on an existing electronic chart.
  • 0 : Always display
  • 0 : Display when N value is lower than scale on 1:N scale

  • = 0 : Success
  • < 0 : Fail

int hencSetObjMask( EEncObject obj, bool flag )

Specifies whether to display the ENC Feature Object by type.

  • 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
  • = 0 : Success
  • < 0 : Fail

bool hencGetObjMask( EEncObject obj )

Obtains the display mask of each ENC Feature Object.

  • Refer S-57 Feature Object Catalog in chapter 2.23.1 in API reference manual
  • true : Display
  • false : Not display

int hencSetPixelSize( double meter )
  • 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.

double meter : IN (1 pixel size of screen기, meter)

  • = 0 : Success
  • < 0 : Fail

Default setting : 0.000265 ~= 96DPI


int hencSetPixelDPI( int dpi )
  • 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.

int dpi : IN (Pixels per inch of screen, DPI)

  • = 0 : Success
  • < 0 : Fail

Default setting : 0.000265 ~= 96DPI


double hencGetPixelSize()

It converts the size value of 1 pixel of the screen into metric unit and returns it.

None

Size value corresponding to 1 pixel of the screen (meter unit)

Default setting : 0.000265 ~= 96DPI


int hencGetPixelDPI()

Converts the size value of 1 pixel of the screen into DPI unit and returns it.

None

Screen DPI value

Default setting : 0.000265 ~= 96DPI


double hencGetSymbolScale()

Obtains the size values of S-52 Symbol, Pattern, Line and so on.

None

Symbol scale value


int hencSetSymbolScale( double scale )

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.

double scale : IN (Symbol Scale)

  • = 0 : Success
  • < 0 : Fail

Default setting : 0.033333 ~= 96DPI


bool hencIsAutoScaleToZoom()

Confirm whether you are using the automatic magnification adjustment function when changing the latitude.

None

  • true : Use auto scaling
  • false : Do not use auto scaling

int hencSetAutoScaleToZoom( bool flag )

Confirm whether you are using the automatic magnification adjustment function when changing the latitude.

  • true : Use auto scaling
  • false : Do not use auto scaling
  • = 0 : Success
  • < 0 : Fail

bool hencIsMercator()

Check whether Mercator projection is used.

None

  • true : Use Mercator projection
  • false : Do not use Mercator projection

void hencSetMercator( bool flag )

Specifies whether to use the Mercator projection.

  • true : Use Mercator projection
  • false : Do not use Mercator projection

None


void hencSetSimplifiedSymbol( bool flag )

Specifies whether Simpilfied Symbol should be used when displaying S-52 symbols, patterns, and lines.

  • true : Use simpilfied symbol, pattern and line
  • false : Do not use simpilfied symbol, pattern and line

None


bool hencIsSimplifiedSymbol()

Check whether Simpilfied Symbol is used when displaying S-52 symbols, patterns and lines.

None

  • true : Use simpilfied Symbols, Patterns, and Lines
  • false : Do not use simpilfied Symbols, Patterns, and Lines

EDisplayCategory hencGetDisplayCategory()

Obtain display category.(Refer S-52 Display Category in chapter 2.23.5 in API reference manual)

None

Current setting of EDisplayCategory


void hencSetDisplayCategory( EDisplayCategory c )

Specify the display category.(Refer chapter 2.23.5 in API reference manual.)

EDisplayCategory c : IN (EDisplayCategory setting value)

None


void hencSetNationalLanguage( bool flag )
  • 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.
  • true : Use local language
  • false : Use English only

None


bool hencIsNationalLanguage()

Check whether the local language is used in the ENC file.

None

  • true : Use local language
  • false : English only

int hencGetUseScaleMinMax()

Check whether SCAMIN and SCAMAX values are used in the ENC Feature Object.

None

  • != 0 : In use
  • ==0 : Not use
  • < 0 : Fail

void hencSetUseScaleMinMax( int flag )

Specifies whether to use the SCAMIN, SCAMAX values within the ENC Feature Object to display.

  • != 0 : Use
  • ==0 : Do not use

None


int hencGetViewMapByScale()

Obtains using status of the function which determines whether to display according to the level when display map.

None

  • != 0 : In use
  • ==0 : Not use
  • < 0 : Fail

void hencSetViewMapByScale( int flag )

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.

  • != 0 : Use
  • ==0 : Do not use

None


int hencSetDepth( EDepthType t, double depth )

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.

  • EDepthType t: IN (Depth type)
  • double depth : IN (depth value, meter)
  • = 0 : Success

  • < 0 : Fail

double hencGetDepth( EDepthType t );
  • Obtains the setting value for the currently configured water depth display.
  • Refer function for the details

EDepthType t : IN (Water depth type) enum EDepthType { SHALLOW_CONTOUR, DEEP_CONTOUR, SAFETY_CONTOUR, SAFETY_DEPTH, DEPTHTYPE_MAX };

Current setting


int hencSetShallowPattern( bool flag )

Set whether or not to display a shallow depth pattern (shallow pattern) for displaying the shallow water depth.

  • true : Display shallow pattern
  • false : Do not display shallow pattern
  • = 0 : Success

  • < 0 : Fail

bool hencIsShallowPattern()

Obtains setting value of whether to display of the low-water depth pattern (Shallow pattern) for displaying the shallow water depth.

None

Setting value of whether to display of the low-water depth pattern


int hencSetTwoShades( bool flag )
  • 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.
  • true : Use two colors only
  • false : Use more than 2 colors
  • = 0 : Success

  • < 0 : Fail

bool hencIsTwoShades()

Obtain whether to use two colors mode when displaying sea level.

None

1 : Use two colors mode 0 : Do not use two colors mode(4 colors are used)


int hencSetHideMeta( bool flag )

Sets whether to display the object corresponding to the Meta Object(300th Object Code) among the Feature Objects of the S-57 ENC.

  • true : Do not display meta-objects
  • false : Display meta-objects
  • = 0 : Success

  • < 0 : Fail

bool hencIsHideMeta()

Obtain the display setting value of the meta-object.

None

Whether the meta-object is displayed


int hencSetColorset( EEncColorset colorset )

Specify the color of the map display. (Refer S-52 Color)

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 };

  • = 0 : Success
  • < 0 : Fail

EEncColorset hencGetColorset()

Obtain the map display color table value in use. (Refer S-52 Color)

None

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 };


int hencFontGet( LOGFONT *lf )

Obtain the setting value for the font to be used for map display.

LOGFONT *lf : IN, OUT (Win32 LOGFONT structure)

  • = 0 : Success
  • < 0 : Fail

int hencFontSet( LOGFONT *lf )

Specify the setting value of the font to be used for map display.

LOGFONT *lf : IN (Win32 LOGFONT structure)

  • = 0 : Success
  • < 0 : Fail

int hencSelectObj( HENCOBJECT obj )

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

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

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

void hencObjToString( HENCOBJECT obj, string &str )

Converts the details of the object into a string.

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

None


const char *hencGetFilenameOfObj( HENCOBJECT obj )

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

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

EEncObject hencObjGetCode( HENCOBJECT obj )

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

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

EObjectPrimitiveType hencObjGetPrimType( HENCOBJECT obj )

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

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

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


int hencObjGetPoints( HENCOBJECT obj, S_OBJ_POLYGON *data )

Obtains the coordinate information of S-57 object.

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

HENCDEPTHMAP hencDepthmapGenerate()

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

None

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

int hencDepthmapSave( HENCDEPTHMAP hdd, const char *fn )

Save the created set of depth information to a file.

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

HENCDEPTHMAP hencDepthmapLoad( const char *fn )

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

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

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

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

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

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

int hencDepthmapDelete( HENCDEPTHMAP hdd )

Clear the memory occupied by the depth information set.

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

  • = 0 : Success
  • < 0 : Fail

int hencGetEncSymbolCount()

Obtain the number of available S-52 symbols.

None

Number of symbols available in the library


const char *hencGetEncSymbolName( int no )

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

int no : IN (Symbol number)

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

int hencDrawEncSymbol( LPCTSTR name )

Display the S-52 symbol on the screen.

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

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

Display the S-52 symbol on the screen.

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

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

Display the S-52 symbol on the screen.

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

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

Display the S-52 symbol on the screen.

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

int hencGetEncLineCount()

Obtain the number of available S-52 Complex Lines.

None

Number of Complex Lines available in the library


const char *hencGetEncLineName( int no )

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

int no : IN (Complex Line number)

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

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

Display the S-52 complex line on the screen.

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

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

Display the S-52 complex line on the screen.

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

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

Display the S-52 complex line on the screen.

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

int hencGetEncPatternCount()

Obtain the number of available S-52 Fill patterns.

None

Number of Fill patterns available in the library


const char * hencGetEncPatternName( int no )

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

int no : IN (Fill pattern number)

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

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

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

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

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

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

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

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

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

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

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

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

RGB value

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

RGB value

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

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

RGB value


const char * hencGetColorName( EEncColor color )

Obtain an acronym corresponding to the color code.

EEncColor color : IN (S-52 color code)

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

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

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

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

const char * hencGetObjectName( EEncObject obj )

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

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

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

const char * hencGetObjectDesc( EEncObject obj )

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

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

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

const char * hencGetAttrName( EEncAttr attr )

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

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

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

EEncAttr hencEnumAttr( const char *acronym )

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

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

S-57 Feature Attribute Code


EEncObject hencEnumObjectName( const char *acronym )

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

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

S-57 Feature Object Code


COLORREF hencGetUserColor( EEncColor eco )

Obtain the RGB value corresponding to the S-52 color code in the user’s color table.

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

RGB color value


void hencSetUserColor( EEncColor eco, COLORREF co )

Set the RGB value corresponding to the S-52 color code in the user’s color table.

  • EEncColor eco : IN (S-52 Color code)
  • COLORREF co : IN (RGB color)

None


void hencResetUserColor()

Set all color values in the custom palette to the standard day color palette

None

None


CEncUserImage *hencUserImageNew( const char *fnBmp )

Creates an image from an image file.

const char * fnBmp : IN (Image file name)

  • != NULL : Image Object
  • == NULL : Read Fail

int hencUserImageDelete( CEncUserImage * hui )

Releases the memory of the image object.

  • It must be a value generated by the function.
  • = 0 : Success
  • < 0 : Fail

int hencUserImageDrawAtMapPos( CEncUserImage * hui, double x, double y, double angle = 0, double scale = 1.0)

Draw an image object on the map’s top coordinate.

  • 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)

int hencUserImageDrawAtGlPos( CEncUserImage * hui, double x, double y, double z = 0, double angle = 0, double scale = 1)
  • Specifies z-coordinate
  • 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)
  • = 0 : Success
  • < 0 : Fail

int hencUsersymbolInit()
  • 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.

None

  • = 0 : Success
  • < 0 : Fail

void hencUsersymbolClear()
  • 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.

None

None


int hencUsersymbolDel( const char *name )

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.

const char * name : IN (Object name, Null-terminated string)

  • = 0 : Success
  • < 0 : Fail
int hencUsersymbolDel( CEncUserImage *img )

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.

CEncUserImage * img : IN (Pointer of user-defined symbol)

  • = 0 : Success
  • < 0 : Fail

int hencUsersymbolAddNewImage( CEncUserImage *imgNew, const char *fname)
  • 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.
  • 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.
  • = 0 : Success
  • < 0 : Fail

int hencUsersymbolAddToMap( CEncUserImage *imgNew, const char *name )
  • 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.
  • 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
  • = 0 : Success
  • < 0 : Fail

int hencUsersymbolGetCount()

The number of registered user defined symbols is obtained.

None

The number of registered user defined symbols


const char * hencUsersymbolGetName( int no )
  • 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.

int no : IN (Symbol number)

  • != NULL : The name of the user-defined image object. (Null-terminated string)
  • == NULL : Fail (Incorrect symbol number)
const char * hencUsersymbolGetName( CEncUserImage *img )

Obtain the symbol name of the object.

CEncUserImage *img : IN (Pointer of Image Object)

  • != NULL : The name of the user-defined image object.
  • == NULL : Fail (Incorrect symbol number)

CEncUserImage * hencUsersymbolGetImage( int no )
  • 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.

int no : IN (심볼 번호)

  • != 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)
CEncUserImage *hencUsersymbolGetImage( const char *name )
  • 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.

const char *name : IN (Object name, Null-terminated string)

  • != NULL : Success (Object pointer)
  • == NULL : Fail (Not existed object)

CEncUserObject * hencUserobjAdd( double x, double y, LPCTSTR name )

Add a user symbol on the map.

  • 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)
  • != 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
CEncUserObject * hencUserobjAdd( double x, double y, CEncUserImage *img )
  • 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.
  • double x : IN (longitude, degree)
  • double y : IN (latitude, degree)
  • CEncUserImage *img : IN (Image object pointer)
  • != 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

int hencUserobjDel( CEncUserObject *obj )

Delete user symbols on the map. Delete the object using the object pointer obtained when creating the object.

CEncUserObject *obj : IN (object pointer obtained when creating the object.)

  • = 0 : Success (Number of deleted userobj)

  • < 0 : Fail
int hencUserobjDel( CEncUserImage *obj )

Delete user symbols on the map. Deletes symbols at all positions using the image object of the same symbol.

CEncUserImage *obj : IN (User symbol image object)

  • = 0 : Success (Number of deleted userobj)

  • < 0 : Fail
int hencUserobjDel( double x, double y, LPCTSTR name )

Deletes the user-defined symbol with the specified location and the specified name.

  • 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)
  • = 0 : Success (Number of deleted userobj)

  • < 0 : Fail
int hencUserobjDel( const char *name )

Delete user symbols on the map. Deletes symbols at all positions using symbol image objects of the same name.

const char *name : IN (The name of the symbol registered in the symbol repository, Null-terminated string)

  • = 0 : Success (Number of deleted userobj)

  • < 0 : Fail
int hencUserobjDel( double x, double y )

Delete all user-defined symbols at the specified location on the map.

  • double x : IN (longitude, degree)
  • double y : IN (latitude, degree)
  • = 0 : Success (Number of deleted userobj)

  • < 0 : Fail

CEncUserObject * hencUserobjGet( int no )

Returns the object of the no-th user defined symbol.

int no : IN (User object number)

  • != NULL : Pointer value of user-defined object
  • This object is managed by the library and should not be deleted or freed manually
  • == NULL : Fail

int hencUserobjGetCount()

Returns the number of registered user defined symbols.

None

Number of user-defined symbols


int hencOptGetInt( const char *str, int def = 0 )

Reads the variable value with the name specified in the electronic chart setting INI file.

  • const char *str : IN (variable name)
  • int def : IN (The default value to use when the variable does not exist)

setting value


int hencOptSetInt( const char *str, int no )

Change the value of the variable with the name specified in the electronic chart setting INI file.

  • const chat *str : IN (variable name)
  • int no : IN (setting value)
  • = 0 : Success
  • < 0 : Fail

int hencOptSave()

Save the electronic chart settings as an INI file.

None

  • = 0 : Success
  • < 0 : Fail

int hencMapPosToWinPos( double &x, double &y )

Calculate the coordinate value of the GDI Window corresponding to the coordinate value of the coordinates of latitude/longitude on the map.

  • 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
  • = 0 : Success
  • < 0 : Fail

int hencWinPosToMapPos( double &x, double &y )

Calculates the coordinate value on the map corresponding to the Window GDI coordinate value.

  • 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)
  • = 0 : Success
  • < 0 : Fail

int hencMapPosToGlPos( double &x, double &y )

Calculate the OpenGL coordinate value set in the library corresponding to the coordinate value of the latitude and longitude on the map.

  • 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
  • = 0 : Success
  • < 0 : Fail

int hencGlPosToMapPos( double &x, double &y )

Calculates the map coordinate value corresponding to the OpenGL coordinate value set in the library.

  • 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)
  • = 0 : Success
  • < 0 : Fail

int hencWinPosToGlPos( double &x, double &y )

Calculate the library setting OpenGL coordinate value corresponding to GDI Pixel coordinate value.

  • 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
  • = 0 : Success
  • < 0 : Fail

int hencGlPosToWinPos( double &x, double &y )

Calculates the GDI pixel coordinate value corresponding to the OpenGL coordinate value set in the library.

  • 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
  • = 0 : Success
  • < 0 : Fail

double hencWgs84ToMercator( double lat )

Calculate the Mercator projection coordinate value corresponding to the WGS84 latitude value.

double lat : IN (WGS84 latitude, degree)

Mercator projection coordinate (latitude. degree)


double hencMercatorToWgs84( double mercator_y )

Calculates the WGS84 latitude value corresponding to the Mercator projection coordinate value.

double mercator_y : IN, Coordinate by Mecator projection. (latitude, degree)

Coordinate by WGS84 projection (latitude. degree)


GLuint hencCaptureMapTexture( GLuint texture = 0 )
  • 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.

GLuint texture : IN (OpenGL Texture name)

OpenGL Texture name


void hencRenderMapTexture( GLuint tex )

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.

GLuint texture : IN (OpenGL Texture name)

None


DWORD hencGetMapUpdateCounter()
  • 현재창에 대한 변경사항 카운터 값을 획득한다.
  • 변경사항 카운터 값을 클리어(clear) 한 후 전시 버퍼를 새로 그려야 하는 설정의 변경사항을 확인할 수 있는 카운터 값이다.
  • 이 값은 개별창을 기준으로 전시 버퍼에 대한 변동치 값이다.
  • 지도 설정이 바뀔 경우에는 모든 전시창의 변동치 값이 올라가고,
  • 개별창의 전시 설정이 바뀔 경우에는 해당하는 창의 변동치 값만 올라간다.
  • 단일 Viewport에 대해서만 유효한 값이며, 다수의 Viewport인 경우에는 직접 변동 여부를 확인해야 한다.

None

변경사항 카운터 값


void hencClearMapUpdateCounter()

Clear the change counter value for the current window.

None

None


void hencIncMapUpdateCounter()

Manually indicates that there are changes to the current window.

None

None


void hencIncMapUpdateCounterAll()

Manually indicates that there is a change to the entire window.

None

None


void hencClearMapUpdateCounterAll()

Clear change counters for all windows.

None

None


int hencPrintf( double x, double y, COLORREF co, const char *fmt, ... )
  • 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.
  • 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.
  • = 0 : Success

  • < 0 : Fail
int hencPrintf( double x, double y, double z, COLORREF co, const char *fmt, ... )
  • 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.
  • 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.
  • = 0 : Success

  • < 0 : Fail

void hencDrawVRM( double cx, double cy, double radius, int resoultion = 360 )

VRM(Variable Range Marker) As a drawing function, draw a polygon that connects points of the same distance with respect to the center point.

  • 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)

None


void hencDrawEBL( double cx, double cy, double bearing, double radius1, double radius2 )

EBL(Electronic Bearing Line) drawing function

  • 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)

None