The application is entitled " method and apparatus of spatial data handling, abbreviation and progressive transmission ", Application No.
201210104250.0th, the divisional application that the applying date applies for the China on April 11st, 2012, and enjoy Application No.
201110093024.2nd, the priority that the applying date applies for the China on April 14th, 2011.
The content of the invention
In view of this, the present invention provides the method and apparatus of a kind of effective spatial data handling, abbreviation and progressive transmission.
(One)Present invention is disclosed a kind of spatial data processing method, including:
Join according to each coordinate points in view control Parameter analysis spatial data set in advance in the view control
Correlation when being shown in view window determined by number between the pixel to be drawn;
According to above-mentioned analysis result, spatial data is handled according to the corresponding processing method of processing type of setting.
It is preferred that, institute's view control parameter includes:The width of the outsourcing rectangle of view window and the outsourcing square of view window
The height of shape.
Further, when the view mode is two-dimensional model, the view control parameter also includes:In the view
The rectangular extent of the spatial data shown in window.
Further, when the view mode is three dimensional pattern, the view control parameter also includes:Viewpoint parameter and
Projective parameter, the viewpoint parameter includes position of the viewpoint in world coordinate system, the target location observed by viewpoint and virtual
The upward vector of camera;The projective parameter includes:Rectangular projection and perspective projection.
It is preferred that, according to each coordinate points in view control Parameter analysis spatial data set in advance in the view
Correlation between the pixel to be drawn when being shown in view window determined by control parameter includes:
The seat of the spatial data in view window representated by a coordinate unit is obtained according to the view control parameter
Length under mark system;
According to each coordinate points in the length analysis spatial data in view determined by the view control parameter
Correlation between the pixel to be drawn when being shown in window.
It is preferred that, obtain the space number in view window representated by a coordinate unit according to the view control parameter
According to coordinate system under length include:
According to view coordinate system X-axis and coordinate system Y-axis calculate in view window representated by a coordinate unit
Length vXLength and vYLength under the original coordinate system of spatial data, its calculation formula is:
vXLength=vWidth/ViewWidth
vYLength=vHeight/ViewHeight
Wherein ViewWidth is the width of view window, and ViewHeight is the height of view window, and vWidth is display
The width of the rectangular extent of spatial data out, vHeight is the height of the rectangular extent of the spatial data shown;
VXLength represents the original coordinates of the spatial data representated by one coordinate unit of X-direction in view window
Length under system, vYLength represents the original of in the view window spatial data representated by one coordinate unit of Y direction
Length under coordinate system;Or using the minimum value in vXLength and vYLength, maximum or average value as in view window
Length under the original coordinate system of spatial data in mouthful representated by a coordinate unit.
It is preferred that, determined according to each coordinate points in the length analysis spatial data in the view control parameter
View window in correlation when showing between the pixel to be drawn include:
2 coordinate points PA and PB in spatial data are set in view window determined by the view control parameter to show
The pixel to be drawn when showing is respectively PAV and PBV;
The coordinate for subtracting PB X-axis with the coordinate of the X-axis of the PA takes absolute value, it is assumed that be dx;With the Y-axis of the PA
The coordinate that coordinate subtracts PB Y-axis takes absolute value, it is assumed that be dy;
If dx is less than vXLength, while dy is less than vYLength, then PAV and PBV relation is coincidence;
If dx is equal to vXLength, while dy is less than vYLength, then PAV and PBV relation is adjacent;
If dy is equal to vYLength, while dx is less than vXLength, then PAV and PBV relation is adjacent;
If dx is equal to vXLength, while dy is equal to vYLength, then PAV and PBV relation is to offset;
If dx be more than vXLength, or dy be more than vYLength, then PAV and PBV relation be from.
Above-mentioned setting processing type includes:In the analysis of spatial data, selection, abbreviation, progressive transmission any one or
A variety of combinations.
Present invention further teaches a kind of spatial data handling device, including:
Spatial data and pixel analysis unit, for according in view control Parameter analysis spatial data set in advance
It is mutual between the pixel to be drawn when each coordinate points is shown in view window determined by the view control parameter
Relation;
Spatial data handling unit, for according to above-mentioned analysis result, according to the corresponding processing side of processing type of setting
Method handles spatial data.
It can be seen from above-mentioned technical scheme that, spatial data processing method disclosed in the embodiment of the present invention, according in advance
Each coordinate points in the view control Parameter analysis spatial data of setting are in view window determined by the view control parameter
Correlation when being shown in mouthful between the pixel to be drawn, then according to analysis result, according to the processing type pair of setting
The processing method answered handles spatial data, thus can be with the spatial data after control process in the view control parameter institute
Spatial relationship when being shown in the view window of determination, such as carries out the self-adaptive non-loss abbreviation of spatial data, i.e., by spatial data
When being shown in the view window, the original coordinates point being shown in same pixel coverage only retains an original coordinates
Point, casts out other original coordinates points.
(Two)Present invention is disclosed a kind of simplifying method of spatial data, including:
According to view control gain of parameter abbreviation parameter set in advance;
Each coordinate points according to the abbreviation Parameter analysis spatial data are determined by the view control parameter
When being shown in view window, whether the coordinate points are shown in the range of same or several coordinate units to judge the coordinate
Whether point meets abbreviation condition;
According to analysis result, the coordinate points for meeting abbreviation condition are removed, that is, are shown in same or several coordinates
The original coordinates point in unit range, only retains an original coordinates point, casts out other original coordinates points.
It is preferred that, include according to view control gain of parameter abbreviation parameter set in advance:
The seat of the spatial data in view window representated by a coordinate unit is obtained according to the view control parameter
Length under mark system is used as abbreviation parameter;
1)According to view coordinate system X-axis and coordinate system Y-axis calculate in view window representated by a coordinate unit
Spatial data original coordinate system under length vXLength and vYLength, its calculation formula is:
vXLength=vWidth/ViewWidth
vYLength=vHeight/ViewHeight
Wherein ViewWidth is the width of view window, and ViewHeight is the height of view window, and vWidth is display
The width of the rectangular extent of spatial data out, vHeight is the height of the rectangular extent of the spatial data shown;
2) the abbreviation parameter vLength is determined according to vXLength and vYLength,
The determination method is:Minimum value, maximum or average value in vXLength and vYLength are taken as abbreviation
Parameter, or the abbreviation parameter is multiplied by a certain predetermined coefficient as final abbreviation parameter again, therefore according to control abbreviation essence
Degree requires specifically to set abbreviation parameter.
It is further preferred that including according to the process that the abbreviation parameters on space data carry out abbreviation:
1)First original coordinates point is chosen from the original coordinates point of the spatial data, coordinate point set is added to
Close, and regard this coordinate points as reference point;
2)Take next original coordinates point of the spatial data as pending coordinate points successively, calculate the reference point
The distance between with pending coordinate points, and judge whether the distance is more than the value of the abbreviation parameter, if greater than then by institute
State pending coordinate points and be added to coordinate point set, and regard the pending coordinate points as reference point;
3)Judge the pending coordinate points whether be the spatial data original coordinates point in last is original
Coordinate points, step 2 is performed if it is not, then returning);If so, then terminating, the coordinate points in the coordinate point set are used as the space
Data after data abbreviation.
Or preferably, include according to view control gain of parameter abbreviation parameter set in advance:
The seat of the spatial data in view window representated by a coordinate unit is obtained according to the view control parameter
Length under mark system is used as abbreviation parameter;
1)According to view coordinate system X-axis and coordinate system Y-axis calculate in view window representated by a coordinate unit
Spatial data original coordinate system under length vXLength and vYLength, its calculation formula is:
vXLength=vWidth/ViewWidth
vYLength=vHeight/ViewHeight
2) using vXLength and vYLength as abbreviation parameter,
Wherein ViewWidth is the width of view window, and ViewHeight is the height of view window, and vWidth is display
The width of the rectangular extent of spatial data out, vHeight is the height of the rectangular extent of the spatial data shown.
It is further preferred that including according to the process that the abbreviation parameters on space data carry out abbreviation:
1)First original coordinates point is chosen from the original coordinates point of the spatial data, coordinate point set is added to
Close, and regard this coordinate points as reference point;
2)Next original coordinates point of the spatial data is taken successively as pending coordinate points, with the reference point
The coordinate that the coordinate of X-axis subtracts the X-axis of pending coordinate points takes absolute value, it is assumed that be dx;With the coordinate of the Y-axis of the reference point
The coordinate for subtracting the Y-axis of pending coordinate points takes absolute value, it is assumed that be dy.Judge whether dx and dy is both less than the abbreviation parameter
Value, i.e. dx be less than vXLength, while dy be less than vYLength, if it is not, the pending coordinate points then are added into coordinate
Point set, and it regard the pending coordinate points as reference point;
3)Judge the pending coordinate points whether be the spatial data original coordinates point in last is original
Coordinate points, step 2 is performed if it is not, then returning);If so, then terminating, the coordinate points in the coordinate point set are used as the space
Data after data abbreviation.
Present invention further teaches a kind of spatial data abbreviation device, including:
Abbreviation parameter calculation unit, for according to view control parameter set in advance, calculating the sky of active view window
Between data abbreviation parameter;
Spatial data analysis unit, for each coordinate points according to the abbreviation Parameter analysis spatial data by described
When being shown in view window determined by view control parameter, whether the coordinate points are shown in same or several coordinate units
In the range of judge whether the coordinate points meet abbreviation condition;
Spatial data abbreviation unit, for according to analysis result, the coordinate points for meeting abbreviation condition to be removed, that is, shows
Show the original coordinates point in the range of same or several coordinate units, only retain an original coordinates point, cast out other
Original coordinates point.
It can be seen from above-mentioned technical scheme that, spatial data simplifying method is according to describedization disclosed in the embodiment of the present invention
Simple parameter, the original coordinates point of analysis space data, when spatial data is shown in the view window, is shown in same
Or several coordinate units(Such as one or several pixels)In the range of the original coordinates point only retain an original coordinates point,
Cast out other original coordinates points.Spatial data after abbreviation spatial data in this way, abbreviation is in the view window
Display effect during display can be controlled by abbreviation parameter, it is ensured that the spatial data after abbreviation is in the view window
On realize lossless display, and ensure the correct display of the spatial relationship between the spatial data after abbreviation, while reducing data biography
Throughput rate, improves data transmission efficiency and display efficiency.
(Three)Present invention further teaches a kind of progressive transmission of spatial data for being applied to request transmitting terminal, including:
When needing request incremental data, incremental data request is sent, control parameter is included in the request;
Receive the incremental number obtained after being analyzed according to the control parameter that the request bag contains original spatial data
According to.
It is preferred that, determine the need for asking incremental data according to following steps:
Judge whether the abbreviation parameter of the spatial data formerly cached is more than the abbreviation ginseng of the active view window
Number, if being more than, needs to ask incremental data, if being not more than, is not required to ask incremental data.
It is further preferred that when asking Sender side Storage to have the spatial data formerly cached, the control parameter includes
The abbreviation parameter of the abbreviation parameter of active view window and the spatial data formerly cached, or, the control parameter includes working as
The positional information of the abbreviation parameter of front view window and the coordinate points of the spatial data formerly cached in luv space data.
Still further preferably, the incremental data of the reception is inserted into the spatial data formerly cached.
Wherein, the incremental data by the reception is inserted into the process bag in the spatial data formerly cached
Include:
Obtain the positional information of the luv space data coordinates point in the incremental data;
According to the positional information, the original coordinates point in the incremental data is inserted into the space formerly cached
The correspondence position of data.
Or wherein, the incremental data by the reception is inserted into the process in the spatial data formerly cached
Including:
It regard the abbreviation parameter of the spatial data formerly cached as the current abbreviation parameter of the view window;
Search and shown with the incremental data original coordinates point in the view window according to the current abbreviation parameter
When corresponding view window on the original coordinates point of spatial data that formerly caches described in pixel identical;
The original coordinates point of the incremental data is inserted into the view window corresponding when the view window is shown
Behind the original coordinates point of the same spatial data formerly cached of pixel;
The abbreviation parameter for replacing the spatial data formerly cached is the abbreviation parameter of the active view window.
It is preferred that, when asking transmitting terminal to be not stored in the spatial data first cached, the control parameter includes:Work as forward sight
The abbreviation parameter of figure window.
It is further preferred that caching the incremental data of the reception.
Present invention further teaches a kind of spatial data progressive transmission device for being applied to request transmitting terminal, including:
Request transmitting unit, during request incremental data, sends incremental data request, is wrapped in the request for determining to need
Containing control parameter;
Data receipt unit, for receiving according to the control parameter to the incremental number that is obtained after luv space data analysis
According to.
Present invention further teaches a kind of progressive transmission of spatial data for being applied to request receiving terminal, including:
The incremental data request that request transmitting terminal is sent is received, control parameter is included in the incremental data request;
Original spatial data is analyzed and processed according to the control parameter that the request bag contains, request transmitting terminal is obtained
Required incremental data;
The incremental data is sent to the request transmitting terminal.
It is preferred that, when asking Sender side Storage to have the spatial data formerly cached, the control parameter includes:Work as forward sight
The abbreviation parameter of the abbreviation parameter of figure window and the spatial data formerly cached.
It is further preferred that described analyze and process to original spatial data, required for acquisition request transmitting terminal
Incremental data process includes:
Abbreviation parameter according to the spatial data formerly cached carries out abbreviation to original spatial data, obtains first abbreviation
As a result;
Abbreviation parameter and the first abbreviation result according to the active view window are carried out to original spatial data
Abbreviation is analyzed, and is obtained incremental data, that is, is determined in the current abbreviation result, and the not original in the first abbreviation result
Beginning coordinate points are incremental data.
Or, it is preferred that when asking Sender side Storage to have the spatial data formerly cached, the control parameter includes:
The positional information of the abbreviation parameter of active view window and the coordinate points of the spatial data formerly cached in luv space data.
It is further preferred that described analyze and process to original spatial data, required for acquisition request transmitting terminal
Incremental data process includes:
Position of the coordinate points in luv space data according to the spatial data of the first caching in the control parameter
Information takes out corresponding original coordinates point from the luv space data, is used as first abbreviation result;
Abbreviation parameter and the first abbreviation result according to the active view window are carried out to original spatial data
Abbreviation is analyzed, and is obtained incremental data, that is, is determined in the current abbreviation result, and the not original in the first abbreviation result
Beginning coordinate points are incremental data.
It is preferred that, when asking transmitting terminal to be not stored in the spatial data first cached, the control parameter includes:Work as forward sight
The abbreviation parameter of figure window.
It is further preferred that described analyze and process to original spatial data, required for acquisition request transmitting terminal
Incremental data process includes:
Abbreviation parameter according to the active view window carries out abbreviation analysis to original spatial data;
It is incremental data to determine the point of the original coordinates after abbreviation.
Present invention further teaches a kind of spatial data progressive transmission device for being applied to request receiving terminal, including:
Request reception unit, for receiving the incremental data request that request transmitting terminal is sent, in the incremental data request
Include control parameter;
Analytic unit, according to, comprising control parameter, the luv space data for being determined for compliance with increment condition are in the request
Incremental data;
Data transmission unit, for sending the incremental data to the request transmitting terminal.
It can be seen from above-mentioned technical scheme that, progressive transmission of spatial data disclosed in the embodiment of the present invention, request
Transmitting terminal carries the abbreviation ginseng for the view window for being currently needed for being shown in the request when sending incremental data request
Number so that request receiving terminal can be analyzed the incremental data for obtaining showing in active view window, passed according to abbreviation parameter
It is defeated, it is ensured that obtained incremental data and the spatial data formerly cached lossless can be shown after rebuilding, while reducing data
Transmission quantity, improves data transmission efficiency.
The analysis of spatial data processing method described in the present embodiment, such as spatial data, selection, abbreviation, progressive transmission,
It is true in view control parameter institute according to each coordinate points in view control Parameter analysis spatial data set in advance
Correlation between the pixel to be drawn when being shown in fixed view window, then referring to the correlation to spatial data
Handled, so that the processing procedure to spatial data can be entered with each coordinate points of spatial data in view window
Correlation during row display between the pixel of required drafting is foundation, so that specific processing procedure can be actually to enter
Situation during row display is reference, improves the efficiency and accuracy rate in processing procedure.
Embodiment
Below in conjunction with the accompanying drawing in the embodiment of the present invention, the technical scheme in the embodiment of the present invention is carried out clear, complete
Site preparation is described, it is clear that described embodiment is only a part of embodiment of the invention, rather than whole embodiments.It is based on
Embodiment in the present invention, it is every other that those of ordinary skill in the art are obtained under the premise of creative work is not made
Embodiment, belongs to the scope of protection of the invention.
Describe for convenience, spatial data to be processed will be needed to be referred to as luv space data in present specification, it is necessary to
The coordinate of the spatial data of processing is referred to as the original coordinates of luv space data, it is necessary to which the coordinate points of the spatial data of processing claim
The original coordinates point for luv space data, or directly be referred to as original coordinates point.
The invention discloses a kind of method of spatial data handling, abbreviation and progressive transmission, when spatial data is in view window
Shown on mouth, be by electronic curtain(View window)On rasterizing realize that the angle that is shown from spatial data is empty
Between correlation between data and between the coordinate points of spatial data, be the pixel institute table by being drawn in view window
Existing, therefore can be by being regarded according to each coordinate points in view control Parameter analysis spatial data set in advance described
Correlation between the pixel to be drawn when being shown in view window determined by figure control parameter, including overlap, offset,
Adjacent and from four kinds relations, then according to above-mentioned analysis result, locate according to the corresponding processing method of processing type of setting
Spatial data, such as the abbreviation of spatial data are managed, its corresponding actual scene is:Because the resolution ratio of view window is limited
, when high-resolution spatial data is shown in view window, have the data of expressive space data details part(Coordinate
Point)It can be plotted in identical pixel, that is, overlap, as long as at this moment taking the coordinate points drawn in this pixel to ensure that
The lossless of spatial data shows that the coordinate points that other draftings meet abbreviation condition in this pixel can be removed, therefore, according to
Above-mentioned thought, first according to view control parameter, according to view coordinate system X-axis and coordinate system Y-axis calculate in view window
In a coordinate unit(Such as a pixel unit)Length vXLength under the original coordinate system of representative spatial data and
VYLength, determines abbreviation parameter, then according to the abbreviation parameter, analysis space data according to vXLength and vYLength
Original coordinates point, when spatial data is shown in the view window, be shown in same or several coordinate units(As
One or several pixels)In the range of the original coordinates point only retain an original coordinates point, cast out other original coordinates
Point, realizes the abbreviation to spatial data.Spatial data after abbreviation is shown or transmitted, spatial data is not only can guarantee that
Lossless display, accomplish adaptive abbreviation, and can guarantee that the correctness that spatial relationship is shown between spatial data, because aobvious
Show in effect, with the effect shown after abbreviation be before abbreviation as, further, improve spatial data efficiency of transmission and
The purpose of display efficiency.When map amplifies, it is relatively more that spatial data is shown to the number of pixels filled on screen(Spatial data
The graphics Web publishing of display is big), it is necessary to more coordinate points carry out the detail section of expressive space data, as long as by these coordinate points
(Incremental data)Take and be inserted into corresponding existing spatial data from luv space data, still can be ensured
The lossless display of spatial data.The present invention is suitable for the abbreviation and progressive transmission of vector data, is also suitable for raster data
Abbreviation and progressive transmission, due to there is more problem in existing vector data processing procedure, so in the embodiment of the present invention with
It is described based on vector data, its specific implementation is as described below:
A kind of method flow of spatial data handling disclosed in the embodiment of the present invention as shown in figure 1, including:
First step, regarded described according to each coordinate points in view control Parameter analysis spatial data set in advance
Correlation between the pixel to be drawn when being shown in view window determined by figure control parameter;
View control parameter in the present embodiment includes:The outsourcing rectangle parameter of view window, the outsourcing square of view window
Shape parameter is the view window scope (0,0, ViewWidth, ViewHeight) of display space entity, such as computer screen map
The scope of display window, including:The width ViewWidth of the outsourcing rectangle of view window and the outsourcing rectangle of view window height
Spend ViewHeight, pass through the two parameters, it may be determined that in actual view window be used for show figure, the window of image it is big
Small range.
When the view mode of actual view window is two-dimensional model, the view control parameter also includes:Regarded described
The rectangular extent of the spatial data shown in figure window, that is, the electronic map shown in view window ground
Manage the rectangular extent of coordinate.
When the view mode of actual view window is three dimensional pattern, being removed in its view control parameter includes view window
Outside outsourcing rectangle parameter, in addition to viewpoint parameter and projective parameter, the viewpoint parameter is including viewpoint in the world set in advance
Position O (x in coordinate systemo,yo,zo), xo,yo,zoObserved by three components, viewpoints of the expression viewpoint in world coordinate system
Target location A (xa,ya,za) and the upward vectorial up (x of virtual cameraup,yup,zup);The projective parameter includes:Just trade
Shadow and perspective projection.
Join according to each coordinate points in view control Parameter analysis spatial data set in advance in the view control
Correlation when being shown in view window determined by number between the pixel to be drawn, described correlation includes weight
Close, offset, adjacent and from four kinds relations.The process includes two steps of S11a, S11b respectively:
Step S11a, according to the view control parameter, obtain the sky representated by a coordinate unit in view window
Between data coordinate system under length:
According to view coordinate system X-axis and coordinate system Y-axis calculate in view window representated by a coordinate unit
Length vXLength and vYLength under the original coordinate system of spatial data, its calculation formula is:
vXLength=vWidth/ViewWidth
vYLength=vHeight/ViewHeight
Wherein ViewWidth is the width of view window, and ViewHeight is the height of view window, and vWidth is display
The width of the rectangular extent of spatial data out, vHeight is the height of the rectangular extent of the spatial data shown.
VXLength represents the original coordinates of the spatial data representated by one coordinate unit of X-direction in view window
Length under system, vYLength represents the original of in the view window spatial data representated by one coordinate unit of Y direction
Length under coordinate system;Or using the minimum value in vXLength and vYLength, maximum or average value as in view window
Length under the original coordinate system of spatial data in mouthful representated by a coordinate unit.
Step S11b, according to the length under the coordinate system of the spatial data representated by a coordinate unit in the view window
Degree, wants when each coordinate points in analysis space data are shown in view window determined by the view control parameter
Correlation between the pixel of drafting:
Each coordinate points in spatial data are wanted when being shown in view window determined by the view control parameter
Correlation between the pixel of drafting includes:Overlap, it is adjacent, offset, from
Assuming that the 2 coordinate points PA and PB, PA and PB of spatial data are in view window determined by the view control parameter
The pixel to be drawn is PAV and PBV when being shown in mouthful;
The coordinate for subtracting PB X-axis with the coordinate of the X-axis of the PA takes absolute value, it is assumed that be dx;With the Y-axis of the PA
The coordinate that coordinate subtracts PB Y-axis takes absolute value, it is assumed that be dy.
If dx is less than vXLength, while dy is less than vYLength, then PAV and PBV relation is coincidence;
If dx is equal to vXLength, while dy is less than vYLength, then PAV and PBV relation is adjacent;
If dy is equal to vYLength, while dx is less than vXLength, then PAV and PBV relation is adjacent;
If dx is equal to vXLength, while dy is equal to vYLength, then PAV and PBV relation is to offset;
If dx be more than vXLength, or dy be more than vYLength, then PAV and PBV relation be from.
Step S12, the relationship analysis result according to above-mentioned S11b, come according to the corresponding processing method of processing type of setting
Handle spatial data.The setting processing type includes:It is any one in the analysis of spatial data, selection, abbreviation, progressive transmission
Plant or a variety of combinations.
Such as, the processing type set is spatial data abbreviation, and processing method is in the view window by spatial data
During middle display, the original coordinates point of the spatial data in same pixel is shown in, i.e. correlation between pixel is attached most importance to
Close, only retain an original coordinates point, cast out other original coordinates points.
It can be seen from above-mentioned technical scheme that, spatial data processing method foundation is set in advance disclosed in the embodiment of the present invention
Each coordinate points in fixed view control Parameter analysis spatial data are in view window determined by the view control parameter
Correlation between the pixel to be drawn during middle display, then according to analysis result, according to the processing type correspondence of setting
Processing method handle spatial data, thus can with the spatial data after control process in view control parameter institute really
Spatial relationship when being shown in fixed view window, such as carries out the self-adaptive non-loss abbreviation of spatial data, i.e., spatial data exists
When being shown in the view window, the original coordinates point being shown in same pixel coverage only retains an original coordinates point,
Cast out other original coordinates points.
The spatial data handling device that the present invention is disclosed, as shown in Fig. 2 including:
Spatial data and pixel analysis unit, for according in view control Parameter analysis spatial data set in advance
It is mutual between the pixel to be drawn when each coordinate points is shown in view window determined by the view control parameter
Relation;
Spatial data handling unit, for according to above-mentioned analysis result, according to the corresponding processing side of processing type of setting
Method handles spatial data.
The implementation procedure of spatial data handling device disclosed in the present embodiment by corresponding to the embodiments of the present invention public affairs
The embodiment of the method flow opened, is preferably device embodiment, and its specific implementation procedure can be found in above method embodiment, herein
Repeat no more.
A kind of method flow of spatial data abbreviation disclosed in the embodiment of the present invention as shown in figure 3, including:
Step S31, according to view control parameter set in advance obtain abbreviation parameter;
Step S32, according to the abbreviation Parameter analysis spatial data each coordinate points by the view control parameter
When being shown in identified view window, whether the coordinate points are shown in the range of same or several coordinate units to judge
Whether the coordinate points meet abbreviation condition;
According to the abbreviation parameter, the original coordinates point of analysis space data, by spatial data in the view window
During display, whether the original coordinates point is shown in same or several coordinate units(Such as one or several pixels)In the range of
To judge whether the original coordinates point meets abbreviation condition.
Step S33, according to analysis result, the coordinate points for meeting abbreviation condition are removed.
The original coordinates point of abbreviation condition will be met, that is, be shown in same or several coordinate units(It is such as same
Pixel or several pixels)In the range of the original coordinates point, only retain an original coordinates point, cast out other original coordinates
Point.
Wherein, the different abbreviation parameters that step S31 is drawn can draw different abbreviation conditions, specific such as Fig. 4, Fig. 5
It is shown.
Above-mentioned view control parameter includes:The width of view window and the height of view window, show in view window
The rectangular extent of spatial data come is shown.The width ViewWidth of the view window and height ViewHeight of view window
The view window scope (0,0, ViewWidth, ViewHeight) of display space data is determined, such as computer screen map shows
Show the scope of window, pass through the two parameters, it may be determined that be used for the size model of the window of display image in actual view window
Enclose.
The rectangular extent of the spatial data shown in view window refers to show the spatial data in the range of this
In view window, that is, the spatial data that can be shown in view window outsourcing rectangle, its specific value range
Set according to actual display situation, the width of the rectangular extent of the spatial data is vWidth, is highly vHeight.
Fig. 4 discloses the first specific abbreviation embodiment, and one is obtained in view window according to the view control parameter
Coordinate unit(Such as a pixel)Length under the original coordinate system of representative spatial data, is determined described according to the length
Abbreviation parameter, abbreviation precision is controlled by abbreviation parameter.
1)The coordinate unit in view window calculated according to view coordinate system X-axis and coordinate system Y-axis(Such as one
Pixel unit)Length vXLength and vYLength under the original coordinate system of representative spatial data, its calculation formula
For:
vXLength=vWidth/ViewWidth
vYLength=vHeight/ViewHeight
2)The abbreviation parameter vLength is determined according to vXLength and vYLength.
The determination method is:Minimum value, maximum or average value in vXLength and vYLength are taken as abbreviation
Parameter, or above-mentioned abbreviation parameter is multiplied by some predetermined coefficient as abbreviation parameter again, the predetermined coefficient can be according to reality
Situation is set, therefore abbreviation parameter is specifically set according to control abbreviation required precision.
Concretely comprise the following steps:
Step S41, according to view control parameter set in advance obtain abbreviation parameter;
Step S42, first original coordinates point of selection from the original coordinates point of the spatial data, are added to seat
Punctuate set, and it regard this coordinate points as reference point;
Step S43, the next original coordinates point for taking the spatial data successively calculate described as pending coordinate points
The distance between reference point and pending coordinate points, and judge whether the distance is more than the value of the abbreviation parameter, if greater than
The pending coordinate points are then added to coordinate point set, and regard the pending coordinate points as reference point;
Step S44, judge the pending coordinate points whether be the spatial data original coordinates point in last
Individual original coordinates point, step S43 is performed if it is not, then returning;If so, then terminating, the coordinate points conduct in the coordinate point set
Data after the spatial data abbreviation.
Fig. 5 discloses the second specific abbreviation embodiment, and one is obtained in view window according to the view control parameter
Length under the coordinate system of spatial data representated by coordinate unit is used as abbreviation parameter;
1)According to view coordinate system X-axis and coordinate system Y-axis calculate in view window representated by a coordinate unit
Spatial data original coordinate system under length vXLength and vYLength, its calculation formula is:
vXLength=vWidth/ViewWidth
vYLength=vHeight/ViewHeight
2) it regard vXLength and vYLength as abbreviation parameter.
Wherein ViewWidth is the width of view window, and ViewHeight is the height of view window, and vWidth is display
The width of the rectangular extent of spatial data out, vHeight is the height of the rectangular extent of the spatial data shown.
Concretely comprise the following steps:
Step S51, according to view control parameter set in advance obtain abbreviation parameter;
Step S52, first original coordinates point of selection from the original coordinates point of the spatial data, are added to seat
Punctuate set, and it regard this coordinate points as reference point;
Step S53, next original coordinates point of the spatial data is taken successively as pending coordinate points, with the ginseng
The coordinate for the X-axis for subtracting pending coordinate points according to the coordinate of the X-axis of point takes absolute value, it is assumed that be dx;With the Y-axis of the reference point
The coordinate of the coordinate Y-axis that subtracts pending coordinate points take absolute value, it is assumed that be dy.Judge whether dx and dy is both less than describedization
The value of simple parameter, i.e. dx are less than vXLength, while dy is less than vYLength, if it is not, then adding the pending coordinate points
Reference point is used as to coordinate point set, and using the pending coordinate points;
Step S54, judge the pending coordinate points whether be the spatial data original coordinates point in last
Individual original coordinates point, step S53 is performed if it is not, then returning;If so, then terminating, the coordinate points conduct in the coordinate point set
Data after the spatial data abbreviation.
The flow of progressive transmission of spatial data disclosed by the invention as shown in fig. 6, including:
Step S61, when need request incremental data when, send incremental data request, in the request include control parameter;
Progressive transmission of spatial data in the present embodiment is applied to request transmitting terminal, when request transmitting terminal is judged to need
When asking incremental data, incremental data request is sent to request receiving terminal, works as forward sight comprising request transmitting terminal in the request
The abbreviation parameter of figure window.
There are two kinds of situations in this step, if request transmitting terminal is cached with spatial data, control parameter includes working as forward sight
The abbreviation parameter of the abbreviation parameter of figure window and the spatial data formerly cached so that request receiving terminal can be according to the control
Parameters on space data carry out abbreviation analysis, obtain incremental data.Or, when the request transmitting terminal is cached with spatial data
When, control parameter includes:The abbreviation parameter of active view window and the coordinate points of the spatial data formerly cached are in luv space
Positional information in data.
If request transmitting terminal does not have spatial cache data, control parameter now includes the abbreviation of active view window
Parameter.
Step S62, reception are obtained after being analyzed according to the control parameter that the request bag contains original spatial data
Incremental data
In progressive transmission of spatial data disclosed in the present embodiment, transmitting terminal is asked when sending incremental data request,
The control parameter carried in the request contains the abbreviation parameter of the spatial data in the view window for being currently needed for being shown, its
Computational methods are referring to step S31 so that request receiving terminal can be analyzed according to control parameter and obtain being suitable for active view window
Incremental data, it is ensured that spatial data after reconstruction can be carried out according to the display effect controlled beforehand through abbreviation parameter
It has been shown that, can realize lossless display, while reducing volume of transmitted data, improve data transmission efficiency.
Another progressive transmission of spatial data disclosed by the invention, this method is applied to request transmitting terminal, based on request
Transmitting terminal is cached with the situation of the spatial data formerly cached, including:
The abbreviation parameter for the spatial data that step S71, acquisition are formerly cached;
Step S72, judge the spatial data formerly cached abbreviation parameter whether be more than the active view window
Abbreviation parameter, if so, then perform step S73, if it is not, then terminating;
Step S73, transmission incremental data request, include control parameter in the request;
Control parameter now includes:The abbreviation parameter of active view window and the abbreviation ginseng of the spatial data formerly cached
Number.
Step S74, receive according to the control parameter luv space data are subjected to the incremental number that obtains after abbreviation analysis
According to;
Step S75, the incremental data of the reception is inserted into the spatial data formerly cached.
The spatial data formerly cached due to now asking transmitting terminal to be cached with, so needing to insert the incremental data of reception
Enter into the spatial data formerly cached, realize data reconstruction, the data after reconstruction are shown as active view window correspondence
Spatial data.
Incremental data disclosed by the invention by the reception is inserted into the process in the spatial data formerly cached
Including:
Step S81, it regard the abbreviation parameter of the spatial data formerly cached as the current abbreviation of the view window
Parameter;
Step S82, search with the incremental data original coordinates point in the view according to the current abbreviation parameter
The original coordinates point of the spatial data formerly cached described in pixel identical in window view window corresponding when showing;
Step S83, the original coordinates point of the incremental data is inserted into it is corresponding when the view window is shown
Behind the original coordinates point of the same spatial data formerly cached of view window pixel;
Step S84, the abbreviation that the abbreviation parameter of the replacement spatial data formerly cached is the active view window
Parameter.
The another incremental data by the reception disclosed by the invention is inserted into the spatial data formerly cached
Process includes:
Step S91, the luv space data coordinates point obtained in the incremental data positional information;
Step S92, according to the positional information, the original coordinates point in the incremental data is inserted into described formerly slow
The correspondence position for the spatial data deposited;
Step S93, the abbreviation that the abbreviation parameter of the replacement spatial data formerly cached is the active view window
Parameter.
The present embodiment discloses the process being inserted into the incremental data of the reception in the spatial data formerly cached
Including being suitable for asking receiving terminal that the positional information of the original coordinates point in the incremental data has been sent into request transmitting terminal
Situation.
Described in the present embodiment when asking transmitting terminal to be cached with the spatial data formerly cached, request transmitting terminal is being sentenced
Break when to need request incremental data, send incremental data request, need what is shown with active client in request of data
The abbreviation parameter of the spatial data of active view window as the active view window in control parameter abbreviation parameter so that its
The incremental data of request can be adjusted according to the abbreviation parameter of active client, and the incremental data of reception is inserted into formerly
In the spatial data of caching, data reconstruction is carried out, using the data after reconstruction as the corresponding display data of active view window, with
It ensure that the spatial data after rebuilding can be shown according to the display effect controlled beforehand through abbreviation parameter, Neng Goushi
Existing lossless display.This method simple and flexible, it is easy to accomplish, and amount of calculation is small, efficiency high.
The flow of another progressive transmission of spatial data disclosed by the invention is as shown in Figure 10, including:
Step S101, the incremental data request for receiving request transmitting terminal transmission, include control parameter in the request;
Progressive transmission of spatial data disclosed in the present embodiment is applied to request receiving terminal.Its data increment received please
The type for the control parameter asked is corresponding with the type in embodiment illustrated in fig. 6.When request Sender side Storage has first caching
Spatial data when, the control parameter includes:The abbreviation parameter of active view window and the change of the spatial data formerly cached
Simple parameter.
Step S102, according to the control parameter that the request bag contains original spatial data is analyzed and processed, it is determined that
The luv space data for meeting increment condition are incremental data;
Step S103, the transmission incremental data to the request transmitting terminal.
In progressive transmission of spatial data disclosed in the present embodiment, request receiving terminal is according to control parameter to luv space
Data carry out abbreviation analysis, described to refer to foregoing spatial data abbreviation to the method that luv space data carry out abbreviation analysis
Method(Step S31 to step S54)And it regard the luv space data for meeting incremental data condition as incremental data.This method
In, the analysis process to spatial data is carried out according to the control parameter in incremental data request, i.e. the reality to ask transmitting terminal
Show based on view window, to ensure that the incremental data obtained is sent to request transmitting terminal, request transmitting terminal receives described increase
Measuring the spatial data after data and reconstruction can be shown according to the display effect controlled beforehand through abbreviation parameter, can
Lossless display is realized, while being only transmitted incremental data, volume of transmitted data is greatly reduced, data transfer effect is improved
Rate.
Another progressive transmission of spatial data disclosed by the invention, this method is applied to request receiving terminal, based on request
Transmitting terminal is cached with the situation of the spatial data formerly cached, including:
Step S111, the incremental data request for receiving request transmitting terminal transmission, include control parameter in the request;
The control parameter includes:The abbreviation parameter of active view window and the abbreviation ginseng of the spatial data formerly cached
Number.
Step S112, the abbreviation parameter according to the spatial data first cached carry out abbreviation to original spatial data, obtain
First abbreviation result;
Step S113, the abbreviation parameter according to the active view window and the first abbreviation result are to original space
Data carry out abbreviation analysis, obtain incremental data, that is, determine in the current abbreviation result, and not in the first abbreviation knot
Original coordinates point in fruit is incremental data;
Step S114, the incremental data is sent to request transmitting terminal.
It is described that foregoing spatial data simplifying method refer to the method that luv space data carry out abbreviation(Step S31
To step S54).
In addition, when asking transmitting terminal there is no spatial cache data, then in the absence of the abbreviation of the spatial data formerly cached
Parameter, the control parameter includes:The abbreviation parameter of active view window.Request receiving terminal is receiving incremental data request
Afterwards, the abbreviation parameter according to the active view window is by the luv space data progress abbreviation of request, and obtained data are
Incremental data, and this incremental data is sent to request transmitting terminal.Request transmitting terminal is received after incremental data, by incremental data
The data for needing to show as active view window, are shown, and using this incremental data as first spatial cache data,
Using the abbreviation parameter of the active view window as the spatial data formerly cached abbreviation parameter, after carrying out
Continuous progressive transmission processing.
Further, when it is described request transmitting terminal send request in control parameter include:The abbreviation of active view window
During positional information in luv space data of parameter and the coordinate points of the spatial data formerly cached, according to the control parameter
Carry out abbreviation analysis to luv space data, and it is determined for compliance with the process that the luv space data of increment condition are incremental data
Including:
Step S121, according to the first caching in the control parameter spatial data coordinate points in luv space data
In positional information from the luv space data by corresponding original coordinates point take out, be used as first abbreviation result;
Step S122, the abbreviation parameter according to the active view window and the first abbreviation result are to original space
Data carry out abbreviation analysis, obtain incremental data, that is, determine in the current abbreviation result, and not in the first abbreviation knot
Original coordinates point in fruit is incremental data.
The present invention discloses a kind of spatial data abbreviation device, as shown in figure 13, including:Abbreviation parameter calculates single
Member, spatial data analysis unit, spatial data abbreviation unit.
Wherein:
Abbreviation parameter calculation unit, for according to view control parameter set in advance, calculating the sky of active view window
Between data abbreviation parameter;
Spatial data analysis unit, for each coordinate points according to the abbreviation Parameter analysis spatial data by described
When being shown in view window determined by view control parameter, whether the coordinate points are shown in same or several coordinate units
In the range of judge whether the coordinate points meet abbreviation condition;
Spatial data abbreviation unit, for according to analysis result, the coordinate points for meeting abbreviation condition to be removed, that is, shows
Show the original coordinates point in the range of same or several coordinate units, only retain an original coordinates point, cast out other
Original coordinates point.
The implementation procedure of spatial data abbreviation device disclosed in the present embodiment by corresponding to the embodiments of the present invention public affairs
The embodiment of the method flow opened, is preferably device embodiment, and its specific implementation procedure can be found in above method embodiment, herein
Repeat no more.
The present invention discloses a kind of spatial data progressive transmission device, as shown in figure 14, including:Request sends single
Member, during request incremental data, sends incremental data request, control parameter is included in the request for determining to need;Data connect
Unit is received, for receiving the incremental data for by luv space data obtain after abbreviation analysis according to the control parameter.
The implementation procedure of spatial data progressive transmission device disclosed in the present embodiment is corresponding to the embodiments of the present invention
Disclosed embodiment of the method flow, is preferably device embodiment, and its specific implementation procedure can be found in above method embodiment,
It will not be repeated here.
Spatial data progressive transmission device is arranged at client disclosed in the present embodiment, or is connected with client, according to
The present case of client sends incremental data request, and the incremental data received.
Another spatial data progressive transmission device disclosed by the invention, as shown in figure 15, including:Request reception unit, point
Analyse unit, data transmission unit.
Wherein:Request reception unit, for receiving the incremental data request that request transmitting terminal is sent, the incremental data please
Control parameter is included in asking;
Analytic unit, for analyzing the luv space data, is determined for compliance with the luv space data of increment condition to increase
Measure data;
Data transmission unit, for sending the incremental data to request transmitting terminal.
The implementation procedure of spatial data progressive transmission device disclosed in the present embodiment is corresponding to the embodiments of the present invention
Disclosed embodiment of the method flow, is preferably device embodiment, and its specific implementation procedure can be found in above method embodiment,
It will not be repeated here.
Spatial data progressive transmission device is arranged at server end disclosed in the present embodiment, or is connected with server end,
Receive after incremental data request, the control parameter in being asked according to incremental data obtains incremental data, and sends it to request
Transmitting terminal.
Data processing equipment disclosed by the invention can be arranged in computer, can also be arranged on mobile phone or other can be with
In equipment using the present invention, or other smart machines.It can both be arranged on request receiving terminal, will ask transmitting terminal
Before the data of request are sent, spatial data is handled first, request transmitting terminal can be also disposed at, is being sent to
To before actual view window, data are handled, or are arranged on server and request transmitting terminal simultaneously, according to actual feelings
Condition selection is handled jointly by which side or both sides.
The embodiment of each in this specification is described by the way of progressive, and what each embodiment was stressed is and other
Between the difference of embodiment, each embodiment identical similar portion mutually referring to.For device disclosed in embodiment
For, because it is corresponded to the method disclosed in Example, so description is fairly simple, related part is said referring to method part
It is bright.
Professional further appreciates that, with reference to the unit of each example of the embodiments described herein description
And algorithm steps, can be realized with electronic hardware, computer software or the combination of the two, in order to clearly demonstrate hardware and
The interchangeability of software, generally describes the composition and step of each example according to function in the above description.These
Function is performed with hardware or software mode actually, depending on the application-specific and design constraint of technical scheme.Specialty
Technical staff can realize described function to each specific application using distinct methods, but this realization should not
Think beyond the scope of this invention.
Directly it can be held with reference to the step of the method or algorithm that the embodiments described herein is described with hardware, processor
Capable software module, or the two combination are implemented.Software module can be placed in random access memory(RAM), internal memory, read-only deposit
Reservoir(ROM), electrically programmable ROM, electrically erasable ROM, register, hard disk, moveable magnetic disc, CD-ROM or technology
In any other form of storage medium well known in field.
The foregoing description of the disclosed embodiments, enables professional and technical personnel in the field to realize or using the present invention.
A variety of modifications to these embodiments will be apparent for those skilled in the art, as defined herein
General Principle can be realized in other embodiments without departing from the spirit or scope of the present invention.Therefore, it is of the invention
The embodiments shown herein is not intended to be limited to, and is to fit to and principles disclosed herein and features of novelty phase one
The most wide scope caused.