A method and system for displaying three-dimensional map models
By mapping and data dilution of the location points of objects in the camera's viewing angle in the map 3D model display, the lag and efficiency reduction caused by traditional LOD technology when hardware resources are insufficient is solved, and more efficient hardware resource utilization and smooth user experience are achieved.
Patent Information
- Application Number
- CN202111660297.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-30
- Publication Date
- 2025-03-18
- Estimated Expiration
- 2041-12-30
AI Technical Summary
When all model objects in the camera viewing angle are long, the model objects need to be roughened or the rough version of the same model needs to be switched to adapt to the hardware resolution, resulting in excessive hardware resource consumption, resulting in lag and reduced operation efficiency.
All objects in the camera's viewing angle are collected by the camera, the set of position points is obtained, and the mapping relationship between position points and map slices is established. Data dilution and pixel conversion are performed on the external rectangle range of each map slice to reduce data volume and reduce hardware resource consumption.
It realizes that without the need for traditional LOD technology to roughen the surface reduction, save hardware resource consumption, improve operation rendering efficiency and fluency, and improve user experience.
Smart Images

Figure CN114299149B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of electronic digital data processing, and in particular to a method and system for displaying a three-dimensional map model. Background Art
[0002] LOD (Level of Details), referred to as multiple detail levels, determines the resource allocation for object rendering based on the position and importance of the model's nodes in the display environment, reduces the number of faces and details of non-important objects, and thus obtains efficient rendering calculations.
[0003] Traditional LOD technology determines how to display by calculating in real time the linear distance of all model objects from the camera in the camera's field of view: when the distance becomes smaller, the model object is refined and faces are added or a more refined version of the same model is directly switched to display, making the model look more realistic. When the distance becomes larger, the model object is coarsened and faces are reduced or a coarser version of the same model is directly switched to display.
[0004] The traditional method has no problem and can meet the actual needs for clients with multi-threaded environments, which can fully utilize hardware resources and have relatively high hardware configurations. However, for some clients with low hardware configurations and Web clients that cannot fully utilize hardware resources and do not have a multi-threaded environment, the hardware resources consumed by real-time computing have caused them to freeze and significantly reduce their operating efficiency, which reduces the user experience. Summary of the invention
[0005] In view of the above-mentioned deficiencies in the prior art, a map three-dimensional model display method and system provided by the present invention solves the problem that in traditional LOD technology, when all model objects within the camera's field of view are far away from the camera, the model objects need to be coarsened or the rough version of the same model needs to be switched, so as to adapt to the hardware resolution while saving the hardware resource consumption of image processing.
[0006] In order to achieve the above-mentioned object of the invention, the technical solution adopted by the present invention is: a method for displaying a three-dimensional map model, comprising the following steps:
[0007] S1. Collect all objects within the camera's field of view through the camera, and obtain a set of position points based on the object's position in the image and its distance from the camera;
[0008] S2. Find the number of the map slice containing the location point according to the location point set, and establish a mapping relationship between the location point and the map slice;
[0009] S3, performing data thinning and pixel conversion on the circumscribed rectangular range of each map slice that establishes a mapping relationship, to obtain a map slice after thinning and pixel coordinate conversion;
[0010] S4. According to the number and level, obtain the corresponding map slice after thinning and pixel coordinate conversion, and perform inverse coordinate conversion on the pixel points on the obtained map slice to obtain the location points of the model. According to the location points of the model, construct a three-dimensional model of the map to achieve three-dimensional display of objects on the map.
[0011] Further, step S2 includes the following sub-steps:
[0012] S21, traverse all the location points in the location point set, find the maximum location point and the minimum location point therein, and construct the minimum circumscribed rectangle range of the location point set;
[0013] S22, according to the minimum bounding rectangle range of the location point set, calculate the map slice number of the minimum bounding rectangle range that contains all or part of the location point set in each level, and calculate the bounding rectangle range of each map slice according to the map slice number;
[0014] S23, assigning the location points in the location point set to the circumscribed rectangular range of the corresponding map slice, and establishing a mapping relationship between the location points and the map slice.
[0015] The beneficial effect of the above further scheme is: establishing in advance the inclusion relationship of which location points are included in each map slice in each level, so as to facilitate the processing of the map slices containing the location points and avoid accidental operation on irrelevant map slices.
[0016] Further, step S22 includes the following sub-steps:
[0017] S221, calculating the ratio of each level from Mercator coordinate system coordinates to cut map numbers;
[0018] S222, calculating the map slice start number and end number according to the ratio and the minimum circumscribed rectangle range of the location point set;
[0019] S223, traverse the starting number and the ending number of the map slice to obtain the number of each map slice;
[0020] S224. Calculate the bounding rectangle range of each map slice in each level according to the number of each map slice.
[0021] Furthermore, the formula for calculating the ratio of each level from the Mercator coordinate system coordinates to the cut-image number in step S221 is:
[0022] res=(maxWorldY-minWorldY) / L 2
[0023] Among them, res is the ratio, maxWorldY is the maximum y value of the world range of the world map, minWorldY is the minimum y value of the world range of the world map, and L is the level number.
[0024] Furthermore, the formula for calculating the starting number of the map slice in step S222 is:
[0025] STX=MF[(minRangePoint.x-minWorldX) / res]
[0026] STY=MF[(maxWorldY-minRangePoint.y) / res]
[0027] Where STX is the horizontal coordinate of the starting number of the map slice, STY is the vertical coordinate of the starting number of the map slice, MF[] is an integer in [], minRangePoint.x is the minimum horizontal coordinate of the minimum bounding rectangle of the location point set, minRangePoint.y is the minimum vertical coordinate of the minimum bounding rectangle of the location point set, minWorldX is the minimum x value of the world range of the world map, maxWorldY is the maximum y value of the world range of the world map, and res is the ratio;
[0028] The formula for calculating the end number of the map slice is:
[0029] ETX=MF[(maxRangePoint.x-minWorldX) / res]
[0030] ETY=MF[(maxWorldY-maxRangePoint.y) / res]
[0031] Among them, ETX is the horizontal coordinate of the end number of the map slice, ETY is the vertical coordinate of the end number of the map slice, maxRanePoint.x is the maximum horizontal coordinate of the minimum bounding rectangle range of the location point set, maxRangePoint.y is the maximum vertical coordinate of the minimum bounding rectangle range of the location point set, minWorldX is the minimum x value of the world range of the world map, maxWorldY is the minimum y value of the world range of the world map, and res is the ratio.
[0032] Furthermore, the calculation formula for the bounding rectangle range of each map slice in each level in step S224 is:
[0033] tileRangeMaxPoint.x=(tileX+1)·res+minWorldX
[0034] tileRangeMaxPoint.y=maxWorldY-tileY·res
[0035] tileRangeMinPoint.x=tileX·res+minWarldX
[0036] tileRangeMinPoint.y=maxWorldY-(til Y-1)·res
[0037] Among them, tileRangeMaxPoint.x is the maximum horizontal coordinate of the circumscribed rectangular range of each map slice, tileRangeMaxPoint.y is the maximum vertical coordinate of the circumscribed rectangular range of each map slice, tileRangeMinPoint.x is the minimum horizontal coordinate of the circumscribed rectangular range of each map slice, tileRangeMinPoint.y is the minimum vertical coordinate of the circumscribed rectangular range of each map slice, the value of tileX is the value between the horizontal coordinate STX of the starting number of the map slice and the horizontal coordinate ETX of the ending number of the map slice, the value of tileY is the value between the vertical coordinate STY of the starting number of the map slice and the vertical coordinate ETY of the ending number of the map slice, tileX and tileY together constitute the map slice number, res is a ratio, minWorldX is the minimum x value of the world range of the world map, and maxWorldY is the maximum y value of the world range of the world map.
[0038] Further, step S3 includes the following sub-steps:
[0039] S31, dividing the circumscribed rectangular range of each map slice for establishing a mapping relationship into a plurality of blocks;
[0040] S32, if there are multiple position points in the block, use a quadtree to thin out the blocks with multiple position points until the number of position points in all blocks is less than or equal to 1;
[0041] S33, converting the position points in the block processed by steps S31 and S32 into pixel coordinates, thereby obtaining a thinned and pixel coordinate converted map slice.
[0042] The beneficial effect of the above further scheme is: dividing the circumscribed rectangle of the map slice into blocks and performing data thinning is to reduce the amount of data, save hardware resource expenses, and improve the efficiency and fluency of operation rendering.
[0043] Furthermore, the formula for converting the position point into pixel coordinates in step S33 is:
[0044] pixelPoint.x=MF[(Px-trmin.x)·(256 / (trmax.y-trmin.y))]
[0045] pixelPoint.y=MF[(Py-trmin.y)·(256 / (trmax.y-trmin.y))]
[0046] Among them, pixelPoint.x is the horizontal coordinate of the pixel corresponding to the position point, pixelPoint.y is the vertical coordinate of the pixel corresponding to the position point, MF[] is an integer in [], Px is the horizontal coordinate of the position point in the Mercator coordinate system, Py is the vertical coordinate of the position point in the Mercator coordinate system, trmin.x is the minimum horizontal coordinate of all the position points in the Mercator coordinate system, trmin.y is the minimum vertical coordinate of all the position points in the Mercator coordinate system, and trmax.y is the maximum vertical coordinate of all the position points in the Mercator coordinate system.
[0047] Furthermore, the formula for inverse coordinate transformation of the pixel point in step S4 is:
[0048]
[0049]
[0050] Among them, mercatorPoint.x is the horizontal coordinate of the location point in Mercator coordinates, mercatorPoint.y is the vertical coordinate of the location point in Mercator coordinates, pixelPoint.x is the horizontal coordinate of the pixel corresponding to the location point, pixelPoint.y is the vertical coordinate of the pixel corresponding to the location point, Trmax.x is the maximum horizontal coordinate of all location points in pixel coordinates, Trmin.x is the minimum horizontal coordinate of all location points in pixel coordinates, and Trmin.y is the minimum vertical coordinate of all location points in pixel coordinates.
[0051] The beneficial effect of the above further solution is that the object model is placed by converting the position point in the pixel coordinates into the Mercator coordinates.
[0052] A method for displaying a three-dimensional map model comprises the following steps:
[0053] A map three-dimensional model display system, comprising: a camera and a processor;
[0054] The camera is used to collect all objects within the camera's field of view, and obtain a set of object position points based on the object's position in the image and its distance from the camera;
[0055] The processor is used to execute the method steps of step S2, step S3 and step S4.
[0056] In summary, the beneficial effects of the present invention are as follows: the present invention collects all objects within the camera's field of view through the camera, obtains a set of location points of all objects, and filters out map slices containing the location points of the objects. After filtering out, data thinning is required to reduce the amount of data, reduce hardware resource consumption, and call the prepared map slices according to the level and number. After coordinate conversion, the object model is directly displayed at the corresponding location point to realize the display of the three-dimensional object model on the map. There is no need for traditional LOD technology, which requires coarsening and reducing the surface of the model objects or switching to a rough version of the same model when the distance between all model objects in the camera's field of view and the camera is long. BRIEF DESCRIPTION OF THE DRAWINGS
[0057] Figure 1 The present invention is a flowchart of a method for displaying a three-dimensional map model. DETAILED DESCRIPTION
[0058] The specific implementation modes of the present invention are described below so that those skilled in the art can understand the present invention. However, it should be clear that the present invention is not limited to the scope of the specific implementation modes. For those of ordinary skill in the art, as long as various changes are within the spirit and scope of the present invention as defined and determined by the attached claims, these changes are obvious, and all inventions and creations utilizing the concept of the present invention are protected.
[0059] Embodiment 1:
[0060] like Figure 1 As shown, a method for displaying a three-dimensional map model includes the following steps:
[0061] S1. Collect all objects within the camera's field of view through the camera, and obtain a set of position points based on the object's position in the image and its distance from the camera;
[0062] S2. Find the number of the map slice containing the location point according to the location point set, and establish a mapping relationship between the location point and the map slice;
[0063] The step S2 comprises the following sub-steps:
[0064] S21, traverse all the location points in the location point set, find the maximum location point and the minimum location point therein, and construct the minimum circumscribed rectangle range of the location point set;
[0065] The method for constructing the minimum bounding rectangle range of the location point set is: find the minimum horizontal coordinate, minimum vertical coordinate, maximum horizontal coordinate and maximum vertical coordinate of all location points. The rectangular area formed by the minimum horizontal coordinate, minimum vertical coordinate, maximum horizontal coordinate and maximum vertical coordinate is the minimum bounding rectangle range of the location point set.
[0066] S22, according to the minimum bounding rectangle range of the location point set, calculate the map slice number of the minimum bounding rectangle range that contains all or part of the location point set in each level, and calculate the bounding rectangle range of each map slice according to the map slice number;
[0067] S23, assigning the location points in the location point set to the circumscribed rectangular range of the corresponding map slice, and establishing a mapping relationship between the location points and the map slice.
[0068] The step S22 comprises the following sub-steps:
[0069] S221, calculating the ratio of each level from Mercator coordinate system coordinates to cut map numbers;
[0070] The formula for calculating the ratio of each level from the Mercator coordinate system coordinates to the cut-image number in step S221 is:
[0071] res=(maxWorldY-minWorldY) / L 2
[0072] Among them, res is the ratio, maxWorldY is the maximum y value of the world range of the world map, minWorldY is the minimum y value of the world range of the world map, and L is the level number.
[0073] S222, calculating the map slice start number and end number according to the ratio and the minimum circumscribed rectangle range of the location point set;
[0074] The formula for calculating the starting number of the map slice in step S222 is:
[0075] STX=MF[(minRangePoint.x-minWorldX) / res]
[0076] STY=MF[(maxWorldY-minRangePoint.y) / res]
[0077] Where STX is the horizontal coordinate of the starting number of the map slice, STY is the vertical coordinate of the starting number of the map slice, MF[] is an integer in [], minRangePoint.x is the minimum horizontal coordinate of the minimum bounding rectangle of the location point set, minRangePoint.y is the minimum vertical coordinate of the minimum bounding rectangle of the location point set, minWorldX is the minimum x value of the world range of the world map, maxWorldY is the maximum y value of the world range of the world map, and res is the ratio;
[0078] The formula for calculating the end number of the map slice is:
[0079] ETX=MF[(maxRangePoint.x-minWorldX) / res]
[0080] ETY=MF[(maxWorldY-maxRangePoint.y) / res]
[0081] Among them, ETX is the horizontal coordinate of the end number of the map slice, ETY is the vertical coordinate of the end number of the map slice, maxangePoint.x is the maximum horizontal coordinate of the minimum bounding rectangle range of the location point set, maxRangePoint.y is the maximum vertical coordinate of the minimum bounding rectangle range of the location point set, minWorldX is the minimum x value of the world range of the world map, maxWorldY is the minimum y value of the world range of the world map, and res is the ratio.
[0082] minWorldX=-20037508.3427892, minWorldY=-20037508.3427892
[0083] maxWorldX=20037508.3427892, maxWorldY=20037508.3427892
[0084] S223, traverse the starting number and the ending number of the map slice to obtain the number of each map slice;
[0085] S224. Calculate the bounding rectangle range of each map slice in each level according to the number of each map slice.
[0086] The calculation formula for the bounding rectangle range of each map slice in each level in step S224 is:
[0087] tileRangeMaxPoint.x=(tileX+1)·res+minWorldX
[0088] tileRangeMaxPoint.y=maxWorldY-tileY·res
[0089] tileRangeMinPoint.x=tileX·res+minWorldX
[0090] tileRangeMinPoint.y=maxWorldY-(tileY-1)·res
[0091] Among them, tileRangeMaxPoint.x is the maximum horizontal coordinate of the circumscribed rectangular range of each map slice, tileRangeMaxPoint.y is the maximum vertical coordinate of the circumscribed rectangular range of each map slice, tileRangeMinPoint.x is the minimum horizontal coordinate of the circumscribed rectangular range of each map slice, tileRangeMinPoint.y is the minimum vertical coordinate of the circumscribed rectangular range of each map slice, the value of tileX is the value between the horizontal coordinate STX of the starting number of the map slice and the horizontal coordinate ETX of the ending number of the map slice, the value of tileY is the value between the vertical coordinate STY of the starting number of the map slice and the vertical coordinate ETY of the ending number of the map slice, tileX and tileY together constitute the map slice number, res is a ratio, minWorldX is the minimum x value of the world range of the world map, and maxWorldY is the maximum y value of the world range of the world map.
[0092] S3, performing data thinning and pixel conversion on the circumscribed rectangular range of each map slice that establishes a mapping relationship, to obtain a map slice after thinning and pixel coordinate conversion;
[0093] Step S3 includes the following sub-steps:
[0094] S31, dividing the circumscribed rectangular range of each map slice for establishing a mapping relationship into a plurality of blocks;
[0095] In step S31, blocks are obtained by division, some of which include only one position point, and some of which include multiple position points. The blocks including multiple position points need to be processed in step S32, and some blocks do not have any position points and do not need to be processed.
[0096] S32, if there are multiple position points in the block, use a quadtree to thin out the blocks with multiple position points until the number of position points in all blocks is less than or equal to 1;
[0097] The method of using quadtree for thinning in step S32 is:
[0098] A1. Use a quadtree to divide the block containing multiple location points into four temporary area blocks;
[0099] A2, determining whether the number of position points in the four temporary area blocks is less than or equal to 1, if so, selecting the position point in the first temporary area block whose number of position points is not 0 as the position point of the block containing multiple position points in step A1, if not, jumping to step A3;
[0100] A3. Use the quadtree again to divide the temporary area block with the most position points into four temporary area blocks again, and input the current four temporary area blocks into step A2.
[0101] For example: the first time quadtree is used for division, four temporary areas are divided. The number of position points in the four temporary areas is 3531. It is necessary to continue to divide. Select the area where 5 is located and divide it into 1112 by quadtree. All areas still do not reach the point where the number of position points in each area is less than or equal to 1. Continue to divide area 2 and divide it into 0011. This meets the conditions. Take the first position point that is not 0 and return it, that is, the third digit in 0011.
[0102] S33, converting the position points in the block processed by steps S31 and S32 into pixel coordinates, thereby obtaining a thinned and pixel coordinate converted map slice.
[0103] The formula for converting the position point into pixel coordinates in step S33 is:
[0104] pixelPoint.x=MF[(Px-trmin.x)·(256 / (trmax.y-trmin.y))]
[0105] pixelPoint.y=MF[(Py-trmin.y)·(256 / (trmax.y-trmin.y))]
[0106] Among them, pixelPoint.x is the horizontal coordinate of the pixel corresponding to the position point, pixelPoint.y is the vertical coordinate of the pixel corresponding to the position point, MF[] is an integer in [], Px is the horizontal coordinate of the position point in the Mercator coordinate system, Py is the vertical coordinate of the position point in the Mercator coordinate system, trmin.x is the minimum horizontal coordinate of all the position points in the Mercator coordinate system, trmin.y is the minimum vertical coordinate of all the position points in the Mercator coordinate system, and trmax.y is the maximum vertical coordinate of all the position points in the Mercator coordinate system.
[0107] S4. According to the number and level, obtain the corresponding map slice after thinning and pixel coordinate conversion, and perform inverse coordinate conversion on the pixel points on the obtained map slice to obtain the location points of the model. According to the location points of the model, construct a three-dimensional model of the map to achieve three-dimensional display of objects on the map.
[0108] The formula for inverse coordinate transformation of pixel points in step S4 is:
[0109]
[0110]
[0111] Among them, mercatorPoint.x is the horizontal coordinate of the position point in Mercator coordinates, mercatorPoint.y is the vertical coordinate of the position point in Mercator coordinates, pixelPoint.x is the pixel horizontal coordinate corresponding to the position point, pixelPoint.y is the pixel vertical coordinate corresponding to the position point, Trmax.x is the maximum horizontal coordinate of all position points in pixel coordinates, Trmin.x is the minimum horizontal coordinate of all position points in pixel coordinates, and Trmin.y is the minimum vertical coordinate of all position points in pixel coordinates.
[0112] Embodiment 2:
[0113] A map three-dimensional model display system, comprising: a camera and a processor;
[0114] The camera is used to collect all objects within the camera's field of view and obtain a set of position points based on the object's position in the image and its distance from the camera;
[0115] The processor is used to execute the method steps of step S2, step S3 and step S4.
[0116] This system is the hardware system of the previous embodiment 1, and is used to execute all the method processes in the above embodiment.
Claims
1. A method for displaying a three-dimensional map model, characterized in that: The following steps are involved: S1. Collect all objects within the camera's field of view through the camera, and obtain a set of position points based on the object's position in the image and its distance from the camera; S2. Find the number of the map slice containing the location point according to the location point set, and establish a mapping relationship between the location point and the map slice; The step S2 comprises the following sub-steps: S21, traverse all the location points in the location point set, find the maximum location point and the minimum location point therein, and construct the minimum circumscribed rectangle range of the location point set; S22, according to the minimum bounding rectangle range of the location point set, calculate the map slice number of the minimum bounding rectangle range that contains all or part of the location point set in each level, and calculate the bounding rectangle range of each map slice according to the map slice number; S23, assigning the location points in the location point set to the circumscribed rectangular range of the corresponding map slice, and establishing a mapping relationship between the location points and the map slice; S3, performing data thinning and pixel conversion on the circumscribed rectangular range of each map slice that establishes a mapping relationship, to obtain a map slice after thinning and pixel coordinate conversion; S4. According to the number and level, obtain the corresponding map slice after thinning and pixel coordinate conversion, and perform inverse coordinate conversion on the pixel points on the obtained map slice to obtain the location points of the model. According to the location points of the model, construct a three-dimensional model of the map to achieve three-dimensional display of objects on the map.
2. The map three-dimensional model display method according to claim 1, characterized in that: The step S22 comprises the following sub-steps: S221, calculating the ratio of each level from Mercator coordinate system coordinates to cut map numbers; S222, calculating the map slice start number and end number according to the ratio and the minimum circumscribed rectangle range of the location point set; S223, traverse the starting number and the ending number of the map slice to obtain the number of each map slice; S224. Calculate the bounding rectangle range of each map slice in each level according to the number of each map slice.
3. The map three-dimensional model display method according to claim 2, characterized in that: The formula for calculating the ratio of each level from the Mercator coordinate system coordinate to the cut-image number in step S221 is: res=(maxEWorldY-minWorldY) / L 2 Among them, res is the ratio, maxWorldY is the maximum y value of the world range of the world map, minWorldY is the minimum y value of the world range of the world map, and L is the level number.
4. The map three-dimensional model display method according to claim 2, characterized in that: The formula for calculating the starting number of the map slice in step S222 is: STX=MF[(minRangePoint.x-minWorldX) / res] STY=MF[(maxWorldY-minRangePoint.y) / res] Where STX is the horizontal coordinate of the starting number of the map slice, STY is the vertical coordinate of the starting number of the map slice, MF[] is an integer in [], minRangPoint.x is the minimum horizontal coordinate of the minimum bounding rectangle of the location point set, minRangePoint.y is the minimum vertical coordinate of the minimum bounding rectangle of the location point set, minWorldX is the minimum x value of the world range of the world map, maxWorldY is the maximum y value of the world range of the world map, and res is the ratio; The formula for calculating the end number of the map slice is: ETX=MF[(maxRangePoint.x-minWorldX) / rex] ETY=M□[(maxWorldY-maxRangePoint.y) / res] Among them, ETX is the horizontal coordinate of the end number of the map slice, ETY is the vertical coordinate of the end number of the map slice, maxRangePoint.x is the maximum horizontal coordinate of the minimum bounding rectangle range of the location point set, maxRangePoint.Y is the maximum vertical coordinate of the minimum bounding rectangle range of the location point set, minWorldX is the minimum x value of the world range of the world map, maxWorldY is the minimum y value of the world range of the world map, and res is the ratio.
5. The map three-dimensional model display method according to claim 4, characterized in that: The calculation formula for the bounding rectangle range of each map slice in each level in step S224 is: tileRangeMaxPoint.x=(tileX+1)·res+minWorldX tileRangMaxPoint.y=maxWorldY-tileY#res tileRangMaxPoint.x=tileX·res+minWorldX tileRangeMinPoint.y=maxWorldY-(tileY-1)·res Among them, tileRangeMaxPoint.x is the maximum horizontal coordinate of the circumscribed rectangular range of each map slice, tileRangeMaxPoint.y is the maximum vertical coordinate of the circumscribed rectangular range of each map slice, tileRangeMinPoint.x is the minimum horizontal coordinate of the circumscribed rectangular range of each map slice, tileRangeMinPoint.y is the minimum vertical coordinate of the circumscribed rectangular range of each map slice, the value of tileX is the value between the horizontal coordinate STX of the starting number of the map slice and the horizontal coordinate ETX of the ending number of the map slice, the value of tileY is the value between the vertical coordinate STY of the starting number of the map slice and the vertical coordinate ETY of the ending number of the map slice, tileX and tileY together constitute the map slice number, res is the ratio, minWorldX is the minimum x value of the world range of the world map, and maxWorldY is the maximum y value of the world range of the world map.
6. The map three-dimensional model display method according to claim 1, characterized in that: The step S3 comprises the following sub-steps: S31, dividing the circumscribed rectangular range of each map slice for establishing a mapping relationship into a plurality of blocks; S32, if there are multiple position points in the block, use a quadtree to thin out the blocks with multiple position points until the number of position points in all blocks is less than or equal to 1; S33, converting the position points in the block processed by steps S31 and S32 into pixel coordinates, thereby obtaining a thinned and pixel coordinate converted map slice.
7. The map three-dimensional model display method according to claim 6, characterized in that: The formula for converting the position point into pixel coordinates in step S33 is: pixelPoint.x=MF[(Px-trmin.x)·(256 / (trmax.y-trmin.y))] pixelPoint.y=MF[(Py-trmin.y)·(256 / (trmax.y-trmin.y))] Among them, pixelPoint.x is the horizontal coordinate of the pixel corresponding to the position point, pixelPoint.y is the vertical coordinate of the pixel corresponding to the position point, MF[] is an integer in [], Px is the horizontal coordinate of the position point in the Mercator coordinate system, Py is the vertical coordinate of the position point in the Mercator coordinate system, trmin.x is the minimum horizontal coordinate of all the position points in the Mercator coordinate system, trmin.y is the minimum vertical coordinate of all the position points in the Mercator coordinate system, and trmax.y is the maximum vertical coordinate of all the position points in the Mercator coordinate system.
8. The map three-dimensional model display method according to claim 1, characterized in that: The formula for inverse coordinate transformation of the pixel points in step S4 is: Among them, mercatorPoint.x is the horizontal coordinate of the location point in Mercator coordinates, mercatorPoint.y is the vertical coordinate of the location point in Mercator coordinates, pixelPoint.x is the horizontal coordinate of the pixel corresponding to the location point, pixelPoint.y is the vertical coordinate of the pixel corresponding to the location point, Trmax.x is the maximum horizontal coordinate of all location points in pixel coordinates, Trmin.x is the minimum horizontal coordinate of all location points in pixel coordinates, and Trmin.y is the minimum vertical coordinate of all location points in pixel coordinates.
9. A map three-dimensional model display system, characterized in that: include: Camera and processor; The camera is used to collect all objects within the camera's field of view, and obtain a set of object position points based on the object's position in the image and its distance from the camera; The processor is configured to execute the method steps of any one of claims 1-8.
Citation Information
Patent Citations
Method for accurately displaying three-dimensional model
CN110473289A
Map drawing method and device
CN110956673A