CN117473031A - Method, device, equipment and storage medium for generating preset area of designated position - Google Patents
Method, device, equipment and storage medium for generating preset area of designated position Download PDFInfo
- Publication number
- CN117473031A CN117473031A CN202311477671.2A CN202311477671A CN117473031A CN 117473031 A CN117473031 A CN 117473031A CN 202311477671 A CN202311477671 A CN 202311477671A CN 117473031 A CN117473031 A CN 117473031A
- Authority
- CN
- China
- Prior art keywords
- coordinates
- plane
- longitude
- latitude
- area
- 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.)
- Pending
Links
- 238000000034 method Methods 0.000 title claims abstract description 54
- 238000004590 computer program Methods 0.000 claims description 17
- PXFBZOLANLWPMH-UHFFFAOYSA-N 16-Epiaffinine Natural products C1C(C2=CC=CC=C2N2)=C2C(=O)CC2C(=CC)CN(C)C1C2CO PXFBZOLANLWPMH-UHFFFAOYSA-N 0.000 claims description 11
- 230000009466 transformation Effects 0.000 claims description 10
- 238000004891 communication Methods 0.000 description 8
- 238000004458 analytical method Methods 0.000 description 6
- 238000012545 processing Methods 0.000 description 6
- 238000010586 diagram Methods 0.000 description 5
- 230000008859 change Effects 0.000 description 3
- 230000003993 interaction Effects 0.000 description 3
- 238000007726 management method Methods 0.000 description 3
- 238000013507 mapping Methods 0.000 description 3
- 230000003287 optical effect Effects 0.000 description 3
- 230000008569 process Effects 0.000 description 3
- 230000006870 function Effects 0.000 description 2
- 238000002372 labelling Methods 0.000 description 2
- 238000012986 modification Methods 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 239000003208 petroleum Substances 0.000 description 2
- 230000004044 response Effects 0.000 description 2
- 238000012502 risk assessment Methods 0.000 description 2
- 238000012732 spatial analysis Methods 0.000 description 2
- 238000012549 training Methods 0.000 description 2
- 238000006424 Flood reaction Methods 0.000 description 1
- 230000009471 action Effects 0.000 description 1
- 238000003491 array Methods 0.000 description 1
- 238000013473 artificial intelligence Methods 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 230000008901 benefit Effects 0.000 description 1
- 230000001413 cellular effect Effects 0.000 description 1
- 238000013500 data storage Methods 0.000 description 1
- 238000013079 data visualisation Methods 0.000 description 1
- 230000007547 defect Effects 0.000 description 1
- 238000013461 design Methods 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 230000007613 environmental effect Effects 0.000 description 1
- 239000011521 glass Substances 0.000 description 1
- 230000006872 improvement Effects 0.000 description 1
- 239000004973 liquid crystal related substance Substances 0.000 description 1
- 238000010801 machine learning Methods 0.000 description 1
- 238000005259 measurement Methods 0.000 description 1
- 239000013307 optical fiber Substances 0.000 description 1
- 206010037844 rash Diseases 0.000 description 1
- 239000004065 semiconductor Substances 0.000 description 1
- 230000001953 sensory effect Effects 0.000 description 1
- 239000000126 substance Substances 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
- 238000012795 verification Methods 0.000 description 1
- 230000000007 visual effect Effects 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/29—Geographical information databases
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/28—Databases characterised by their database models, e.g. relational or object models
- G06F16/284—Relational databases
- G06F16/285—Clustering or classification
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/90—Details of database functions independent of the retrieved data types
- G06F16/95—Retrieval from the web
- G06F16/953—Querying, e.g. by the use of web search engines
- G06F16/9537—Spatial or temporal dependent retrieval, e.g. spatiotemporal queries
Landscapes
- Engineering & Computer Science (AREA)
- Databases & Information Systems (AREA)
- Theoretical Computer Science (AREA)
- Data Mining & Analysis (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Remote Sensing (AREA)
- Processing Or Creating Images (AREA)
Abstract
The invention discloses a preset area generation method, device and equipment for a designated position and a storage medium. The method comprises the following steps: acquiring longitude and latitude coordinates of a designated position and preset region generation parameters; projecting the longitude and latitude coordinates and the preset region generation parameters to a projection plane to obtain plane coordinates and plane generation parameters of the specified position on the projection plane; determining the edge point coordinates of the preset area according to the plane coordinates and the plane generation parameters; and projecting the edge point coordinates to a geocentric coordinate system, and displaying the preset area in a map. According to the method, the edge point coordinates of the preset area of the appointed position are determined in the projection plane according to the plane coordinates of the appointed position and the plane generation parameters, and the edge point coordinates are projected to the geocentric coordinate system, so that the preset area of the appointed position can be displayed on the map.
Description
Technical Field
The embodiment of the invention relates to the technical field of spatial information, in particular to a method, a device, equipment and a storage medium for generating a preset area at a designated position.
Background
The longitude and latitude and plane coordinates are two basic data coordinate systems of a geographic information system (Geographic Information System, GIS) and correspond to geographic data types and geometric data types respectively. The GIS geographic information system is a computer system related to the acquisition, storage, verification and display of the position information of the earth surface. Through the GIS, data which are seemingly irrelevant are associated, so that the method can better help all people to know the characteristics and the relations of the space.
The generation of a circular area in a GIS is a common spatial analysis and geographic data visualization technology, and can be applied to various aspects related to a GIS system, such as geographic positioning and map labeling, geographic data searching and analysis, geographic positioning service, infrastructure planning and analysis and the like.
Currently, generating a circular or other type of area of a geometric data type in a GIS is a simple problem, but when a user needs to limit a circular or other type of area within a certain range around a specified object (e.g., a building, a utility pole, etc.) on a map, how to generate an area within a certain range of the specified object in the GIS is a problem that the prior art needs to solve, since the GIS cannot directly generate an area of a geometric data type on a map.
Disclosure of Invention
The invention provides a method, a device, equipment and a storage medium for generating a preset area of a designated position, which are used for solving the problem that the coordinates of a geographic data type of the designated position cannot be generated on a map in the prior art.
According to an aspect of the present invention, there is provided a preset area generating method of a designated location, the method including:
acquiring longitude and latitude coordinates of a designated position and preset region generation parameters;
projecting the longitude and latitude coordinates and the preset region generation parameters to a projection plane to obtain plane coordinates and plane generation parameters of the specified position on the projection plane;
determining the edge point coordinates of the preset area according to the plane coordinates and the plane generation parameters;
and projecting the edge point coordinates to a geocentric coordinate system, and displaying the preset area in a map.
According to another aspect of the present invention, there is provided a preset area generating apparatus for designating a position, characterized by comprising:
the acquisition module is used for acquiring longitude and latitude coordinates of the designated position and preset region generation parameters;
the projection module is used for projecting the longitude and latitude coordinates and the preset region generation parameters to a projection plane to obtain plane coordinates and plane generation parameters of the designated position on the projection plane;
the determining module is used for determining the edge point coordinates of the preset area according to the plane coordinates and the plane generation parameters;
and the display module is used for projecting the edge point coordinates to a geocentric coordinate system and displaying the preset area in a map.
According to another aspect of the present invention, there is provided an electronic apparatus including: at least one processor; and
a memory communicatively coupled to the at least one processor; wherein,
the memory stores a computer program executable by the at least one processor, the computer program being executable by the at least one processor to enable the at least one processor to perform the preset area generating method of the specified location according to any one of the embodiments of the present invention.
According to another aspect of the present invention, there is provided a computer readable storage medium storing computer instructions for causing a processor to implement the preset area generating method for a specified location according to any one of the embodiments of the present invention when executed.
The method, the device, the equipment and the storage medium for generating the preset area of the designated position in the embodiment of the invention comprise the following steps: acquiring longitude and latitude coordinates of a designated position and preset region generation parameters; projecting the longitude and latitude coordinates and the preset region generation parameters to a projection plane to obtain plane coordinates and plane generation parameters of the specified position on the projection plane; determining the edge point coordinates of the preset area according to the plane coordinates and the plane generation parameters; and projecting the edge point coordinates to a geocentric coordinate system, and displaying the preset area in a map. According to the method, the edge point coordinates of the preset area of the specified position are determined in the projection plane according to the plane coordinates of the specified position and the plane generation parameters, and the edge point coordinates are projected to the geocentric coordinate system, so that the preset area of the specified position can be displayed on the map, and the problem that the coordinates of the geographic data type of the specified position cannot be generated on the map in the prior art is solved.
It should be understood that the description in this section is not intended to identify key or critical features of the embodiments of the invention or to delineate the scope of the invention. Other features of the present invention will become apparent from the description that follows.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required for the description of the embodiments will be briefly described below, and it is apparent that the drawings in the following description are only some embodiments of the present invention, and other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
Fig. 1 is a flowchart of a method for generating a preset area at a designated location according to a first embodiment of the present invention;
fig. 2 is a schematic structural diagram of a preset area generating device at a designated location according to a second embodiment of the present invention;
fig. 3 is a schematic structural diagram of an electronic device according to an embodiment of the present invention.
Detailed Description
In order that those skilled in the art will better understand the present invention, a technical solution in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in which it is apparent that the described embodiments are only some embodiments of the present invention, not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the present invention without making any inventive effort, shall fall within the scope of the present invention. It should be understood that the various steps recited in the method embodiments of the present invention may be performed in a different order and/or performed in parallel. Furthermore, method embodiments may include additional steps and/or omit performing the illustrated steps. The scope of the invention is not limited in this respect.
The term "including" and variations thereof as used herein are intended to be open-ended, i.e., including, but not limited to. The term "based on" is based at least in part on. The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments. Related definitions of other terms will be given in the description below.
It should be noted that the terms "first," "second," and the like in the description and the claims of the present invention and the above figures are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used may be interchanged where appropriate such that the embodiments of the invention described herein may be implemented in sequences other than those illustrated or otherwise described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
It should be noted that references to "one", "a plurality" and "a plurality" in this disclosure are intended to be illustrative rather than limiting, and those skilled in the art will appreciate that "one or more" is intended to be construed as "one or more" unless the context clearly indicates otherwise.
The names of messages or information interacted between the devices in the embodiments of the present invention are for illustrative purposes only and are not intended to limit the scope of such messages or information.
The generation of circular (elliptical) regions in GIS is particularly applicable to the following:
1. geographic positioning and map labeling: in GIS, the generation of circular (elliptical) areas may be used to represent the location of a particular site or geographic entity. For example, a city, landmark, store, school, or other location may be marked with a circular (oval) area so that a user can quickly find them.
2. Geographic search and analysis: circular (elliptical) areas are also used for geographic searching and analysis. The user may enter location coordinates or addresses in the GIS application and then generate a circular (oval) area centered around the location to find nearby resources or analyze data within a particular geographic area.
3. Geolocation service (Global Positioning System, GPS): GPS applications typically use circular (elliptical) areas to display the accuracy of the user's current location. This may help the user to know how accurate their location information is and in which geographic region they may be located.
4. Infrastructure planning and analysis: in city planning and infrastructure planning, the generation of circular (elliptical) areas can be used to determine the location of, and interactions between, buildings, roads, pipes, utility poles, etc. infrastructure.
5. Natural resource management: in environmental science and natural resource management, the generation of circular (elliptical) areas can be used to analyze ecosystems or resource distribution around a particular site, such as forests, lakes, wildlife habitat, etc.
6. Risk assessment and emergency response: a circular (oval) area may be used for risk assessment and emergency response. For example, a circular (oval) area may be used to represent a range of potentially dangerous areas, such as volcanic eruptions, floods, chemical leaks, and the like.
7. Geographic marketing and business analysis: business and market researchers can use the generated circular (oval) areas to analyze potential customer groups for a particular store or service. This helps to pinpoint the target audience and formulate marketing strategies.
8. Geographic education and training: circular (elliptical) areas are also widely used in geography education and training to assist students in understanding geographic concepts, map interpretation, and spatial analysis skills.
But a circular (elliptical) area cannot be accurately generated due to direct in GIS. Therefore, in order to generate a circular (elliptical) area at a specified position in the GIS, the present embodiment proposes a preset area generation method at a specified position, which specifically includes the following steps:
example 1
Fig. 1 is a flowchart of a method for generating a preset area at a specified location according to a first embodiment of the present invention, where the method is applicable to a case of generating a preset area at a specified location in a map, and the method may be performed by a preset area generating device at a specified location, where the device may be implemented by software and/or hardware and is generally integrated on an electronic device, and in this embodiment, the electronic device includes but is not limited to: a computer, etc.
As shown in fig. 1, a method for generating a preset area at a specified location according to an embodiment of the present invention includes the following steps:
s110, acquiring longitude and latitude coordinates of a designated position and preset region generation parameters.
The specified location may be the location of any object or specified point in the map. The latitude and longitude coordinates may be coordinates of the specified location in a geocentric coordinate system. The geodetic coordinate system may be set according to the actual situation, for example, the geodetic coordinate system is exemplified by the world geodetic measurement system (World Geodetic System-1984Coordinate System,WGS84) in this embodiment, and the geodetic coordinate system may be GCJ02, CGCS2000, BD09, or the like. The preset region generation parameters may be related parameters of the preset region to be generated, and the preset region generation parameters may be set according to actual conditions.
Among them, WGS84 is a geodetic system standard for cartography, geodetic and navigation. The WGS comprises a set of standard longitude and latitude coordinates of the earth, a reference ellipsoid for calculating raw altitude data, and a set of gravitational equipotential surface data for defining sea level altitude. The WGS84 coordinate system is a geocentric coordinate system with the origin of coordinates being the centroid of the earth, considering the earth as a ellipsoid of revolution. It is common for a person to orient the coordinate axes with the minor axis of the ellipsoid of revolution and a certain defined initial meridian plane parallel to the average rotational axis at a certain moment of the earth and the corresponding true initial meridian plane, respectively. The ellipsoid parameters are as follows
Table 1 ellipsoidal parameters
In this embodiment, when an area within a certain range needs to be generated according to a specified position in a map, longitude and latitude coordinates of the specified position and a preset area generation parameter may be acquired.
In one embodiment, the acquiring the latitude and longitude coordinates of the specified location includes:
acquiring initial coordinates of a designated position;
when the type of the initial coordinate is longitude and latitude type, the initial coordinate is directly used as the longitude and latitude coordinate of the appointed position;
and when the type of the initial coordinate is not the longitude and latitude type, converting the initial coordinate into the longitude and latitude type to obtain the longitude and latitude coordinate of the appointed position.
The type of the initial coordinate may be longitude and latitude type of the designated position or other types of coordinates.
In this embodiment, after the initial coordinate of the specified position is obtained, if the initial coordinate is a longitude and latitude type coordinate, the initial coordinate may be directly used as the longitude and latitude coordinate of the specified position, otherwise, the initial coordinate is converted into the longitude and latitude type coordinate, so as to obtain the longitude and latitude coordinate of the specified position. For example, if the initial coordinates are coordinates in a space rectangular coordinate system, the initial coordinates are converted into the required longitude B and latitude L by the following formula:
wherein, (x, y, z) is the coordinate of the initial coordinate in the space rectangular coordinate system,a is the semi-major axis of the ellipsoid in the WGS84 coordinate system.
And S120, projecting the longitude and latitude coordinates and the preset region generation parameters to a projection plane to obtain plane coordinates and plane generation parameters of the specified position on the projection plane.
The projection plane can be a bearing plane of the surface of the earth ellipsoid or the sphere part in map projection, and the type of the projection plane can be determined according to longitude and latitude coordinates of a designated position, namely, the projection planes corresponding to the longitude and latitude coordinates of different positions can be different. The plane coordinates may be coordinates corresponding to the designated position on the projection plane, and the plane generation parameters may be parameters corresponding to the preset region generation parameters on the projection plane.
In this embodiment, a PROJ library may be used to project longitude and latitude coordinates of a specified position and a preset region generation parameter to a projection plane, so as to obtain plane coordinates and plane generation parameters of the specified position on the projection plane. Where PROJ is a generic coordinate transformation software that can transform geospatial coordinates from one coordinate reference frame to another.
In one embodiment, the projecting the longitude and latitude coordinates and the preset region generating parameter to a projection plane includes:
determining a projection plane corresponding to the longitude and latitude coordinates from a plurality of projection planes according to a projection rule;
and projecting the longitude and latitude coordinates and the preset region generation parameters to the projection plane.
The projection rule may be a rule for projecting coordinates of the specified position, and the projection rule may be set according to an actual situation.
In this embodiment, the corresponding projection plane may be determined according to the latitude and longitude coordinates, so as to project the latitude and longitude coordinates and the preset region generation parameters to the projection plane. For example, when the latitude and longitude coordinates belong to the range a, the projection plane a is selected as the projection plane.
Table 2 projection plane example
As shown in table 2, UTM North zone may be selected as the projection plane when the dimension is within the range of (0,70). Wherein the spatial reference identifier (Spatial Reference Identifiers, SRID) is defined by the standards of the european petroleum mapping group (European Petroleum Survey Group, EPSG), SRID being a set of standards developed for mapping, mapping and geodetic data storage. Each space instance has a space reference identifier SRID. N in the table can be calculated by longitude lon:
s130, determining the edge point coordinates of the preset area according to the plane coordinates and the plane generation parameters.
The edge point coordinates may be coordinates of points on the edge of the preset area. For example, when the preset area to be generated is a circle, the edge point coordinates may be coordinates of vertices of an approximate polygon of the circle.
In this embodiment, the coordinates of the edge points of the area to be preset may be determined according to the plane coordinates of the specified position on the projection plane and the plane generation parameters.
In one embodiment, the preset region comprises a circular region, the preset region generation parameter comprises a preset region radius, and the plane generation parameter comprises a projection radius.
The preset area may be an area within a certain range that needs to be generated according to the designated position, and the type of the preset area may be set according to actual situations. For example, the preset area may be circular, elliptical, or the like. The preset area radius may be a radius of a circular area, and the projection radius may be a radius of the preset area radius corresponding to the projection plane.
In this embodiment, the preset area may be a circular area, and the preset area generating parameter of the circular area may be a preset area radius, and the plane generating parameter may be a projection radius.
In one embodiment, the determining the edge point coordinates of the preset area according to the plane coordinates and the plane generation parameters includes:
determining the number of edge points of the preset area according to the error tolerance and the projection radius;
and determining coordinates of edge points of the preset area according to the number and the plane coordinates.
The error tolerance may be an error allowed by the generated preset area. The edge points may be vertices of the periphery of the predetermined area.
In this embodiment, when the preset area is a circular area, since there are countless points on the circle, the preset area may be generated by calculating the vertex of the approximate polygon of the circle, specifically, the number of the edge points of the circular area may be determined according to the projection radius with the specified position as the center of the circle, and the coordinates of the edge points of the preset area may be determined according to the number and the plane coordinates of the specified position. For example, assuming that the error tolerance is tol, the number n of vertices of the approximate polygon of the circle within the error range can be calculated by the input error tolerance tol:
wherein,r is the preset area radius of the circular area.
Let the projection coordinates of the specified position on the projection plane be (x) 0 ,y 0 ) The projection radius corresponding to the preset region radius R on the projection plane is R ′ The coordinates of the edge points of the approximate n-sided shape of the circle on the projection plane can be calculated using the following parametric equation:
x=x 0 +R cos(θ 0 +kθ)
y=y 0 +R sin(θ 0 +kθ)
wherein θ 0 For the start angle, k=0, …, n can be set according to the actual situation.
And S140, projecting the edge point coordinates to a geocentric coordinate system, and displaying the preset area in a map.
In this embodiment, after obtaining the edge point coordinates of the preset area, the edge point coordinates may be projected to the geocentric coordinate system, so as to obtain the preset area with the specified position in the map.
The method for generating the preset area at the designated position provided by the embodiment of the invention comprises the following steps: acquiring longitude and latitude coordinates of a designated position and preset region generation parameters; projecting the longitude and latitude coordinates and the preset region generation parameters to a projection plane to obtain plane coordinates and plane generation parameters of the specified position on the projection plane; determining the edge point coordinates of the preset area according to the plane coordinates and the plane generation parameters; and projecting the edge point coordinates to a geocentric coordinate system, and displaying the preset area in a map. According to the method, the edge point coordinates of the preset area of the specified position are determined in the projection plane according to the plane coordinates of the specified position and the plane generation parameters, and the edge point coordinates are projected to the geocentric coordinate system, so that the preset area of the specified position can be displayed on the map, and the problem that the coordinates of the geographic data type of the specified position cannot be generated on the map in the prior art is solved.
On the basis of the above embodiments, modified embodiments of the above embodiments are proposed, and it is to be noted here that only the differences from the above embodiments are described in the modified embodiments for the sake of brevity of description.
In one embodiment, the preset area includes an elliptical area, and when the preset area needs to be displayed as the elliptical area, the method further includes:
determining ellipse parameters of the ellipse region;
constructing an affine transformation relation of ellipse and circle according to the ellipse parameters and the edge point coordinates of the circular area;
converting the edge point coordinates of the circular area into the edge point coordinates of the elliptical area according to the affine transformation relation;
and converting the coordinates of the edge points of the elliptical area into coordinates in a geocentric coordinate system.
The ellipse parameters may include major or major axis, minor or minor axis, rotation angle, and other related parameters of the ellipse. The affine change relationship may be a correspondence relationship between a circle and an ellipse.
In this embodiment, the preset area may be displayed as an elliptical area, specifically, an elliptical parameter of the elliptical area to be generated may be determined, an affine change relationship between an ellipse and a circle may be constructed according to the elliptical parameter and an edge point coordinate of the circular area in the projection plane, the edge point coordinate of the circular area may be converted into an edge point coordinate of the elliptical area according to the affine change relationship, and then the edge point coordinate of the elliptical area may be converted into a coordinate under the geocentric coordinate system, so that the elliptical area at the specified position may be displayed in the map.
Illustratively, the center coordinates of the elliptical region are converted into a space rectangular coordinate system to obtain a rotation axisAlpha, eta 1 =(x,y,z) T As a direction vector of a; let k= (0, 1) T Then k is eta 1 Projection k in the vertical direction ⊥ =k-(k T η 1 )η 1 Taking outTaking eta 3 =η 1 ×η 2 Then eta 1 ,η 2 ,η 3 Is a standard orthogonal base; determination of R using the Rodrigues rotation equation:
wherein,
get (xi) 1 ,ξ 2 ,ξ 3 ) Satisfy (xi) 1 ,ξ 2 ,ξ 3 )=(η 1 ,η 2 ,η 3 ) R, performing telescopic transformation to obtain S:
the determining of the ellipse parameters includes a rotation angle θ, a major axis 2a, a minor axis 2b, determining an affine transformation relation t=sr from the ellipse parameters, and determining the edge point coordinates of the ellipse region from the affine transformation relation and the edge point coordinates of the circular region.
In one embodiment, the elliptical parameters include a rotation angle, a major axis and a minor axis.
The rotation angle may be an ellipse start generation angle, and the major axis and the minor axis are parameters of the ellipse.
In this embodiment, parameters of the ellipse may include a rotation angle, a major axis and a minor axis.
Example two
Fig. 2 is a schematic structural diagram of a device for generating a preset area at a specified location according to a second embodiment of the present invention, where the device may be adapted to generate a preset area at a specified location in a map, and the device may be implemented by software and/or hardware and is generally integrated on an electronic device.
As shown in fig. 2, the apparatus includes:
an acquiring module 210, configured to acquire latitude and longitude coordinates of a specified position and preset region generation parameters;
the projection module 220 is configured to project the latitude and longitude coordinates and the preset region generation parameters onto a projection plane, so as to obtain plane coordinates and plane generation parameters of the specified position on the projection plane;
a determining module 230, configured to determine edge point coordinates of the preset area according to the plane coordinates and the plane generating parameters;
the display module 240 is configured to project the edge point coordinates to a geocentric coordinate system, and display the preset area in a map.
The second embodiment provides a preset area generating device for a designated position, where the device includes: the acquisition module is used for acquiring longitude and latitude coordinates of the designated position and preset region generation parameters; the projection module is used for projecting the longitude and latitude coordinates and the preset region generation parameters to a projection plane to obtain plane coordinates and plane generation parameters of the designated position on the projection plane; the determining module is used for determining the edge point coordinates of the preset area according to the plane coordinates and the plane generation parameters; and the display module is used for projecting the edge point coordinates to a geocentric coordinate system and displaying the preset area in a map. The method and the device have the advantages that the edge point coordinates of the preset area of the specified position are determined in the projection plane according to the plane coordinates of the specified position and the plane generation parameters, and the edge point coordinates are projected to the geocentric coordinate system, so that the preset area of the specified position can be displayed on the map, and the problem that the coordinates of the geographic data type of the specified position cannot be generated on the map in the prior art is solved.
Further, the obtaining module 210 includes:
acquiring initial coordinates of a designated position;
when the type of the initial coordinate is longitude and latitude type, the initial coordinate is directly used as the longitude and latitude coordinate of the appointed position;
and when the type of the initial coordinate is not the longitude and latitude type, converting the initial coordinate into the longitude and latitude type to obtain the longitude and latitude coordinate of the appointed position.
Further, the projection module 220 includes:
determining a projection plane corresponding to the longitude and latitude coordinates from a plurality of projection planes according to a projection rule;
and projecting the longitude and latitude coordinates and the preset region generation parameters to the projection plane.
Further, the preset area includes a circular area, the preset area generation parameter includes a preset area radius, and the plane generation parameter includes a projection radius.
Further, the determining module 230 includes:
determining the number of edge points of the preset area according to the error tolerance and the projection radius;
and determining coordinates of edge points of the preset area according to the number and the plane coordinates.
Further, the preset area includes an elliptical area, and when the preset area needs to be displayed as the elliptical area, the apparatus further includes:
determining ellipse parameters of the ellipse region;
constructing an affine transformation relation of ellipse and circle according to the ellipse parameters and the edge point coordinates of the circular area;
converting the edge point coordinates of the circular area into the edge point coordinates of the elliptical area according to the affine transformation relation;
and converting the coordinates of the edge points of the elliptical area into coordinates in a geocentric coordinate system.
Further, the ellipse parameters include a rotation angle, a major axis and a minor axis.
The preset area generating device of the specified position can execute the preset area generating method of the specified position provided by any embodiment of the invention, and has the corresponding functional modules and beneficial effects of the executing method.
Example III
Fig. 3 shows a schematic diagram of the structure of an electronic device 10 that may be used to implement an embodiment of the invention. Electronic devices are intended to represent various forms of digital computers, such as laptops, desktops, workstations, personal digital assistants, servers, blade servers, mainframes, and other appropriate computers. Electronic equipment may also represent various forms of mobile devices, such as personal digital processing, cellular telephones, smartphones, wearable devices (e.g., helmets, glasses, watches, etc.), and other similar computing devices. The components shown herein, their connections and relationships, and their functions, are meant to be exemplary only, and are not meant to limit implementations of the inventions described and/or claimed herein.
As shown in fig. 3, the electronic device 10 includes at least one processor 11, and a memory, such as a Read Only Memory (ROM) 12, a Random Access Memory (RAM) 13, etc., communicatively connected to the at least one processor 11, in which the memory stores a computer program executable by the at least one processor, and the processor 11 may perform various appropriate actions and processes according to the computer program stored in the Read Only Memory (ROM) 12 or the computer program loaded from the storage unit 18 into the Random Access Memory (RAM) 13. In the RAM 13, various programs and data required for the operation of the electronic device 10 may also be stored. The processor 11, the ROM 12 and the RAM 13 are connected to each other via a bus 14. An input/output (I/O) interface 15 is also connected to bus 14.
Various components in the electronic device 10 are connected to the I/O interface 15, including: an input unit 16 such as a keyboard, a mouse, etc.; an output unit 17 such as various types of displays, speakers, and the like; a storage unit 18 such as a magnetic disk, an optical disk, or the like; and a communication unit 19 such as a network card, modem, wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information/data with other devices via a computer network, such as the internet, and/or various telecommunication networks.
The processor 11 may be a variety of general and/or special purpose processing components having processing and computing capabilities. Some examples of processor 11 include, but are not limited to, a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), various specialized Artificial Intelligence (AI) computing chips, various processors running machine learning model algorithms, digital Signal Processors (DSPs), and any suitable processor, controller, microcontroller, etc. The processor 11 performs the respective methods and processes described above, for example, a preset area generation method of a specified position.
In some embodiments, the predetermined region generation method of the specified location may be implemented as a computer program, which is tangibly embodied on a computer-readable storage medium, such as the storage unit 18. In some embodiments, part or all of the computer program may be loaded and/or installed onto the electronic device 10 via the ROM 12 and/or the communication unit 19. When the computer program is loaded into the RAM 13 and executed by the processor 11, one or more steps of the preset area generating method of the specified position described above may be performed. Alternatively, in other embodiments, the processor 11 may be configured to perform the preset area generation method of the specified location in any other suitable way (e.g. by means of firmware).
Various implementations of the systems and techniques described here above may be implemented in digital electronic circuitry, integrated circuit systems, field Programmable Gate Arrays (FPGAs), application Specific Integrated Circuits (ASICs), application Specific Standard Products (ASSPs), systems On Chip (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and/or combinations thereof. These various embodiments may include: implemented in one or more computer programs, the one or more computer programs may be executed and/or interpreted on a programmable system including at least one programmable processor, which may be a special purpose or general-purpose programmable processor, that may receive data and instructions from, and transmit data and instructions to, a storage system, at least one input device, and at least one output device.
A computer program for carrying out methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general purpose computer, special purpose computer, or other programmable data processing apparatus, such that the computer programs, when executed by the processor, cause the functions/acts specified in the flowchart and/or block diagram block or blocks to be implemented. The computer program may execute entirely on the machine, partly on the machine, as a stand-alone software package, partly on the machine and partly on a remote machine or entirely on the remote machine or server.
In the context of the present invention, a computer-readable storage medium may be a tangible medium that can contain, or store a computer program for use by or in connection with an instruction execution system, apparatus, or device. The computer readable storage medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. Alternatively, the computer readable storage medium may be a machine readable signal medium. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
To provide for interaction with a user, the systems and techniques described here can be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to a user; and a keyboard and a pointing device (e.g., a mouse or a trackball) through which a user can provide input to the electronic device. Other kinds of devices may also be used to provide for interaction with a user; for example, feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form, including acoustic input, speech input, or tactile input.
The systems and techniques described here can be implemented in a computing system that includes a background component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front-end component (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such background, middleware, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: local Area Networks (LANs), wide Area Networks (WANs), blockchain networks, and the internet.
The computing system may include clients and servers. The client and server are typically remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other. The server can be a cloud server, also called a cloud computing server or a cloud host, and is a host product in a cloud computing service system, so that the defects of high management difficulty and weak service expansibility in the traditional physical hosts and VPS service are overcome.
It should be appreciated that various forms of the flows shown above may be used to reorder, add, or delete steps. For example, the steps described in the present invention may be performed in parallel, sequentially, or in a different order, so long as the desired results of the technical solution of the present invention are achieved, and the present invention is not limited herein.
The above embodiments do not limit the scope of the present invention. It will be apparent to those skilled in the art that various modifications, combinations, sub-combinations and alternatives are possible, depending on design requirements and other factors. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the scope of the present invention.
Claims (10)
1. A preset area generating method for a designated position, the method comprising:
acquiring longitude and latitude coordinates of a designated position and preset region generation parameters;
projecting the longitude and latitude coordinates and the preset region generation parameters to a projection plane to obtain plane coordinates and plane generation parameters of the specified position on the projection plane;
determining the edge point coordinates of the preset area according to the plane coordinates and the plane generation parameters;
and projecting the edge point coordinates to a geocentric coordinate system, and displaying the preset area in a map.
2. The method of claim 1, wherein the obtaining latitude and longitude coordinates of the specified location comprises:
acquiring initial coordinates of a designated position;
when the type of the initial coordinate is longitude and latitude type, the initial coordinate is directly used as the longitude and latitude coordinate of the appointed position;
and when the type of the initial coordinate is not the longitude and latitude type, converting the initial coordinate into the longitude and latitude type to obtain the longitude and latitude coordinate of the appointed position.
3. The method of claim 1, wherein projecting the latitude and longitude coordinates and the preset region generating parameters onto a projection plane comprises:
determining a projection plane corresponding to the longitude and latitude coordinates from a plurality of projection planes according to a projection rule;
and projecting the longitude and latitude coordinates and the preset region generation parameters to the projection plane.
4. The method of claim 1, wherein the predetermined area comprises a circular area, the predetermined area generation parameter comprises a predetermined area radius, and the plane generation parameter comprises a projection radius, respectively.
5. The method of claim 4, wherein determining the edge point coordinates of the predetermined area from the plane coordinates and the plane generation parameters comprises:
determining the number of edge points of the preset area according to the error tolerance and the projection radius;
and determining coordinates of edge points of the preset area according to the number and the plane coordinates.
6. The method of claim 4, wherein the preset area comprises an elliptical area, and wherein when the preset area is desired to be displayed as an elliptical area, the method further comprises:
determining ellipse parameters of the ellipse region;
constructing an affine transformation relation of ellipse and circle according to the ellipse parameters and the edge point coordinates of the circular area;
converting the edge point coordinates of the circular area into the edge point coordinates of the elliptical area according to the affine transformation relation;
and converting the coordinates of the edge points of the elliptical area into coordinates in a geocentric coordinate system.
7. The method of claim 6, wherein the ellipse parameters include a rotation angle, a major axis, and a minor axis.
8. A preset area generating device for a specified position, the device comprising:
the acquisition module is used for acquiring longitude and latitude coordinates of the designated position and preset region generation parameters;
the projection module is used for projecting the longitude and latitude coordinates and the preset region generation parameters to a projection plane to obtain plane coordinates and plane generation parameters of the designated position on the projection plane;
the determining module is used for determining the edge point coordinates of the preset area according to the plane coordinates and the plane generation parameters;
and the display module is used for projecting the edge point coordinates to a geocentric coordinate system and displaying the preset area in a map.
9. An electronic device, the device comprising:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein,
the memory stores a computer program executable by the at least one processor to enable the at least one processor to perform the specified location preset area generation method of any one of claims 1 to 7.
10. A computer readable storage medium storing computer instructions for causing a processor to implement the predetermined area generating method of the specified location of any one of claims 1 to 7 when executed.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202311477671.2A CN117473031A (en) | 2023-11-07 | 2023-11-07 | Method, device, equipment and storage medium for generating preset area of designated position |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202311477671.2A CN117473031A (en) | 2023-11-07 | 2023-11-07 | Method, device, equipment and storage medium for generating preset area of designated position |
Publications (1)
Publication Number | Publication Date |
---|---|
CN117473031A true CN117473031A (en) | 2024-01-30 |
Family
ID=89630879
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202311477671.2A Pending CN117473031A (en) | 2023-11-07 | 2023-11-07 | Method, device, equipment and storage medium for generating preset area of designated position |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN117473031A (en) |
-
2023
- 2023-11-07 CN CN202311477671.2A patent/CN117473031A/en active Pending
Similar Documents
Publication | Publication Date | Title |
---|---|---|
Winarno et al. | Location based service for presence system using haversine method | |
CN106844376B (en) | Method and device for recommending interest points | |
Panigrahi | Computing in geographic information systems | |
Alam et al. | Implementation of haversine formula for counting event visitor in the radius based on Android application | |
US8718922B2 (en) | Variable density depthmap | |
US10341982B2 (en) | Technique and system of positioning a mobile terminal indoors | |
RU2680093C2 (en) | Location error radius determination | |
US9805058B2 (en) | Visibility of a point of interest based on environmental conditions | |
CN110334349B (en) | Method and device for automatically naming business district, computer equipment and storage medium | |
JP2019002913A (en) | Air pollution source recognition based on dynamic pairing and comparison | |
US9679399B2 (en) | Method to optimize the visualization of a map's projection based on data and tasks | |
JP7298090B2 (en) | Method and apparatus for extracting spatial relationships of geolocation points | |
CN109241233A (en) | A kind of coordinate matching method and device | |
CN117473031A (en) | Method, device, equipment and storage medium for generating preset area of designated position | |
CN115511701A (en) | Method and device for converting geographic information | |
US10460420B2 (en) | Converting spatial features to map projection | |
CN115687587A (en) | Internet of things equipment and space object association matching method, device, equipment and medium based on position information | |
Toman et al. | Algorithm for graph building based on Google Maps and Google Earth | |
CN111737374B (en) | Position coordinate determination method, device, electronic equipment and storage medium | |
WO2016058533A1 (en) | Method and apparatus for generating and positioning descriptive location prompt information | |
Hung et al. | Assessing the quality of building footprints on OpenStreetMap: a case study in Taiwan | |
Tsou | Using GIS to obtain Celestial fix under the framework of an ECDIS System | |
Faridy et al. | Implementation of Augmented Reality Geolocation Application Based on Android for Searching Hospital Location | |
CN107133295B (en) | Accelerated inverse address resolution method and device based on recorder management platform | |
Dekker et al. | MARWind: mobile augmented reality wind farm visualization |
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 |