CN108491173B - Cross-map page paging printing method based on geographical PDF map - Google Patents
Cross-map page paging printing method based on geographical PDF map Download PDFInfo
- Publication number
- CN108491173B CN108491173B CN201810129874.5A CN201810129874A CN108491173B CN 108491173 B CN108491173 B CN 108491173B CN 201810129874 A CN201810129874 A CN 201810129874A CN 108491173 B CN108491173 B CN 108491173B
- Authority
- CN
- China
- Prior art keywords
- map
- printing
- coordinate system
- layout
- 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.)
- Active
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/12—Digital output to print unit, e.g. line printer, chain printer
- G06F3/1201—Dedicated interfaces to print systems
- G06F3/1223—Dedicated interfaces to print systems specifically adapted to use a particular technique
- G06F3/1237—Print job management
- G06F3/125—Page layout or assigning input pages onto output media, e.g. imposition
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/12—Digital output to print unit, e.g. line printer, chain printer
- G06F3/1201—Dedicated interfaces to print systems
- G06F3/1223—Dedicated interfaces to print systems specifically adapted to use a particular technique
- G06F3/1237—Print job management
- G06F3/1253—Configuration of print job parameters, e.g. using UI at the client
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Human Computer Interaction (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Processing Or Creating Images (AREA)
- Instructional Devices (AREA)
Abstract
The invention relates to a cross-map page paging printing method based on a geographical PDF map, which comprises the steps of preprocessing geographical PDF map data, enabling the contents of the geographical PDF map of adjacent maps to keep space reference consistency, selecting a data range of the geographical PDF map to be printed based on a map, retrieving a geographical PDF map file, extracting contents corresponding to different map geographical PDF maps in a set grid according to a set geographical PDF map printing layout and paging printing parameters, and directly printing and outputting the contents in pages on a printer by the aid of necessary elements. The method has a large printing range, and is supported to select a large range of map contents across map sheets in an effective range of geographical PDF map data in the same projection zone for printing and outputting, and the paging edge connecting precision is improved for making a large wall map or a paper map set for later-stage splicing and sticking.
Description
Technical Field
The invention belongs to the technical field of geographic PDF map drawing, and particularly relates to a cross-map page printing method based on a geographic PDF map.
Background
The geographical PDF map is a novel map product between a traditional electronic map and a paper map. The method has the characteristics of stable and reliable paper map drawing effect, free zooming and query analysis of the traditional electronic map, can be independent of a GIS system, and can be applied to both professional and non-professional users.
Ordinary geographical PDF maps are typically produced in terms of map sheets, each map sheet corresponding to a geographical PDF map file. For non-professional applications, any commercial software capable of browsing PDF files can basically print map pages directly, but is ineffective for cross-map printing of adjacent maps. With the continuous expansion of the application range, professional electronic map users have increasingly urgent needs for cross-map-format printing of geographical PDF maps, and they want to obtain a paging printing function of a large range of cross-maps based on geographical PDF map files of a plurality of adjacent maps, so as to make a large hanging map or paper atlas through splicing and pasting. Because the geographical PDF map of each map has a strict spatial reference system and drawing rules, the geographical PDF map of each map has complete map layout and external finishing elements, and splicing the contents of adjacent geographical PDF maps together for printing and outputting has greater professional technical difficulty. The main body is as follows: 1) the content range of the geographical PDF map only occupies one part of a PDF page, and the PDF page (or page image) cannot be directly used for cross-map splicing printing; 2) redundant finishing elements such as an outer figure outline, a figure name, a legend, a scale and the like are contained outside an inner figure outline of a geographical PDF map sheet, and the map content in a PDF page cannot be directly supported to be spliced and printed across the map sheets; 3) the geographical PDF map is possibly generated through different processing modes, and the map page space references of adjacent map sheets are not completely consistent, wherein one of the most common problems is that through map projection, the map is properly rotated in the production process of the geographical PDF map so as to keep the map content and the PDF page visually horizontal, and at the moment, the map-crossing-map splicing printing is forcibly carried out without accurate and uniform space reference.
Currently, commercial software supporting PDF printing cannot directly support cross-map page-by-page printing of a geographical PDF map. There are also few cases supporting professional application of the geographical PDF map, and GeoPDF in the united states (GeoPDF manufactured by TerroGo Technologies developed by Layton Graphics corporation in the united states) and research results of huhaojie et al (key technology research on geographical PDF map making [ D ], university of information engineering thesis, 2011, zheng) do not provide a solution for direct page-across-page printing based on the geographical PDF map. Therefore, the method for designing and realizing the page-by-page printing of the cross-map-sheet based on the geographic PDF map has important innovation and specific application value.
Disclosure of Invention
The invention aims to provide a page-crossing printing method based on a geographical PDF map, which is used for realizing direct page-crossing printing based on the geographical PDF map and improving the page edge connecting precision of a large hanging map or a paper map set manufactured by splicing and sticking based on the geographical PDF map.
The technical scheme adopted by the invention is as follows:
the page-crossing paging printing method based on the geographical PDF map is characterized by comprising the following steps:
the method is realized by the following steps:
the method comprises the steps of preprocessing geographic PDF map data to enable the contents of adjacent map geographical PDF maps to keep space reference consistency, selecting a geographic PDF map data range to be printed based on a map connecting table, retrieving a geographic PDF map file, extracting contents corresponding to different map geographical PDF maps by using a set grid according to a set geographic PDF map printing layout and paging printing parameters, and directly printing and outputting the contents in pages on a printer by using necessary elements.
The method specifically comprises the following steps:
the method comprises the following steps that firstly, a geographical PDF map mixed plane coordinate system model is formed on the basis of a hexahydric group plane coordinate system and a control point list, and conversion interfaces of coordinates in six plane coordinate systems are designed;
secondly, preprocessing data, and unifying spatial reference systems of adjacent map amplitude geographical PDF maps in the same projection zone;
thirdly, designing a printing layout of the geographical PDF map, and configuring layout elements of the printing layout;
and fourthly, setting appropriate paging printing parameters, constructing a printer coordinate system model, and sequentially and directly paging and printing out all layout elements in the printing layout on the printer according to the sequence.
In the first step, the conversion interface function comprises a positive solution function and a negative solution function with the same number, and the total number of the functions is 2 xC6 2The calculation of 30 coordinate system conversion interface functions is realized, wherein the forward solution function and the reverse solution function listed in the first five substeps are the most basic 10 functions, and the other 20 functions are realized by the combination and nesting of the 10 functions.
In the first step, the hexahydric group plane coordinate systems are respectively a data source coordinate system, a geographic coordinate system, a projection coordinate system, an equal-scale paper map coordinate system, a PDF page coordinate system and an output device coordinate system, and main parameters of each plane coordinate system are defined.
The second step, data preprocessing, unifying the spatial reference system of the geographical PDF map of the adjacent map frames in the same projection band, and is realized by the following steps:
a) reading the spatial reference system parameters of a geographical PDF map file of a single map, acquiring the counterclockwise map rotation angle a after projection, and establishing an MPSCS example of the map; if the angle of a is 0, directly carrying out the third step; otherwise, carrying out the next step b);
b) clockwise rotating the content of the geographical PDF map page by an angle a, storing the content as a new geographical PDF map file, collecting page coordinates of points at the left lower part and the right upper part of the map outline in the map as control points, and recalculating related parameters of MPSCS in a).
The third step, designing the printing layout of the geographical PDF map, configuring layout elements of the printing layout, and realizing the following steps:
a) setting the size and the margin of a printing layout, generating a printing layout in an application program window, constructing a pixel coordinate system and an interface window coordinate system of the printing layout, and establishing a coordinate conversion relation between Lcs and Wcs;
b) designing a map layout element model, creating a map layout element in a printing layout, associating geographical PDF map data sources based on a map layout element position range given in a map connecting range and the printing layout, and determining the display position of the data sources in the printing layout by modifying MPSCS object parameters read by each data source;
c) associating geographical PDF map data and dividing drawing grids of map layout elements;
d) loading data according to the drawing grid and drawing the map content in the grid unit;
e) necessary layout elements are added in a pattern of vector graphics, text, or pictures in the printing layout.
The invention has the following advantages:
(1) the printing range is large. The method comprises the steps that map contents in a large range are selected across map frames in an effective range of geographical PDF map data in the same projection zone, and printing output is carried out;
(2) and the paging edge jointing precision is high. According to the set paging parameters, based on a plane coordinate system of a cross-map geographical PDF map printing layout, the paging printing position and index of the map are accurately calculated, a cutting line and a paging sequence number are printed, and the paging edge connecting precision is improved for making a large wall map or a paper map set for later-stage splicing and sticking.
Drawings
FIG. 1 is a schematic diagram of a source map and a selection range of a geographical PDF map data;
FIG. 2 is a schematic diagram of a hybrid planar spatial coordinate system model;
FIG. 3 is a schematic diagram of a geographical PDF map page rotation preprocessing;
FIG. 4 is a diagram illustrating a pre-processed control point acquisition of a geographical PDF map;
FIG. 5 is a schematic diagram of a map layout element divided drawing grid cell;
FIG. 6 is a schematic diagram of a geographic PDF map data source and rendering grid cell intersection calculation;
FIG. 7 is a diagram of the content stitching for drawing a grid cell map;
FIG. 8 is a schematic illustration of pagination print parameter settings;
fig. 9 is a schematic diagram of a page division of printing.
Detailed Description
The present invention will be described in detail with reference to specific embodiments.
The existing geographic PDF map product is mostly used for non-professional users, and the professional requirements of the GIS field of cross-map page printing are difficult to meet. The method is based on a plane coordinate system in the geographical PDF map, and through preprocessing such as geographical PDF map rotation, the spatial references of the geographical PDF maps with different image sizes are kept consistent, a map grid is planned in a unified page layout, contents corresponding to the geographical PDF maps with different image sizes are extracted aiming at the set grid, and finally the contents are output on a printer which is planned in a paging mode.
The idea of the invention is to preprocess the geographical PDF map data to keep the picture contents of the geographical PDF map of the adjacent picture frames consistent with the spatial reference, select the geographical PDF map data range to be printed based on the connected graph, search the geographical PDF map file, extract the contents corresponding to the geographical PDF maps of different picture frames by the set grid according to the set printing layout (layout) and paging printing parameters of the geographical PDF map, and print and output the contents in pages directly on the printer by the necessary picture frame, picture name, scale and other elements.
The invention is realized by the following technical scheme:
in the first step, 6 planar Coordinate systems and their main member parameters and functions commonly used in the production to the application of the geographical PDF map are defined and referred to as Six-member set planar Coordinate System, i.e. Six Unit Group Coordinate System (Dcs, Gcs, Pcs, Ecs, Fcs, Ocs). It and the control point list together form a coordinate system called a geographical PDF map mixed plane coordinate system model MPSCS [ (Dcs, Gcs, Pcs, Ecs, Fcs, Ocs), Cps (P1, P2, … …)]. A conversion interface of coordinates in six plane coordinate systems is designed and realized, and the coordinates (X, Y) of a certain coordinate system can be converted into the coordinates of any other coordinate system. The conversion interface function comprises positive solution functions and negative solution functions with the same number, and the total number of the functions is 2 multiplied by C6 230 pieces. The calculation of 30 coordinate system conversion interface functions is realized, wherein the forward solution function and the reverse solution function listed in the first five substeps are the most basic 10 functions, and the other 20 functions are realized by the combination and nesting of the 10 functions.
The six-tuple plane coordinate system comprises: data Source Coordinate System (Dcs), geographic Coordinate System (Gcs), Projection Coordinate System (Pcs), Equal-Scale paper Map Coordinate System (Ecs), PDF page Coordinate System (Fcs), and Output device (screen or printer) Coordinate System (Ocs).
And secondly, preprocessing data, and unifying the spatial reference systems of the geographical PDF maps of the adjacent map frames in the same projection band.
a) And reading the spatial reference system parameters of the geographical PDF map file of a single map, acquiring the counterclockwise map rotation angle a after projection, and establishing an MPSCS example of the map. If the angle of a is 0, the third step is directly performed. Otherwise, go to the next step b).
b) Clockwise rotating the content of the geographical PDF map page by an angle a by using a software tool, storing the content as a new geographical PDF map file, collecting page coordinates of points at the left lower part and the right upper corner of the map outline as control points, and recalculating related parameters of MPSCS in a).
And thirdly, designing the printing layout of the geographical PDF map and configuring layout elements of the printing layout.
a) Setting the size and the margin of a printing Layout, generating a printing Layout in an application program Window, and constructing a pixel Coordinate System (Lcs) and an interface Window Coordinate System (Window Coordinate System) (Wcs) of the printing Layout. And establishing a coordinate conversion relation between Lcs and Wcs.
b) Designing a Map Layout Element Model (MLEM), creating a Map Layout Element in a printing Layout, associating geographical PDF Map data sources based on a Map Layout Element position range given in a Map Layout range and a printing Layout, and determining the display position of the data sources in the printing Layout by modifying MPSCS object parameters read by each data source.
c) And associating the geographical PDF map data and dividing drawing grids of the map layout elements.
d) And loading data according to the drawing grid and drawing the map content in the grid unit.
e) Layout elements such as a frame and a picture name are added to a printing layout in a vector graphic, text or picture mode.
And fourthly, setting appropriate paging printing parameters, constructing a printer coordinate system model, and sequentially and directly paging and printing out all layout elements in the printing layout on the printer according to the sequence.
Using 4 webs of 1: the geographical PDF map data of 1 ten thousand adjacent panels (as shown in fig. 1, the corresponding data are "0650049341. geo.pdf", "0650049342. geo.pdf", "0649350043. geo.pdf", "0650049344. geo.pdf"), respectively, are taken as examples, and the above scheme is exemplarily described as follows:
the technical scheme of the cross-map page paging printing method based on the geographical PDF map is specifically implemented as follows:
1. construction of MPSCS model
The hybrid planar spatial coordinate system (MPSCS) and its internal coordinate system designed by the present invention can be described as follows:
(1) data Source Coordinate System (Dcs) construction: defined as a coordinate system stored in an original map data file or database, whose origin and length units are specified by metadata provided by the data producer, the coordinate units being meters or seconds.
TABLE 1 Dcs coordinate System
(2) Geographic Coordinate System (geographic Coordinate System, Gcs) construction: defining the origin as international 0 degree longitude (Greenwich 0 degree) and 0 degree latitude (equator 0 degree), and the coordinate unit is radian;
TABLE 2 Gcs coordinate System
(3) Projection Coordinate System (Pcs) construction: regardless of the device, the origin of coordinates is defined by different types of projection of the map, for example a cylindrical or conical projection surface on the equator, with the coordinates in meters.
TABLE 3 Pcs coordinate System
(4) Construction of an Equal-Scale paper Map Coordinate System (Equal Scale Map Coordinate System, Ecs): the map is reduced to the coordinate system of the paper map with the same scale according to the scale, the coordinate system is independent of equipment and has the unit of meter, and the coordinate system can be understood as the coordinate system after the map is reduced and translated according to the scale of the map. The coordinate units are meters.
TABLE 4 Ecs coordinate System
(5) PDF page Coordinate System construction (PDF File Coordinate System, Fcs): the PDF specification defines a device-independent coordinate system, also called user space, that keeps the objects' relationships on the page unchanged. The user space is at the origin of the lower left corner of the page, with the x-axis extending horizontally to the right and the y-axis increasing vertically upward. To ensure versatility, the geographical PDF takes default length units, one default length unit (user space pixels) having a length value of 1/72 inches. We refer to this default length unit as PDF page pixel pu (pdfmit). Pu is thus a device-independent unit of physical length that can have floating-point values. Because of this, the vector graphic text based on PDF does not appear mosaic after enlargement.
TABLE 5 Fcs coordinate System
(6) An Output Coordinate System (Ocs) of an Output device (screen or printer) is constructed. The definition is for the user to specify the output device plane, the origin of coordinates is specified by the user (screen and printer are usually the top left of the device, positive values to the right on the X-axis, and positive values below the Y-axis), and the coordinate units are pixels.
TABLE 6 Ocs coordinate System
(7) The control point class is used to indicate the corresponding point of a certain point in the Fcs in Gcs, and includes the coordinate values of the control point in the Fcs and Gcs.
TABLE 7 control points class (ControlPoint)
Properties | Name (R) | Type (B) | Unit of | Remarks for note |
m_XI | Longitude in X direction | double | Arc degree | - |
m_Yb | Latitude in Y direction | double | Arc degree | - |
m_Xf | X-direction transverse coordinate of PDF page | double | Pu | - |
m_Yf | Y-direction longitudinal coordinate of PDF page | double | Pu | - |
(8) The Mixed Plane Spatial Coordinate System (Mixed Plane Spatial Coordinate System) can be described as a System MPSCS [ (Dcs, Gcs, Pcs, Ecs, Fcs, Ocs), Cps (P1, P2, … …) consisting of the six-tuple Plane Coordinate System consisting of the above-mentioned (1) one (6) six-Plane Coordinate System and the control point string]As shown in fig. 2, the method comprises an accurate coordinate positioning mode and a non-accurate coordinate positioning mode depending on a control point, and realizes interconversion between six coordinates by determining a series of parameter values or control point coordinates, thereby providing an open, complete and extensible planar spatial coordinate conversion interface for production and application of the geographical PDF map. A conversion interface of coordinates in six plane coordinate systems is designed, and the coordinates (X, Y) of a certain coordinate system can be converted into the coordinates of any other coordinate system. The conversion interface function comprises positive solution functions and negative solution functions with the same number, and the total number of the functions is 2 multiplied by C6 230 pieces. The calculation of 30 coordinate system conversion interface functions is realized, wherein the forward solution function and the reverse solution function listed in the first five substeps are the most basic 10 functions, and the other 20 functions are realized by the combination and nesting of the 10 functions.
TABLE 8 hybrid planar coordinate System (MPSCS)
In order to support accurate space calculation, the MPSCS model designed by the invention needs to establish a mutual conversion relation between every two coordinate systems of the six-element group plane space coordinate system, and is realized by the following five basic coordinate system conversion (forward solution and inverse solution) methods.
1) Dcs coordinate (D)x,Dy) Conversion to Gcs coordinates (B, L)
There are two cases: a) when the coordinates in the Dsc are the projected coordinates, projection inverse transformation is required to be performed first to obtain the geographic coordinates. b) When the coordinates in the Dsc are not projected, a coordinate forward solution is calculated according to equation (1), and a reverse solution transformation is derived by the inverse transformation of equation (1). Wherein Sx,Sy,X0,Y0Respectively, a scale factor in the X coordinate direction, a scale factor in the Y coordinate direction, a coordinate offset in the X coordinate direction, and a coordinate offset in the Y coordinate direction.
L=Dx/Sx+X0
B=Dy/Sy+Y0 (1)
2) Gcs coordinates (Gx, Gy) are converted to Pcs coordinates (x, y)
According to different projection types, calculation can be carried out by referring to corresponding projection formulas. The calculation formula (2) is exemplified by a gaussian projection (li national algae, yan and huding quan. map projection [ M. In this example, l is the difference between the longitude of Gx and the longitude of the central meridian, B is Gy, and x and y are the resulting Px and Py, respectively.
3) Pcs coordinate (X)p,Yp) Conversion to Ecs coordinates (X)e,Ye)
And establishing a coordinate conversion interface PcsToEcs function and an inverse solution EcsToPcs function from the coordinate system Pcs to the coordinate system Ecs. And realizing the interconversion of the Pcs coordinate system point (Xp, Yp) to the Ecs coordinate system (Xe, Ye). The forward solution is calculated according to equation (3) and the inverse solution transform is derived from the inverse transform of equation (3). The origin of the Ecs coordinate system (0,0) the coordinate in the projection coordinate system is (X)ep0,Yep0)。
Xe=(Xp-Xep0)/Ms
Ye=(Yp-Yep0)/Ms (3)
4) Ecs coordinate (X)e,Ye) Conversion to Fcs coordinates (X)f,Yf)
And establishing a coordinate conversion interface EcsToFcs function and an inverse solution FcsToEcs function from the coordinate system Ecs to the coordinate system Fcs. And realizing the interconversion of the Ecs coordinate system point (Xe, Ye) to the Fcs coordinate system (Xf, Yf). The calculation is performed according to equation (4) and the inverse solution transform is derived from the inverse transform of equation (4). Where fppix and fppix represent the PDF page X-axis and Y-axis resolution (which is usually fixed at 72 pixels/inch for conversion), respectively, i.e. how many PDF page pixels are represented by 1 meter. The PDF page coordinate system origin (0, 0) has coordinates (Xfe0, Yfe0) in Ecs. Wherein Sfx is the amplification factor of the horizontal axis of Fcs, Sfy is the amplification factor of the vertical axis of Fcs, and the coordinate is not zoomed when the values are all 1. a is1Shows the data point of Ecs (X)fe0,Yfe0) The angle of rotation of (c).
X’=Sfx·(Xe-Xfe0)·fppix
Y’=Sfy·(Ye-Yfe0)·fppiy
Xf=X’·cosa1-Y’·sina1
Yf=X’·sina1+Y’·cosa1 (4)
5) Fcs coordinates (X)f,Yf) Conversion to Ocs coordinates (X)o,Yo)
Establishing a coordinate conversion interface FcsToOcs function from a coordinate system Fcs to a coordinate system Ocs and a reverse solving OcsToFcs function. Realizing Fcs coordinate system point (X)f,Yf) To the Ocs coordinate system (X)o,Yo) To each other. The calculation is performed according to equation (5) and the inverse solution transform is derived from the inverse transform of equation (5). Wherein f isdpxiAnd fdpiyThe resolutions of the X axis and the Y axis of the output device are respectively expressed, namely, how many output device pixels are used for 1 meter, the value of C is 1 or-1, the upward direction of the device coordinate system Y is 1, and the downward direction of the device coordinate system Y is-1. SoxAs magnification factor of X coordinate, SoyThe values of the Y coordinate amplification coefficients are all 1, which indicates equal proportion. The coordinate of the origin (0, 0) of the coordinate system of the output device in the coordinate system of the PDF page is (X)of0,Yof0)。a2Shows that Fcs data points (X)of0,Yof0) The angle of rotation of (c).
X’=Sox·(Xf-Xof0)·fdpix/fppix
Y’=Soy·(Yf-Yof0)·fdpiy·C/fppiy
Xo=X’·cosa2-Y’·sina2
Yo=X’·sina2+Y’·cosa2 (5)
Through the above-mentioned 5 basic coordinate system conversion forward solution functions, 5 coordinate system conversion reverse solution functions can be deduced, and 30 coordinate conversion functions can be realized through the combination of the 10 basic functions, that is, the MPSCS model of the present invention supports 30 coordinate system interconversion function functions in total of 6 coordinate systems.
2. And (4) data preprocessing, namely unifying the spatial reference systems of the geographical PDF maps of the adjacent map sheets in the same projection band.
a) PDF' file is read, the content with the "SpatialReference _ MPSCS _1_ 0" segment in the file is parsed, the MPSCS model for the map is created and directly serialized read based on the spatial reference serialized content (the geographic PDF map data production employs the direct read of the MPSCS model). This MPSCS model instance serialization is stored as a "0650049341. geo.scs" file, which corresponds to the geographic PDF file name. If the absolute value of the parameter m _ a (the counterclockwise map rotation angle after projection) of the Fcs in the MPSCS is close to 0, directly performing the step 3; otherwise, go to the next step b). In the C + + programming language, it can be described as:
MPSCS Mcs
char*pstring=pPdfEng->GetSpatialRefString();
Mcs.FormatSerialize(true,pstring);
b) using tool software like Adobe Illustrator CS5, open "0650049341. geo. The smallest outside rectangular range of the graph is used to restore the file "0650049341. pdf" (as shown in fig. 3). The method adopts a single document application program which is obtained by transforming an open source PDF reading program as control point acquisition tool software to realize the functions of reading and displaying the PDF file. And developing a menu or a toolbar for collecting the control points at the lower left corner, collecting the control points at the upper right corner and storing the control points on the basis. The steps implemented after the tool software is prepared are: 1) opening a file, displaying a map page and a window, and amplifying the map to 6400% to improve the acquisition precision; 2) selecting a left lower corner point of a map inner outline; 3) selecting an upper right corner point of a map outline; 4) the acquisition result (as shown in fig. 4) is saved in the local file "0650049341. pdf. The purpose of this rotation is to reset the parameter m _ a of Fcs in MPSCS to 0, and because the scaling and resolution of Fcs in X-axis and Y-axis directions are the same, it is set to Sfs(unknown), fppi(default is known as 72 x 100/2.54), so the coordinate system transformation formula (4) can be reduced to formula (6).
Xf=Sfs·(Xe-Xfe0)·fppi
Yf=Sfs·(Ye-Yfe0)·fppi (6)
The formula (7) can be obtained by eliminating the formula (6).
Xf·Yfe0-Yf·Xfe0=Ye·Xf-Xe·Yf (7)
The coordinate of the lower left corner point of the map outline in the pdf of 0650049341 is Fpt1, the coordinate of the longitude and latitude is Gpt1, the coordinate of the upper right corner point is Fpt2, the coordinate of the longitude and latitude is Gpt2, and the two control point values are substituted into a formula (7) to solve a binary equation to calculateXfe0,Yfe0Substituting the value of (A) into the formula (6), and calculating SfsThe value is obtained. The page width and height of the PDF file are Fw and Fh respectively, the MPSCS instance is reinitialized and rewritten into a ' 0650049341.geo.scs ' file, and simultaneously the parameter serialization thereof is rewritten into a geographical PDF map file '. Described in the C + + programming language as follows:
Mcs.m_Fcs.Init(fppi,fppi,Fw,Fh,xfe0,yfe0,sfs,sfs,0);
Mcs.SaveToFile(″0650049341.geo.scs″);
char strBuffer[1024];
Mcs.FormatSerialize(false,strBuffer);
pPdfEng->WriteSPatialRefString(strBuffer);
3. designing a printing layout of the geographical PDF map, and configuring layout elements of the printing layout.
a) A Page-crossing paging printing program based on a geographical PDF map is developed, buttons for setting the size of a printing Layout and the margin of the printing Layout are provided in a program interface, a user selects the size of the printing Layout and sets the margin, then a printing Layout is generated in an application program Window, and a printing Layout pixel Coordinate System Page Layout Coordinate System (Lcs) and an interface Window Coordinate System (Wcs) are constructed. And establishing a coordinate conversion relation between Lcs and Wcs. Wcs the coordinate system is defined as: the starting point is the upper left corner of the interface window, the abscissa is right, the ordinate is downward, the coordinate unit is pixel, the resolution is Swpi(pixel/cm) plane coordinate system with coordinate magnification factor of Fw(ii) a The Lcs coordinate system is defined as: starting at Wcs (X)wl0,Ywl0) Position, abscissa to the right, ordinate to the down, coordinate unit is a planar coordinate system of centimeters. Therefore, Wcs and Lcs coordinate transformation relation can be expressed as formula (8), and two global coordinate transformation functions of LcsToWcs () and WcsToLcs () can be constructed.
Xl=(Xw-Xwl0)/Swpi/fw
Yl=(Yw-Ywl0)/Swpi/fw (8)
b) Defining a Map Layout Element Model (MLEM) creates a Map Layout Element in the printout plane. MLEM is a type of layout element in a print layout, and is responsible for associating and loading geographical PDF map data and displaying the map in a rectangle in which the element is located in the print layout. Its attributes include rectangular location in Lcs, associated geographical PDF map list, unified MPSCS and current scale, etc. The process of adding a map layout element in the printing layout comprises the following steps: selecting a geographic longitude and latitude rectangular range Rg (Gcs coordinate) of geographic PDF map data to be printed based on a map connecting table at a rectangular position Rl (Lcs coordinate) on a printing layout, and printing a scale S of the mapmAfter the determination, acquiring MPSCS models ms1, ms2, ms3 and ms4 of four geographical PDF map data sources, and enabling the central point of Rl to correspond to the central point of Rg at a scale SmAnd under the condition that the projection parameters of the geographical PDF map data source are the same, Wcs is used as an Ocs coordinate system of ms1, ms2, ms3 and ms4 to reversely modify the parameter values. At this time, a coordinate conversion relationship between Fcs and Lcs of each geographical PDF map data source PDF page coordinate system is further established according to the existing LcsToWcs () and WcsTolcs (), namely, FcsTolcs () and LcsToFcs () functions.
c) And associating the geographical PDF map data and dividing the drawing grids. And selecting the associated map sheet by utilizing the Rg and the current display scale, wherein the current display scale is 1: 2 ten thousand-1: about 5000 (the other scales are not suitable for 1: 1 ten thousand map data), and the standard scale is 1: 1 million of geographical PDF map data. Thus with Rg range and 1: and 1, carrying out intersection calculation on map width range rectangles of the geographic PDF map data. For example, in fig. 1, Rg matches with the current scale to select associated map maps 0650049341, 0650049342, 0650049343 and 0650049344. The associated geographical PDF map data are "0650049341. geo.pdf", "0650049342. geo.pdf", "0650049343. geo.pdf", "0650049344. geo.pdf", in that order. The Rg is divided into grids according to a certain length and width (for example, the width W is 12 cm, and the height H is 10 cm), so that one map layout element can be divided into R rows (R is rg.height ()/H is an integer up) and L columns (L is rg.width ()/W is an integer up), as shown in fig. 5.
d) And loading data according to the drawing grid and drawing the map content in the grid unit. Data loading of the geographic PDF map is driven by map content rendering. I.e. traverse every i rows (0 ≦ i < R) and every j columns (0 ≦ j < L) in the R rows and L columns grid, drawing the map content of each grid (as shown in fig. 5). Drawing the map content of each grid according to the following steps: 1) reversely solving rectangular coordinates Rect1 under Fcs in each data source MPSCS by using grid unit Lcs rectangular coordinates, carrying out intersection calculation on the rectangular coordinates Rect1 and an Fcs coordinate Polygon Polygon1 calculated by using effective geographic latitude and longitude ranges of the data sources (the principle is shown in figure 6), extracting the geographic PDF map for loading if an intersection part exists, and directly referencing a pointer of the geographic PDF map document if the geographic PDF map has loaded data; if there is no intersection, the comparison is made with the next data source. If no polygon is intersected with all data sources, the cell is blank and does not need drawing. 2) A picture buffer bitmap ache with width and height W and H (pixel width and height Iw/W/2.54 × 96 and Ih/H/2.54 × 96) is constructed with a default resolution of 96dpi, and a transparent channel is set. Extracting the content of the intersection part of each geographical PDF map document in the step 1) and the grid cell in sequence, and drawing the content into a bitmap ache. 3) And drawing the bitmap ache in the corresponding grid cell of the layout element of the printing layout map. The key difficult step here is step 2), because the shape of the content of the intersection part of the geographical PDF map document and the present grid cell is likely to be a polygon (across the boundary area of the map sheet), while the PDF document engine interface extracting the map content from the geographical PDF map document usually only provides rectangular extraction. The present invention thus focuses on the data extraction method of step 2) (as shown in fig. 7): if the grid cell of the map drawing and the given four data sources have intersecting parts, namely the maps of the four data sources in the left column of fig. 7 intersect with the polygons represented by the four dotted lines, 5 Bitmap objects bmp1, bmp2, bmp3, bmp4 and Bitmap ache with width and height of Iw and Ih pixels are created, and transparent channels are set. By using the bmp1 as a virtual drawing device g1 and setting a valid visible cropping area r1(r1 is an intersecting polygon of a drawing grid and a first data source), drawing a data source corresponding to the whole rectangular range of the bmp1 read by the PDF document engine interface into the bmp1 by using g1, wherein the obtained effect is shown as (1) in fig. 7; similarly, the bmp2, the bmp3 and the bmp4 are drawn, and the obtained effects are shown as (2), (3) and (4) in fig. 7; the four transparent channel bitmaps are sequentially drawn in the bitmap ache, and the obtained result is shown in fig. 7 (d). When all the map grid cells in the R rows and the L columns are completely drawn, the contents of the map layout elements shown in fig. 5 are filled.
e) In order to make the printing layout complete and beautiful, necessary layout elements such as frames, picture names and the like are added to the printing layout in a mode of vector graphics, text or pictures.
4. The parameters of the page printing are set, as shown in fig. 8, that is, the width direction overlapping width RXcm, the height direction overlapping width RYcm, whether to print the overlapping trimming line, and whether to draw the page number at the time of page printing are designated. The printer Coordinate System Print Coordinate System (Rcs, distinct from Pcs in MPSCS) is then constructed: the starting point is the upper left corner of the selected paper, the abscissa is right, the ordinate is downward, the coordinate unit is pixel, the resolution is Srpi(pixels/cm) plane coordinate system. Since Rcs and Wcs are device independent coordinate systems, as well, it is necessary to establish a relationship between Rcs and Lcs coordinate systems. And (3) placing the origin of the Rcs at the origin of the Lcs, and constructing and obtaining two global coordinate conversion functions of the global lcstrcs () and the rcstocs () according to a formula (9).
Xl=Xr/Srpi
Yl=Yr/Srpi (9)
All layout elements in the printing layout are sequentially and directly printed and output on a printer in a paging mode according to the sequence, the principle of paging printing is shown in fig. 9, according to the size (namely the effective area of Rcs) of paper selection of the printer, the width of the selected paper is Gwcm, the height of the selected paper is Ghcm, the width of the selected paper is compared with the effective area of Lcs in the printing layout (the width of the selected paper is Pwcm and the height of the selected paper is Phcm), overlapping parts (Rxcm and Rycm respectively) in the width and the height are considered, and the row number iRow and the column number iCol of the printing paging can be represented as follows:
and sequentially circulating the line number iRow and the column number iCol, sequentially drawing all layout elements in the Lcs on printing equipment according to the global initial position considering the overlapping part for each Page of paper i _ Page, and drawing the overlapped transverse lines, the overlapped longitudinal lines and the Page index serial numbers on the printing equipment, thereby completing the paging printing task after the geographical PDF map is typeset. The printing principle of the map layout elements on the paging device is the same as the drawing principle of the map layout elements on the printing layout (namely, step 3), and the difference is only that the starting position of the Ocs on the device for map printing is translated according to the width and height of the map overlap in each paging, and the acquired resolution of the printer device is used as the device resolution parameter of the Ocs.
The method supports large-scale printing of the geographical PDF map, and can also print in a single page when a plotter provides large paper. When large-range geographical PDF map data with the same projection parameters are obtained, large-range map contents can be printed in a page-to-page mode, and finally, large wall maps are manufactured by cutting and adhering according to overlapped lines, so that a map result with a larger range span is obtained; the method strictly acquires the map printing content according to the MPSCS of the mixed plane coordinate system of each geographical PDF map data source. Therefore, the method has higher edge connecting precision in paging edge connecting precision than other map data sources without a coordinate system, and improves the operation precision when the wall map is manufactured according to the overlapped cutting lines in the later period. In conclusion, the method and the device meet the requirement of professional application of large-scale printing based on the geographical PDF map.
The invention is not limited to the examples, and any equivalent changes to the technical solution of the invention by a person skilled in the art after reading the description of the invention are covered by the claims of the invention.
Claims (5)
1. The page-crossing paging printing method based on the geographical PDF map is characterized by comprising the following steps:
the method is realized by the following steps:
preprocessing the geographic PDF map data to ensure that the picture contents of the geographic PDF maps of adjacent pictures keep space reference consistency, selecting the data range of the geographic PDF maps to be printed based on a connected graph, retrieving a geographic PDF map file, extracting the contents corresponding to the geographic PDF maps of different pictures by using a set grid according to the set printing layout and paging printing parameters of the geographic PDF maps, and directly printing and outputting the contents in pages on a printer by using layout elements of picture frames and picture names;
the method specifically comprises the following steps:
the method comprises the following steps that firstly, a geographical PDF map mixed plane coordinate system model is formed on the basis of a hexahydric group plane coordinate system and a control point list, and conversion interfaces of coordinates in six plane coordinate systems are designed;
secondly, preprocessing data, and unifying spatial reference systems of adjacent map amplitude geographical PDF maps in the same projection zone;
thirdly, designing a printing layout of the geographical PDF map, and configuring layout elements of the printing layout;
and fourthly, setting appropriate paging printing parameters, constructing a printer coordinate system model, and sequentially and directly paging and printing out layout elements of all drawing frames and drawing names on the printer according to the sequence.
2. The method for page-dividing across map sheets based on the geographical PDF map as claimed in claim 1, wherein:
in the first step, the conversion interface function comprises a positive solution function and a negative solution function with the same number, and the total number of the functions is 2 xC6 2The calculation of 30 coordinate system conversion interface functions is realized, wherein the forward solution function and the reverse solution function listed in the first five substeps are the most basic 10 functions, and the other 20 functions are realized by the combination and nesting of the 10 functions.
3. The method for page-dividing across map sheets based on the geographical PDF map as claimed in claim 1, wherein:
in the first step, the hexahydric group plane coordinate systems are respectively a data source coordinate system, a geographic coordinate system, a projection coordinate system, an equal-scale paper map coordinate system, a PDF page coordinate system and an output device coordinate system, and main parameters of each plane coordinate system are defined.
4. The method for page-dividing across map sheets based on the geographical PDF map as claimed in claim 1, wherein:
the second step, data preprocessing, unifying the spatial reference system of the geographical PDF map of the adjacent map frames in the same projection band, and is realized by the following steps:
a) reading the spatial reference system parameters of a geographical PDF map file of a single map, acquiring the counterclockwise map rotation angle a after projection, and establishing an MPSCS example of the map; if the angle of a is 0, directly carrying out the third step; otherwise, carrying out the next step b);
b) clockwise rotating the content of the geographical PDF map page by an angle a, storing the content as a new geographical PDF map file, collecting page coordinates of points at the left lower part and the right upper part of the map outline in the map as control points, and recalculating related parameters of MPSCS in a).
5. The method for page-dividing across map sheets based on the geographical PDF map as claimed in claim 1, wherein:
the third step, designing the printing layout of the geographical PDF map, configuring layout elements of the printing layout, and realizing the following steps:
a) setting the size and the margin of a printing layout, generating a printing layout in an application program window, constructing a pixel coordinate system and an interface window coordinate system of the printing layout, and establishing a coordinate conversion relation between Lcs and Wcs;
b) designing a map layout element model, creating a map layout element in a printing layout, associating geographical PDF map data sources based on a map layout element position range given in a map connecting range and the printing layout, and determining the display position of the data sources in the printing layout by modifying MPSCS object parameters read by each data source;
c) associating geographical PDF map data and dividing drawing grids of map layout elements;
d) loading data according to the drawing grid and drawing the map content in the grid unit;
e) necessary layout elements are added in a pattern of vector graphics, text, or pictures in the printing layout.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810129874.5A CN108491173B (en) | 2018-02-08 | 2018-02-08 | Cross-map page paging printing method based on geographical PDF map |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810129874.5A CN108491173B (en) | 2018-02-08 | 2018-02-08 | Cross-map page paging printing method based on geographical PDF map |
Publications (2)
Publication Number | Publication Date |
---|---|
CN108491173A CN108491173A (en) | 2018-09-04 |
CN108491173B true CN108491173B (en) | 2021-07-16 |
Family
ID=63340177
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201810129874.5A Active CN108491173B (en) | 2018-02-08 | 2018-02-08 | Cross-map page paging printing method based on geographical PDF map |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN108491173B (en) |
Families Citing this family (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111382222B (en) * | 2018-12-29 | 2023-08-22 | 北京四维图新科技股份有限公司 | High-precision map frame data edge connecting method and device |
CN109960478B (en) * | 2019-04-02 | 2022-03-08 | 武大吉奥信息技术有限公司 | Web map printing preview method and device |
Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1928853A (en) * | 2006-09-15 | 2007-03-14 | 北京北大方正电子有限公司 | Automatic typesetting method for classified advertisement |
CN103093484A (en) * | 2013-01-05 | 2013-05-08 | 武汉中地数码科技有限公司 | Integrated batch drawing method of remote-sensing image and vector data |
CN106055668A (en) * | 2015-12-11 | 2016-10-26 | 中国地质调查局发展研究中心 | Data and service mixed loading system |
CN106202447A (en) * | 2016-07-15 | 2016-12-07 | 西安测绘研究所 | A kind of possess the digital cartography system produced with management integration |
CN106775225A (en) * | 2016-12-02 | 2017-05-31 | 西安电子科技大学 | The method that across document seamless roam browses PDF maps |
CN106980668A (en) * | 2017-03-22 | 2017-07-25 | 中国电子科技网络信息安全有限公司 | A kind of cyberspace surveys and draws the Formal Modeling of key element |
CN107016616A (en) * | 2017-05-05 | 2017-08-04 | 国家测绘地理信息局四川测绘产品质量监督检验站 | Geography information builds the quality assessment method of storehouse cartographic data, apparatus and system |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20160125628A1 (en) * | 2014-11-05 | 2016-05-05 | Geologis Ltd. | Geographical information systems |
-
2018
- 2018-02-08 CN CN201810129874.5A patent/CN108491173B/en active Active
Patent Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1928853A (en) * | 2006-09-15 | 2007-03-14 | 北京北大方正电子有限公司 | Automatic typesetting method for classified advertisement |
CN103093484A (en) * | 2013-01-05 | 2013-05-08 | 武汉中地数码科技有限公司 | Integrated batch drawing method of remote-sensing image and vector data |
CN106055668A (en) * | 2015-12-11 | 2016-10-26 | 中国地质调查局发展研究中心 | Data and service mixed loading system |
CN106202447A (en) * | 2016-07-15 | 2016-12-07 | 西安测绘研究所 | A kind of possess the digital cartography system produced with management integration |
CN106775225A (en) * | 2016-12-02 | 2017-05-31 | 西安电子科技大学 | The method that across document seamless roam browses PDF maps |
CN106980668A (en) * | 2017-03-22 | 2017-07-25 | 中国电子科技网络信息安全有限公司 | A kind of cyberspace surveys and draws the Formal Modeling of key element |
CN107016616A (en) * | 2017-05-05 | 2017-08-04 | 国家测绘地理信息局四川测绘产品质量监督检验站 | Geography information builds the quality assessment method of storehouse cartographic data, apparatus and system |
Non-Patent Citations (2)
Title |
---|
《一种数字地图新产品-PDF地图》;周校东、杨春成、孟妮娜;《测绘通报》;20160125(第2016年第1期);108-114 * |
GeoPDF地图浏览系统的设计与实现;杨琪;《中国优秀硕士学位论文全文数据库 信息科技辑》;20160315(第2016年第3期);I138-4124 * |
Also Published As
Publication number | Publication date |
---|---|
CN108491173A (en) | 2018-09-04 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN108681595B (en) | Geographical PDF map mixed plane coordinate system model and construction method thereof | |
CN103093484A (en) | Integrated batch drawing method of remote-sensing image and vector data | |
CN110516015B (en) | Method for manufacturing geographical PDF map based on map graphic data and DLG | |
CN105516311A (en) | Electronic map panorama acquisition method and system | |
CN108711356B (en) | Geographic target and symbol graph registration method in vector geographic PDF map making | |
CN109308729A (en) | Picture synthesizes processing method, apparatus and system | |
JP2014522048A (en) | Kanji composition method and apparatus, character composition method and apparatus, and font library construction method | |
CN112131332B (en) | Information point updating method and device, electronic equipment and computer storage medium | |
CN103150328A (en) | Integration method for automatically drawing maps by utilizing database | |
CN108491173B (en) | Cross-map page paging printing method based on geographical PDF map | |
Arundel et al. | Preparing The National Map for the 3D Elevation Program–products, process and research | |
CN109344459A (en) | A kind of visual modeling of Monte-Carlo code and conversion method and system | |
Walters | Contouring by machine: A user's guide | |
CN113868494A (en) | Big data visualization display system | |
CN111190519A (en) | File and control processing method, device, equipment and storage medium thereof | |
Vuillemot et al. | Structuring visualization mock-ups at the graphical level by dividing the display space | |
Müller Arisona et al. | Increasing detail of 3D models through combined photogrammetric and procedural modelling | |
CN105808682A (en) | Relational graph display method and apparatus | |
CN113284407B (en) | Geographic element map matching system supporting multiple map sources and multiple scales | |
CN104346771B (en) | A kind of electronic map tiered management approach | |
US10460427B2 (en) | Converting imagery and charts to polar projection | |
CN110532257B (en) | Method and system for visually presenting family tree data | |
Hardy et al. | Portrayal and cartography | |
JP6174939B2 (en) | Map note processing device, map note processing method, and map information providing device | |
Waugh et al. | GIMMS/An Example of an Operational System for Computer Cartography |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |