JP2837243B2 - Graphic data compression method - Google Patents
Graphic data compression methodInfo
- Publication number
- JP2837243B2 JP2837243B2 JP17198790A JP17198790A JP2837243B2 JP 2837243 B2 JP2837243 B2 JP 2837243B2 JP 17198790 A JP17198790 A JP 17198790A JP 17198790 A JP17198790 A JP 17198790A JP 2837243 B2 JP2837243 B2 JP 2837243B2
- Authority
- JP
- Japan
- Prior art keywords
- point
- data
- chart
- straight line
- approximate
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Expired - Lifetime
Links
- 238000000034 method Methods 0.000 title claims description 29
- 238000013144 data compression Methods 0.000 title claims description 13
- 238000000605 extraction Methods 0.000 claims description 25
- 238000013075 data extraction Methods 0.000 claims description 9
- 230000006978 adaptation Effects 0.000 claims 1
- 238000010586 diagram Methods 0.000 description 7
- 230000006870 function Effects 0.000 description 3
- 238000007906 compression Methods 0.000 description 2
- 230000006835 compression Effects 0.000 description 2
- 238000013500 data storage Methods 0.000 description 2
- 238000004364 calculation method Methods 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
Landscapes
- Image Processing (AREA)
Description
【発明の詳細な説明】 (a)産業上の利用分野 この発明は、海岸線などの境界線を複数の点によって
表した図形データを圧縮して、少ないデータ数からなる
図形データを得る図形データ圧縮方法に関する。DETAILED DESCRIPTION OF THE INVENTION (a) Industrial application field The present invention compresses graphic data in which a boundary line such as a shoreline is represented by a plurality of points to obtain graphic data having a small number of data. About the method.
(b)発明の概要 この発明に係る図形データ抽出方法は、例えば船舶等
の航跡表示装置に表示される海図のデータを抽出する場
合等に適用されるものである。一般に、このような海図
データはROMやMT(磁気テープ)等に記憶されていて、C
RT等に表示する際に、不要なデータを間引き、不要なデ
ータのみ抽出して用いられている。(B) Summary of the Invention The graphic data extraction method according to the present invention is applied to, for example, extracting data of a chart displayed on a wake display device of a ship or the like. Generally, such chart data is stored in ROM, MT (magnetic tape), etc.
When displaying on an RT or the like, unnecessary data is thinned out and only unnecessary data is extracted and used.
基になる海図データは、印刷された海図の海岸線や等
深線をディジタイザを使用してディジタイズすることに
よってROMやMT等に記憶されるが、表示装置の表示デー
タ記憶容量、描画速度、表示可能な画素数等の能力や、
表示範囲に応じてデータを間引いて必要なデータのみ抽
出して用いる必要がある。The underlying chart data is stored in ROM, MT, etc. by digitizing the shorelines and contour lines of the printed chart using a digitizer.The display data storage capacity of the display device, drawing speed, and displayable pixels Abilities such as numbers,
It is necessary to extract and use only necessary data by thinning out data according to the display range.
この発明は、海図等の図形データを圧縮する際、少な
いデータ数で境界線としての必要な情報を失うことなく
効率的にデータ圧縮できるようにしたものである。According to the present invention, when compressing graphic data such as a marine chart, data can be efficiently compressed with a small number of data without losing necessary information as a boundary line.
(c)従来の技術 従来、例えば船舶における航跡表示装置においては、
予め記憶している海図データから表示すべきデータを抽
出する際に、等間隔でデータの抽出を行っている。(C) Conventional technology Conventionally, for example, in a wake display device in a ship,
When extracting data to be displayed from chart data stored in advance, data is extracted at regular intervals.
例えば、海図の全データ数が4万点あり、表示可能な
点数が1万点であれば、海図データのうち4点毎に抽出
を行っている。第7図は従来のデータ抽出の一例を表す
図である。図において各点はROMやMTに予め記憶されて
いる海図データの点を表し、2重丸は抽出された点を表
している。図に示すように4点毎にデータを抽出して、
このデータを基にして表示を行っている。For example, if the total number of chart data is 40,000 and the number of points that can be displayed is 10,000, the chart data is extracted every four points. FIG. 7 is a diagram showing an example of conventional data extraction. In the figure, each point represents a point of the chart data stored in the ROM or MT in advance, and a double circle represents an extracted point. Extract data every 4 points as shown in the figure,
Display is performed based on this data.
(d)発明が解決しようとする課題 ところが、このような従来の図形データ抽出方法にお
いては、次のような問題がある。(D) Problems to be Solved by the Invention However, such a conventional graphic data extraction method has the following problems.
まず、海図データから間引かれる点数以下の点数で構
成される島等が消滅するおそれがある。また、岬の先端
等海に突出した部分が消滅するおそれがある。更に、元
の海図データと抽出されたデータとの誤差を定量的に把
握することができない。First, there is a possibility that an island or the like composed of points equal to or less than the points thinned out from the chart data may disappear. In addition, there is a possibility that parts protruding into the sea, such as the tip of a cape, may disappear. Furthermore, the error between the original chart data and the extracted data cannot be grasped quantitatively.
そこで、出願人は特願昭61−295486号にて図形データ
に適合してデータ圧縮を行う図形データ抽出方法につい
て出願している。この先の出願によれば、結果的に、変
化の激しい点は密に抽出され、変化の緩やかな個所は疎
に抽出される。In view of this, the applicant has filed an application in Japanese Patent Application No. 61-295486 regarding a graphic data extraction method for compressing data in conformity with graphic data. According to the earlier application, as a result, points where the change is rapid are densely extracted, and portions where the change is gradual are sparsely extracted.
ところで、例えば海図データは船舶などにおいて航行
援助に関する装置に用いられるが、使用目的に応じて
は、ただ単に高い図形精度が要求されるだけでない。た
とえば海岸線を構成する点を間引いて得られる近似直線
が実際の海岸線より陸側を通るような場合には、本来陸
であるところが海として表されることになり、船舶の航
行上危険であるため、このようなことのない海図が要求
される。第7図に示した例では、点1−5間の直線L1や
点5−9間の直線L2によって表される海岸線は実際には
陸である部分を通るため、ハッチングで示す部分が海と
見做されることになる。By the way, for example, chart data is used in a device related to navigation assistance in a ship or the like. However, depending on the purpose of use, not only high graphic accuracy is simply required. For example, if the approximate straight line obtained by thinning out the points that make up the coastline passes on the land side from the actual coastline, the land that is originally land is represented as the sea, which is dangerous for the navigation of ships. A chart without such a thing is required. In the example shown in FIG. 7, the shoreline represented by the straight line L1 between the points 1-5 and the straight line L2 between the points 5-9 actually passes through the land, so that the hatched portion corresponds to the sea. Will be considered.
この発明の目的は、海岸線などの境界線が複数の点に
よって表された図形データを圧縮する際、境界線によっ
て区分される二つの領域のうちいずれか一方の領域にの
み近似直線が通るようにした図形データ圧縮方法を提供
することにある。An object of the present invention is to compress a graphic data in which a boundary line such as a shoreline is represented by a plurality of points so that an approximate straight line passes through only one of two regions divided by the boundary line. To provide a method of compressing graphic data.
(e)課題を解決するための手段 この発明は、海岸線などの境界線を複数の点によって
表した図形データを圧縮して、少ないデータ点数からな
る図形データを得る図形データ圧縮方法であって、 境界線を構成する複数の点のうち、データとして残す
点を抽出点とするとともに、この抽出点で境界線の一方
の側に接する接線を近似直線として求める近似直線抽出
処理と、 隣接する近似直線同士の交点を新たな近似点データと
する近似点データ生成処理と、 上記抽出点位置および近似点位置の変更によって、上
記抽出点と近似点からなる折線と境界線との距離を予め
定めた距離以内にする適合点データ抽出生成処理、 とからなる。(E) Means for Solving the Problems The present invention is a graphic data compression method for obtaining graphic data having a small number of data points by compressing graphic data representing a boundary line such as a coastline by a plurality of points. Approximate straight line extraction processing in which a point to be left as data among a plurality of points constituting a boundary line is set as an extraction point, and a tangent tangent to one side of the boundary line at the extraction point is obtained as an approximate line. An approximate point data generating process for setting the intersection of the two points as new approximate point data; and changing the extracted point position and the approximate point position to set a distance between a polygonal line formed by the extracted point and the approximate point and a boundary line in advance. And the matching point data extraction and generation processing within the range.
(f)作用 この発明の図形データ圧縮方法においては、近似直線
抽出処理によって、境界線を構成する複数の点のうち、
データとして残す点が抽出され、その抽出点で境界線の
一方の側に接する接線が近似直線として求められる。ま
た近似点データ生成処理によって、隣接する近似直線同
士の交点が新たな近似点データとして求められる。更に
適合点データ抽出生成処理によって、上記抽出点位置お
よび近似点位置が変更されて、抽出点と近似点からなる
折線と境界線との距離が予め定められた距離以内となる
ように抽出点および近似点が求められる。(F) Function In the graphic data compression method according to the present invention, the approximate line extraction processing is performed to select, among the plurality of points constituting the boundary line,
A point to be left as data is extracted, and a tangent at one side of the boundary at the extracted point is obtained as an approximate straight line. Further, the intersection of adjacent approximate straight lines is obtained as new approximate point data by the approximate point data generation processing. Further, the extraction point position and the approximate point position are changed by the matching point data extraction generation processing, and the extraction point and the approximate point are set so that the distance between the bent line and the boundary line formed by the extraction point and the approximate point is within a predetermined distance. An approximate point is determined.
上記各処理の具体例を第1図に基づいて説明する。第
1図において1〜29は元の境界線を表す図形データであ
り、近似直線抽出処理によって点1,2,6,8,12,14,18,19,
23,29がそれぞれ抽出点として求められるとともに、こ
れらの抽出点で海側に接する接線が近似直線として求め
られる。近似点データ生成処理では、隣接する近似直線
同士の交点4′,7′,10′,13′,21′,25′をそれぞれ新
たな近似点データとして生成する。このように抽出点と
近似点からなる折線と元の境界線との間には各部におい
てずれが生じるが、適合点データ抽出生成処理によっ
て、折線と境界線との距離が予め定めた距離Ls以内とな
るように抽出点位置および近似点位置が変更される。Specific examples of the above processes will be described with reference to FIG. In FIG. 1, reference numerals 1 to 29 denote graphic data representing the original boundary lines, and points 1, 2, 6, 8, 12, 14, 18, 19,
23 and 29 are obtained as extraction points, respectively, and the tangents to the sea side at these extraction points are obtained as approximate straight lines. In the approximate point data generation processing, intersections 4 ', 7', 10 ', 13', 21 ', and 25' between adjacent approximate straight lines are generated as new approximate point data. As described above, there is a deviation in each part between the bent line composed of the extraction point and the approximate point and the original boundary line, but the distance between the bent line and the boundary line is within the predetermined distance Ls by the matching point data extraction generation processing. The extraction point position and the approximate point position are changed so that
(g)実施例 この発明の実施例である図形データ圧縮方法の具体例
は次に示す通りである。(G) Embodiment A specific example of the graphic data compression method according to the embodiment of the present invention is as follows.
第1図において1−4′−7′−10′−13′・・・で
示される折線を構成する各近似直線(近似線分)はそれ
ぞれ始点−通過点−終点で構成される。第1図の例では
近似直線1−4′の始点は1、通過点は2、終点は4′
に相当し、近似直線4′−7′の始点は4′、通過点6
は、終点は7′に相当する。ここで点4′は点1と点2
とを結ぶ直線に対し点4から垂線をおろしたところの位
置である。同様に点7′は点4′と点6を結ぶ直線に対
し点7から垂線をおろしたところの位置である。以下1
0′,13′,21′,25′も同様である。以降これらの近似点
を′を付けて表す。なお、各近似直線が海図の境界線に
接する点(本願発明に係る「抽出点」)は必ず元の海図
データ上の1点を通過するので、この点を「通過点」と
いう。但し終点が元の海図データ上にある時には、通過
点と終点は一致する。In FIG. 1, each approximate straight line (approximate line segment) constituting the broken line indicated by 1-4'-7'-10'-13 '... Is constituted by a starting point, a passing point, and an ending point. In the example of FIG. 1, the starting point of the approximate straight line 1-4 'is 1, the passing point is 2, and the ending point is 4'.
And the starting point of the approximate straight line 4'-7 'is 4' and the passing point 6
Means that the end point is 7 '. Where point 4 'is point 1 and point 2
This is the position where the perpendicular is lowered from the point 4 with respect to the straight line connecting. Similarly, point 7 'is a position where a perpendicular line from point 7 to a straight line connecting point 4' and point 6 is lowered. Below 1
The same applies to 0 ', 13', 21 ', 25'. Hereinafter, these approximation points are indicated by adding '. The point where each approximate line touches the boundary of the chart (the “extraction point” according to the present invention) always passes through one point on the original chart data, and this point is referred to as a “passing point”. However, when the end point is on the original chart data, the passing point coincides with the end point.
上記各近似直線は、まず最初に通過点を求め、その後
に終点を求め、この終点を次の近似直線の始点として以
下同様の処理を繰り返すことによって求める。Each of the approximate straight lines is obtained by first obtaining a passing point, then obtaining an end point, and using this end point as a starting point of the next approximate straight line, and thereafter repeating the same processing.
第1図において4′が前回求めた近似直線1−4′の
終点とする。この点4′を始点とする近似直線の通過点
は次のようにして求める。In FIG. 1, 4 'is the end point of the approximate straight line 1-4' obtained last time. The passing point of the approximate straight line starting from this point 4 'is obtained as follows.
始点4′から例えば通過候補点7に向かって直線を引
き、この2点間に存在する点4(4(4′でない。)も
含めることに注意。)〜6の各点から上記直線に対して
垂線に下ろす。そして各垂線の長さとその正負を求め、
これらの垂線の全てが次の条件,を満足しているか
否かを判定し、点7がOKであれば点8を、点8がOKであ
れば点9という具合に順次通過候補点を進めて、元の海
図データの点番号が最大の値となる場合の通過候補点、
つまり初めてOKとならない点の1つ手前の点が通過点で
ある。A straight line is drawn from the starting point 4 'to, for example, the candidate passage point 7, and points 4 (not including 4 (4')) between the two points are included. And drop it to the vertical. Then find the length of each perpendicular and its sign,
It is determined whether or not all of these perpendiculars satisfy the following conditions. If point 7 is OK, point 8 is advanced. If point 8 is OK, point 9 is sequentially advanced. Pass candidate point when the point number of the original chart data has the maximum value,
In other words, the point before the point that is not OK for the first time is the passing point.
垂線の長さの符号は正(陸側)または0であるこ
と。つまり近似直線に対して元の海図データの点が陸側
にあること。The sign of the length of the perpendicular must be positive (land side) or 0. In other words, the point of the original chart data is on the land side with respect to the approximate straight line.
垂線の長さはLs以下であること。つまり近似直線と
元の海図データの点との距離がLs以下であること。The length of the perpendicular must be less than Ls. That is, the distance between the approximate straight line and the point of the original chart data is Ls or less.
例えば、7を通過点の候補として、4′から7に対し
て直線を結んだ場合、この直線より海側に6の点が存在
するので、点7は通過点として不適当であるから、その
1つ手前の点である6の点を通過点とする。For example, if 7 is a candidate for a passing point and a straight line is drawn from 4 ′ to 7 and there are 6 points on the sea side from this straight line, point 7 is inappropriate as a passing point. A point 6 which is one point before is set as a passing point.
上述の例では説明上通過点の候補を初めから7や6と
して説明したが、実際には始点4′の元の点即ち4の点
から順次、2点間の直線とその2点間に存在する他の点
との距離とその符号を求め、上記,の条件を満足し
なくなるまで、通過するべき点の候補を順次進めてい
く、その1つ手前の点を通過点とする。(点5が上記
,の条件を満足しない時には点4が通過点とな
る。) 〔終点の求め方〕 以上の方法によって近似直線の通過点が求められた
が、この近似直線をどこまで延ばすか、即ち終点をどこ
にするかが問題である。In the above example, the pass point candidates were described as 7 or 6 from the beginning, but in actuality, starting from the original point of the start point 4 ', that is, the point 4, a straight line between the two points and a straight line between the two points exist. The distance to the other point and the sign thereof are obtained, and candidates for points to be passed are sequentially advanced until the above condition is not satisfied. The point immediately before that is set as a passing point. (When the point 5 does not satisfy the above conditions, the point 4 becomes a passing point.) [Method of calculating the end point] The passing point of the approximate straight line is determined by the above method. That is, it is a problem how to set the end point.
第1図の例では始点を4′、通過点をと6する直線が
近似直線となったが、まず通過点の次の点7を終点候補
点とし、点7からこの直線に垂線をおろし前記,の
条件を満足しているか否か判定する。点7がOKであれば
点8を、点8がOKであれば点9という具合に順次終点候
補点を進めて、元の海岸線データの点番号が最大となる
場合の終点候補点が終点である。つまり初めてOKとなら
ない点の1つ手前の元の海岸線データの点番号nとすれ
ばn′が終点である。第1図においては7′が終点であ
る。なお、終点n′(近似点)とは限らず点14,点18の
ようにn(海図データ上の点)であるときもある。In the example of FIG. 1, a straight line having a starting point of 4 'and a passing point of 6 is an approximate straight line. First, a point 7 next to the passing point is set as an end point candidate point, and a perpendicular is drawn from this point to this straight line. , Are determined to be satisfied. If point 7 is OK, point 8 is advanced, if point 8 is OK, point 9 is advanced in order, and so on. If the point number of the original shoreline data is maximum, the end point candidate point is the end point. is there. In other words, if the point number n of the original shoreline data immediately before the point that is not OK for the first time is n, n 'is the end point. In FIG. 1, 7 'is the end point. The end point is not limited to n '(approximate point) but may be n (point on the chart data) like points 14 and 18.
但し終点は上記の判定だけでは決定できない場合があ
る。例えば第2図において、点18を通過点とする近似直
線が存在する時、前記,の条件だけでは終点は24′
となる。この時24′を始点として点24から通過点の判定
を行って次の近似直線を求めると、その近似直線の海側
に点22,23が存在することになる。これでは陸側に近似
直線を設けないという当初の目的が達成されない。そこ
で次のの条件が必要となる。However, the end point may not be determined only by the above determination. For example, in FIG. 2, when an approximate straight line having the passing point at point 18 exists, the end point is 24 'under the above conditions alone.
Becomes At this time, when the passing point is determined from the point 24 with the 24 'as the starting point and the next approximate straight line is obtained, the points 22 and 23 exist on the sea side of the approximate straight line. This does not achieve the original purpose of not providing an approximate straight line on the land side. Therefore, the following conditions are required.
通過点と終点との間に存在する各点と通過点との距
離lが通過点と終点間の距離より大きい時は、距離lが
最大となる点を求め、その点をkとすれば、k′を終点
とする。ここでlは通過点から各点までの距離で、始点
12′から通過点18へ向かう方向を正とする。第2図の例
ではl23が最大であるので23′が24′の代わりに終点と
なる。When the distance l between each passing point and the end point between the passing point and the end point is larger than the distance between the passing point and the end point, a point at which the distance l becomes the maximum is obtained. Let k 'be the end point. Where l is the distance from the passing point to each point, the starting point
The direction from 12 'to the passing point 18 is defined as positive. In the example of FIG. 2, since 23 is the maximum, 23 'is the end point instead of 24'.
以上の方法で一応近似直線は求められるが、例えば第
3図に示すように、68′を始点として82を終点とする近
似直線が存在する時、この近似直線よりも点Cを始点と
し、点82を終点とする近似直線(破線)の方が近似直線
としてふさわしい。つまり′の付く点を始点とし、′の
付かない点を終点とする近似直線には更にふさわしい近
似直線が存在する可能性がある。第3図の例では点Cを
始点し、点67を通過点とし、点82を終点とする直線を近
似直線とする。ここで、点67は1つ手前の近似直線の通
過点65から点82の1つ手前の点81までの間の各点におい
て、各点と点82を結ぶ直線のうち近似直線68′−82に最
も近い直線となる通過点である。この通過点67と終点82
を結ぶ直線と前回求めた近似直線63′−68′との交点が
Cである。以下この最もふさしい近似直線を求めること
を最近似直線の抽出という。An approximate straight line can be obtained by the above method. For example, as shown in FIG. 3, when there is an approximate straight line starting from 68 'and ending at 82, the point C is set as the starting point, The approximate straight line (broken line) ending at 82 is more suitable as the approximate straight line. In other words, there is a possibility that an approximate straight line that is more suitable for an approximate straight line having a point marked with 'as a start point and an end point not marked with' may be present. In the example shown in FIG. 3, a straight line starting from point C, passing point 67, and ending point 82 is an approximate straight line. Here, the point 67 is an approximate straight line 68'-82 among the straight lines connecting each point and the point 82 at each point between the passing point 65 of the approximate straight line immediately before and the point 81 just before the point 82. Is the passing point that becomes the straight line closest to. This pass point 67 and end point 82
Is the intersection point between the straight line connecting and the approximate straight lines 63'-68 'found last time. Hereinafter, obtaining the most suitable approximate line is referred to as extraction of the most approximate line.
次にこの発明の図形データ圧縮方法が適用される航跡
表示装置の例を示す。Next, an example of a wake display device to which the graphic data compression method of the present invention is applied will be described.
第4図は航跡表示装置のブロック図である。第4図に
おいてCPU100はこの発明に係る近似直線抽出処理,近似
点データ生成処理,適合点データ抽出生成処理などを行
う演算制御装置である。ROM101はCPU100の制御プログラ
ムを予め記憶するメモリ、RAM102はこのプログラムの実
行に際してワーキングエリアとして用いられるメモリを
表している。104はフロッピイディスクドライブ装置、1
03はそのコントローラを表し、CPU100はフロッピイディ
スクに予め書き込まれた海図データを読み込む。CRT107
は抽出したデータに基づいて海図を表示する表示装置で
あり、表示制御回路106によって駆動される。表示制御
回路106は表示メモリ105に書き込まれた表示データに従
って表示信号を作成し、CRT107へ出力する。CPU100は抽
出したデータと現在の船の位置に基づいて表示データを
作成して、表示メモリ105に書き込むことによって表示
を行う。キーボード109は抽出すべきデータ数等を設定
する入力装置であり、キーコントローラ108によってそ
の制御が行われる。測位装置110は現在の船の位置を測
定する装置である。FIG. 4 is a block diagram of the wake display device. In FIG. 4, a CPU 100 is an arithmetic and control unit that performs an approximate straight line extraction process, an approximate point data generation process, a suitable point data extraction and generation process, and the like according to the present invention. The ROM 101 represents a memory for storing a control program of the CPU 100 in advance, and the RAM 102 represents a memory used as a working area when executing the program. 104 is a floppy disk drive, 1
03 represents the controller, and the CPU 100 reads the chart data previously written on the floppy disk. CRT107
Is a display device for displaying a chart based on the extracted data, and is driven by the display control circuit 106. The display control circuit 106 creates a display signal according to the display data written in the display memory 105, and outputs it to the CRT 107. The CPU 100 creates display data based on the extracted data and the current position of the ship, and writes the display data into the display memory 105 to perform display. The keyboard 109 is an input device for setting the number of data to be extracted and the like, and is controlled by the key controller 108. The positioning device 110 is a device that measures the current position of the ship.
前記CPU100の処理手順を第5図に示すフローチャート
にしたがって説明する。The processing procedure of the CPU 100 will be described with reference to the flowchart shown in FIG.
第5図に示す各変数の意味は次の通りである。 The meaning of each variable shown in FIG. 5 is as follows.
Ls:近似直線に対する元の海図データとの許容設
定距離 Ns:抽出すべきデータ数(点数) D:抽出すべきデータ数の許容誤差 La(n):海図の緯度データ Lo(n):海図の経度データ X(n):海図のX座標データ Y(n):海図のY座標データ x(s):抽出した点のX座標データ y(s):抽出した点のY座標データ s:x(s),y(s)のポインタ n:X(n),Y(n)のポインタ SM:抽出点数 ΔA:計算毎のLsの変化量 X01:海図の基準点1のX座標データ Y01:海図の基準点1のY座標データ X02:海図の基準点2のX座標データ Y02:海図の基準点2のY座標データ La1:海図の基準点1の緯度データ Lo1:海図の基準点1の経度データ La2:海図の基準点2の緯度データ Lo2:海図の基準点2の経度データ ND:元の海図の全データ数(全点数) 第5図に示すように、まずLs,ΔA,Ns,Dの各値がそれ
ぞれキーボードから設定される(n1)。次に、フロッピ
ィディスクから海図の全データ数Ndと海図上の位置を長
さの単位で表したXY座標における全座標データX(1〜
Nd),Y(1〜Nd)と基準点1および2の位置データX01,
Y01,X02,Y02,La1,Lo1,La2,Lo2をそぞれ読み込む(n
2)。Ls: Permissible set distance from the original chart data to the approximate line Ns: Number of data to be extracted (points) D: Permissible error of the number of data to be extracted La (n): Latitude data of chart Lo (n): of chart Longitude data X (n): X coordinate data of a chart Y (n): Y coordinate data of a chart x (s): X coordinate data of an extracted point y (s): Y coordinate data of an extracted point s: x ( s), y (s) pointer n: X (n), Y (n) pointer S M : number of extraction points ΔA: change amount of Ls for each calculation X01: X coordinate data of reference point 1 of chart Y01: chart X02: X coordinate data of the reference point 2 of the chart. Y02: Y coordinate data of the reference point 2 of the chart. La1: Latitude data of the reference point 1 of the chart. Lo1: Longitude data of the reference point 1 of the chart. La2: Latitude data of reference point 2 of the chart Lo2: Longitude data of reference point 2 of the chart ND: Total number of data of the original chart (total points) As shown in Fig. 5, Not Ls, ΔA, Ns, each value of D is set from the keyboard, respectively (n1). Next, from the floppy disk, the total coordinate data X (1 to 1) in the XY coordinate system which represents the total number of data Nd of the chart and the position on the chart in units of length.
Nd), Y (1 to Nd) and position data X01,
Read Y01, X02, Y02, La1, Lo1, La2, Lo2 respectively (n
2).
続いて海図データの最初の点(1番の点)を無条件に
抽出すべき点とし、これを始点として記憶する(n3)。
その後ポインタsおよびnをそれぞれ2に設定し(n
4)、n番目の海図データX(n),Y(n)を一旦通過
点と見做して、その点を通過点とした場合に前記,
の条件を満足するか否かを判定する(n5→n6)。,
の条件を満足すれば、nをインクリメントし(n7)、同
様にn番目の海図データについて通過点の条件,の
判定を行う。第1図に示した例ではn=3とした時の
条件(近似直線に対して元の海図データの点が陸側にあ
ること。)を満足せず、結局点2が通過点として求めら
れ、これがx(2),y(2)に記憶される(n8)。次に
X(n),Y(n)(この時n=3である。)が終点条件
,を満足するか否かを判定する(n9)。この条件を
満足すればnをインクリメントし(n10)、同様に終点
条件の判定を繰り返す。第1図の例ではn=5となった
時終点条件を満足せずステップn11でnの値が4に戻
される。続いてこのn番目の海図データについて終点条
件を満足するか否かの判定を行う(n12)。第1図の
例ではの条件を満足するから、ポインタsをインクリ
メントし(n13)、最近似直線の抽出条件即ち始点に′
が付き終点に′が付かない場合であるか否かの判定を行
う(n14)。第1図に示した例ではその条件ではないた
め、n番目の海図データをs番目の抽出点として求め、
これを始点として記憶する(n17)。即ち第1図の海図
データの4番目の点を3番目の抽出点として記憶する。
その後、nが海図の全データ数Ndに達した否かの判定を
行い(n18)、達しないならばnをインクリメントし、
そのn番目の海図データ以降について通過点を求める
(n19→n5・・・)。Subsequently, the first point (the first point) of the chart data is unconditionally extracted as a point to be extracted and stored as a starting point (n3).
Thereafter, the pointers s and n are set to 2 (n
4) When the n-th chart data X (n), Y (n) is once regarded as a passing point and the point is regarded as a passing point,
It is determined whether or not the condition is satisfied (n5 → n6). ,
If the condition is satisfied, n is incremented (n7), and similarly, the condition of the passing point is determined for the n-th chart data. In the example shown in FIG. 1, the condition when n = 3 (the point of the original chart data is on the land side with respect to the approximate straight line) is not satisfied, and the point 2 is finally obtained as the passing point. Are stored in x (2) and y (2) (n8). Next, it is determined whether or not X (n), Y (n) (where n = 3) satisfies the end point condition (n9). If this condition is satisfied, n is incremented (n10), and the determination of the end point condition is similarly repeated. In the example of FIG. 1, when n = 5, the end point condition is not satisfied and the value of n is returned to 4 in step n11. Subsequently, it is determined whether or not the end point condition is satisfied for the n-th chart data (n12). Since the condition of the example of FIG. 1 is satisfied, the pointer s is incremented (n13), and the condition for extracting the closest straight line, that is, '
Then, it is determined whether or not the end point is marked with 'without the mark (n14). In the example shown in FIG. 1, since the condition is not the condition, the n-th chart data is obtained as the s-th extraction point,
This is stored as a starting point (n17). That is, the fourth point of the chart data in FIG. 1 is stored as the third extraction point.
Thereafter, it is determined whether or not n has reached the total number of data Nd of the chart (n18), and if not reached, n is incremented,
Pass points are obtained for the nth and subsequent chart data (n19 → n5...).
もしステップn12において終点条件を満足しなけれ
ば、そのの条件を満足するまでnをデクリメントする
(n12→n11・・・。)例えば第2図において一旦求めら
れた終点24′を23′に改める。If the end point condition is not satisfied in step n12, n is decremented until the condition is satisfied (n12 → n11...) For example, the end point 24 'once obtained in FIG. 2 is changed to 23'.
また、求められた終点が始点との関係で最近似直線の
抽出条件を満たすならば、ステップn15にて最近似直線
およびその最近似直線と前回求めた近似直線との交点C
を抽出し、C点の座標をs番目の抽出点として記憶する
(n16)。第3図に示した例では点67と終点82を結ぶ直
線を最近似直線として求め、これと前回の近似直線63′
−68′との交点をCとして求める。If the obtained end point satisfies the extraction condition of the most approximate line in relation to the start point, at step n15 the most approximate line and the intersection C of the most approximate line and the previously obtained approximate line
Is extracted, and the coordinates of the point C are stored as the s-th extraction point (n16). In the example shown in FIG. 3, the straight line connecting the point 67 and the end point 82 is obtained as the most approximated straight line,
The point of intersection with -68 'is determined as C.
上記ステップn5〜n19までの処理を海図データの全て
の点について行った後、海図データの最後のデータを終
点として抽出し記憶する(n18→n20→n21)。その後、
抽出した全データ数SMと抽出すべきデータ数Nsとの大小
比較を行う。もし、抽出したデータ数SMが抽出すべきデ
ータ数Nsを超える場合は初期設定した許容設定距離Lsの
値をΔAの値だけ増大させ、記憶内容消去した後、再び
同様の処理を行う(n22→n23→・・・)。もし、抽出し
たデータSMが抽出すべきデータ数Nsから許容誤差Dを引
いた値を下回った場合には、許容設定距離LsをΔAだけ
減少させて再び同様の処理を行う(n24→n25→・・
・)。After performing the above steps n5 to n19 for all points of the chart data, the last data of the chart data is extracted and stored as the end point (n18 → n20 → n21). afterwards,
Extract performs comparison between data speed Ns to be extracted and the total number of data S M was. If the number S M of extracted data exceeds the number Ns of data to be extracted, the value of the initially set permissible set distance Ls is increased by ΔA, the stored contents are erased, and the same processing is performed again (n22). → n23 → ・ ・ ・). If extracted when data S M falls below the value obtained by subtracting the allowable error D from the data speed Ns to be extracted, the allowable set distance Ls performed only reduced so again similar processing ΔA (n24 → n25 →・ ・
・).
以上の処理を繰り返して行い、抽出したデータ数S
Mが、初めに指定した抽出すべきデータ数Nsから許容誤
差Dの範囲内となれば、海図の2つの基準点の位置デー
タX01,Y01,X02,Y02,La1,Lo1,La2,Lo2を基に1〜SMの各
点の緯度,経度データLa(1〜SM),Lo(1〜SM)を求
め、これをRAM102に記憶する(n26)。海図の2つの基
準点の緯度,経度データとこの2つの基準点から海図デ
ータ中の各点のX,Y座標上の差によって各点の緯度,経
度データを求めることができる。なお、縮尺率が明らか
である場合には1つの基準点と縮尺率データを用いて緯
度,経度データに変換することもできる。Repeating the above process, the number of extracted data S
If M falls within the range of the allowable error D from the number Ns of data to be extracted initially specified, the position data X01, Y01, X02, Y02, La1, Lo1, La2, Lo2 of the two reference points on the chart are used. latitude of each point of 1 to S M, the longitude data La (1~S M), obtains the Lo (1~S M), stores it in the RAM 102 (n26). The latitude and longitude data of each point in the chart data can be obtained from the latitude and longitude data of the two reference points on the chart and the difference between the two reference points on the X and Y coordinates of each point in the chart data. If the scale is clear, it can be converted to latitude and longitude data using one reference point and scale data.
以上のようにして、元の海図との差が小さく、しかも
元の海図における陸側を通らない近似直線によってデー
タ圧縮することができる。As described above, the data can be compressed using an approximate straight line that has a small difference from the original chart and does not pass through the land side in the original chart.
なお、以上に示した実施例では通過点または終点を求
める際、前記の条件が満たされなければ、1つ手前の
点に戻ってこれをただちに通過点または終点として記憶
するようにしたが、の条件が満たされなくとも通過点
または終点の候補点を進めて行き、結果的に始点から通
過点までの間の各点または通過点から終点までの間の各
点について前記,の条件を満足すればよいものとし
て通過点または終点の抽出処理を行うこともできる。例
えば第6図に示す例では68′を始点として通過点を求め
ようとすれば、先の実施例によれば点72が通過点として
抽出されることになるが、今候補点を82まで進めた時68
〜81の全ての点は前記条件およびを満足するため、
候補点82を通過点および終点として抽出することができ
る。また、この点82を抽出した後、前記最近似直線の抽
出処理によって72−82を結ぶ直線(破線)を最近似直線
として求めることができる。In the embodiment described above, when the pass point or the end point is obtained, if the above condition is not satisfied, the point returns to the immediately preceding point and this is immediately stored as the pass point or the end point. Even if the condition is not satisfied, the candidate point of the passing point or the end point is advanced, and as a result, each of the points from the starting point to the passing point or the points from the passing point to the end point satisfies the above condition. As a matter of course, a process of extracting a passing point or an end point may be performed. For example, in the example shown in FIG. 6, if a pass point is to be obtained starting from 68 ', according to the previous embodiment, the point 72 will be extracted as a pass point. When 68
To 81 to satisfy the above conditions and
Candidate point 82 can be extracted as a passing point and an end point. After the point 82 is extracted, a straight line (broken line) connecting 72-82 can be obtained as the most approximate line by the process of extracting the most approximate line.
なお、この実施例では図形データの圧縮と表示の2つ
の機能を有する航跡表示装置を例としたが、それぞれの
機能を分離してもよい。そして予め表示装置の表示デー
タ記憶容量、描画速度、表示可能な画素数等の能力や表
示範囲に応じて、予め抽出した図形データをフロッピィ
ディスク、RAM102或いはROM101に記憶しておいてもよ
い。In this embodiment, a wake display device having two functions of compression and display of graphic data is described as an example, but the respective functions may be separated. The graphic data extracted in advance may be stored in the floppy disk, the RAM 102, or the ROM 101 in accordance with the display data storage capacity of the display device, the drawing speed, the number of displayable pixels, and other capabilities and the display range.
また、実施例では、海図として印刷された海岸線をデ
ィジタイザで読取り、海図データをX,Y座標データとし
てフロッピィディスクに予め記録した例であったが、海
図データは緯度,経度データで記憶しておいてもよい。In the embodiment, the shoreline printed as a chart is read by a digitizer, and the chart data is recorded in advance on a floppy disk as X and Y coordinate data. However, the chart data is stored as latitude and longitude data. May be.
(h)発明の効果 この発明によれば、複数の点によって構成される境界
線をデータ圧縮する際、近似直線が元の境界線に対し一
方の側に接する接線となるため、例えば海図データを圧
縮する際、元の海図データに存在していた海岸線が陸側
に退くのを禁止することができ、船舶の航行援助に適す
る図形データを容易に生成することができる。(H) Effects of the Invention According to the present invention, when data of a boundary line composed of a plurality of points is compressed, an approximate straight line becomes a tangent line which is in contact with one side of the original boundary line. At the time of compression, it is possible to prohibit the shoreline existing in the original chart data from retreating to the land side, and it is possible to easily generate graphic data suitable for ship navigation assistance.
第1図はこの発明の作用説明およびこの発明の実施例で
ある図形データ圧縮方法の具体例の説明に供する図であ
る。第2図および第3図は実施例の図形データ圧縮方法
の具体例を示す図である。第4図はこの発明の図形デー
タ圧縮方法が適用される航跡表示装置のブロック図、第
5図は同航跡表示装置の図形データ圧縮手順を表すフロ
ーチャートである。第6図は他の実施例に係る図形デー
タ圧縮方法を説明するための図、第7図は従来の図形デ
ータ圧縮方法を説明するための図である。FIG. 1 is a diagram for explaining the operation of the present invention and a specific example of a graphic data compression method according to an embodiment of the present invention. 2 and 3 are diagrams showing a specific example of the graphic data compression method according to the embodiment. FIG. 4 is a block diagram of a wake display device to which the graphic data compression method of the present invention is applied, and FIG. 5 is a flowchart showing a graphic data compression procedure of the wake display device. FIG. 6 is a diagram for explaining a graphic data compression method according to another embodiment, and FIG. 7 is a diagram for explaining a conventional graphic data compression method.
Claims (1)
した図形データを圧縮して、少ないデータ点数からなる
図形データを得る図形データ圧縮方法であって、 境界線を構成する複数の点のうち、データとして残す点
を抽出点とするとともに、この抽出点で境界線の一方の
側に接する接線を近似直線として求める近似直線抽出処
理と、 隣接する近似直線同士の交点を新たな近似点データとす
る近似点データ生成処理と、 上記抽出点位置および近似点位置の変更によって、上記
抽出点と近似点からなる折線と境界線との距離を予め定
めた距離以内にする適合点データ抽出生成処理、 とからなる図形データ圧縮方法。A graphic data compression method for compressing graphic data representing a boundary line such as a shoreline by a plurality of points to obtain graphic data having a small number of data points, comprising: An approximate straight line extraction process is performed in which a point to be left as data is set as an extraction point, and a tangent line which is in contact with one side of the boundary line at this extraction point is set as an approximate straight line. Approximation point data generation processing, and adaptation point data extraction generation processing for changing the distance between the extraction point and the approximation point to the broken line and the boundary line within a predetermined distance by changing the extraction point position and the approximation point position A graphic data compression method consisting of
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP17198790A JP2837243B2 (en) | 1990-06-28 | 1990-06-28 | Graphic data compression method |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP17198790A JP2837243B2 (en) | 1990-06-28 | 1990-06-28 | Graphic data compression method |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| JPH0460776A JPH0460776A (en) | 1992-02-26 |
| JP2837243B2 true JP2837243B2 (en) | 1998-12-14 |
Family
ID=15933436
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP17198790A Expired - Lifetime JP2837243B2 (en) | 1990-06-28 | 1990-06-28 | Graphic data compression method |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JP2837243B2 (en) |
-
1990
- 1990-06-28 JP JP17198790A patent/JP2837243B2/en not_active Expired - Lifetime
Also Published As
| Publication number | Publication date |
|---|---|
| JPH0460776A (en) | 1992-02-26 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US5363479A (en) | System and method for rendering bezier splines | |
| JP2837243B2 (en) | Graphic data compression method | |
| JP2609236B2 (en) | Chart data extraction device | |
| JPH02230382A (en) | Graphic data compressing method | |
| JPH052081B2 (en) | ||
| US5680153A (en) | Image Processing apparatus | |
| JPH0519194B2 (en) | ||
| JP3066060B2 (en) | Polygonal approximation method for Besee curve section | |
| JPH0293772A (en) | Contour approximating system | |
| JPS61194571A (en) | Graphic recognition mode | |
| JP2777628B2 (en) | Graphic processing method and apparatus | |
| JPH05264600A (en) | Three-dimensional waveform display device | |
| JP3089740B2 (en) | Line drawing device | |
| JPS60263986A (en) | Cursor display method with scale | |
| JP3211591B2 (en) | Image processing device | |
| JPH0145662B2 (en) | ||
| JP2988697B2 (en) | Figure recognition method | |
| JP2578965B2 (en) | Graphic processing unit | |
| JP3048091B2 (en) | Image processing device | |
| JPH0366705B2 (en) | ||
| JPH04342084A (en) | Method and device for plotting curve | |
| JPS61237184A (en) | Handwriting pattern input device | |
| JPS63211466A (en) | Graphic input device | |
| JPH0611363A (en) | Display device data reading method | |
| JPH10161799A (en) | Coordinate input device and processing method of handwritten locus |