Developer Reference V2.2 Release Notes

ENCX 2.2.0.130 was released on 13 August 2015

This release of ENCX has a number of enhancements and bug fixes.

New GeoPointFormatter class. This is accessible from the Library object and allows you to convert a GeoPoint to different lat-lon or grid formats.

UseNationalGrid - when true the new GeoPoint.FormattedPosition property will return a string containing the national grid representation of that point.  If no national grid is available, then if UseUniversalGrid is true and the UTM grid is available then the UTM coordinates are returned.  If UseUniversalGrid is false or UTM is not available at that point, then the lat-lon format is returned.

UseUniversalGrid - when true returns the UTM grid representation of that point.  Note that if UseNationalGrid is set to true and a national grid is available at that point, then this property is ignored.  UTM is not available at high latitudes therefore lat-lon format is returned for some positions.

Format - the form to return for lat-lon values.  You should ensure that both grid formats are set to false if you want lat-lon values for all positions on the earth's surface.  The available formats are:

  • D_MM_SS_S - degrees, minutes, seconds to 1 decimal place, e.g. 53°28'24.1"N 1°28'16.4"W
  • D_MM_SS_SS - degrees, minutes, seconds to 2 decimal places, e.g. 53°28'24.12"N 1°28'16.36"W
  • D_MM_MMM - degrees, minutes to 3 decimal places, e.g. 53°28.402'N 1°28.273'W
  • D_MM_MMMM - degrees, minutes to 4 decimal places, e.g. 53°28.4020'N 1°28.2727'W
  • D_DDDDD - degrees to 5 decimal places, e.g. 53.47337°N 1.47121°W
  • D_DDDDDD - degrees to 6 decimal places, e.g. 53.473367°N 1.471211°W

New GeoPointFormatter examples:

Consider this GeoPoint:

var pt = new ENCX.GeoPoint();
pt.LatLonString = "53.473367, -1.471211";

For UTM grid:

m_lib.GeoPointFormatter.UseUniversalGrid = true;
m_lib.GeoPointFormatter.UseNationalGrid = false;
m_lib.GeoPointFormatter.Format = ENCX.LatLonFormat.D_MM_SS_SS;
string pos = pt.FormattedPosition;

pos = W003 N 0601468 5926018

For national grid:

m_lib.GeoPointFormatter.UseUniversalGrid = false;
m_lib.GeoPointFormatter.UseNationalGrid = true;
m_lib.GeoPointFormatter.Format = ENCX.LatLonFormat.D_MM_SS_SS;
string pos = pt.FormattedPosition;

pos = SK 35196 97530

And for lat-lon degrees, minutes, seconds to 2 decimal places:

m_lib.GeoPointFormatter.UseUniversalGrid = false;
m_lib.GeoPointFormatter.UseNationalGrid = false;
m_lib.GeoPointFormatter.Format = ENCX.LatLonFormat.D_MM_SS_SS;
string pos = pt.FormattedPosition;

pos = 53°28'24.12"N 1°28'16.36"W

In addition to the new FormattedPosition property, a new method has been added to GeoPoint: ParseLatLon will attempt to decode whatever string you pass in as a lat-lon value. It allows the string to contain degree, minute and second symbols. Note that this method does not parse grid coordinates.

New DrawGrid property on S57Draw allows ENCX to draw a simple geodetic grid on top of S-57 data.

New Scalebar property on S57Draw allows the units of the scale bar to be specified as either nautical miles or kilometres.

GeoLine's bearing and length properties are now correctly re-calculated whenever and however the start and end points of the line are modified.  There was also a confusing inconsistency in behaviour between the Point1 property and the SetPoint1 method where changing the former would adjust Point2 to keep the length and bearing constant; whereas the latter would adjust the length and bearing, keeping Point2 constant.  This has been changed so now both keep Point2 constant and the bearing and length are re-calculated.

New World Vector Shoreline

A new version of the world vector shoreline is available for download with this release.  This version includes improved shore outlines, the Suez and Panama Canals, rivers and political boundaries as well as more small islands.

The old world vector shoreline can still be downloaded from here.

ManageENC - UCS

This version of ENCX also includes a new version of ManageENC that lets you download ENC cells from the new Chersoft Universal Chart Server (UCS) and automatically install them.  This makes it very simple to ensure you have the latest editions of the cells installed.  The service is capable of obtaining the latest cells for whatever permits you have installed.  Alternatively, if you are using unecnrypted NOAA data, you can use it to keep this up-to-date.

Note about Windows DPI settings

Whilst not specific to this release, you may also to want to take note of this article about changes to how Windows reports DPI to applications.


Previous Recent Releases

ENCX 2.2.0.32 was released on 26th March 2015

This is a maintenance release with the following fixes:

  • The scale bar is now drawn correctly in Mercator projection when SetPositionAndScaleExact is called.
  • Missing source files added to the EncView_MFC sample.

ENCX 2.2.0.0 was released on 12th February 2015

This version of ENCX has been upgraded to support the following:

  • S-52 version 6.0
  • Presentation Library version 3.4 CS_MD08
  • S-57 version 3.1.3

A new method "RefreshDirectory" has been added to the ManageENC.Manager class in this release.  This should be called after all of the individual loose cells have been installed and replaces the previous mechanism of calling InstallCells with an empty update then looping while the installer was busy completing the task.  See Installing a "loose" chart cell for more details on installing individual cells.

In addition, we have fixed an issue when drawing some NOAA cells.  A few cells, such as US1GC09M, put group 1 features (e.g. LNDARE) inside association objects (e.g. to name a group of islands). When ENCX displayed these cells at reduced scale (much less detailed than compilation scale), such that only group 1 objects were displayed, the nested group 1 features were not drawn.  ENCX 2.2 fixes this issue.