CN112379806A - Mark display method and device for farming activities, electronic equipment and storage medium - Google Patents

Mark display method and device for farming activities, electronic equipment and storage medium Download PDF

Info

Publication number
CN112379806A
CN112379806A CN202011362138.8A CN202011362138A CN112379806A CN 112379806 A CN112379806 A CN 112379806A CN 202011362138 A CN202011362138 A CN 202011362138A CN 112379806 A CN112379806 A CN 112379806A
Authority
CN
China
Prior art keywords
farming
area
historical
grid
activities
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.)
Granted
Application number
CN202011362138.8A
Other languages
Chinese (zh)
Other versions
CN112379806B (en
Inventor
董水峰
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Ping An International Smart City Technology Co Ltd
Original Assignee
Ping An International Smart City Technology Co Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Ping An International Smart City Technology Co Ltd filed Critical Ping An International Smart City Technology Co Ltd
Priority to CN202011362138.8A priority Critical patent/CN112379806B/en
Publication of CN112379806A publication Critical patent/CN112379806A/en
Application granted granted Critical
Publication of CN112379806B publication Critical patent/CN112379806B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input 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/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0481Interaction techniques based on graphical user interfaces [GUI] based on specific properties of the displayed interaction object or a metaphor-based environment, e.g. interaction with desktop elements like windows or icons, or assisted by a cursor's changing behaviour or appearance
    • G06F3/04817Interaction techniques based on graphical user interfaces [GUI] based on specific properties of the displayed interaction object or a metaphor-based environment, e.g. interaction with desktop elements like windows or icons, or assisted by a cursor's changing behaviour or appearance using icons
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/29Geographical information databases
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input 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/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0484Interaction techniques based on graphical user interfaces [GUI] for the control of specific functions or operations, e.g. selecting or manipulating an object, an image or a displayed text element, setting a parameter value or selecting a range
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input 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/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0487Interaction techniques based on graphical user interfaces [GUI] using specific features provided by the input device, e.g. functions controlled by the rotation of a mouse with dual sensing arrangements, or of the nature of the input device, e.g. tap gestures based on pressure sensed by a digitiser
    • G06F3/0488Interaction techniques based on graphical user interfaces [GUI] using specific features provided by the input device, e.g. functions controlled by the rotation of a mouse with dual sensing arrangements, or of the nature of the input device, e.g. tap gestures based on pressure sensed by a digitiser using a touch-screen or digitiser, e.g. input of commands through traced gestures
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T11/002D [Two Dimensional] image generation
    • G06T11/60Editing figures and text; Combining figures or text

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Human Computer Interaction (AREA)
  • Databases & Information Systems (AREA)
  • Remote Sensing (AREA)
  • Data Mining & Analysis (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)
  • User Interface Of Digital Computer (AREA)

Abstract

The invention provides a mark display method, a device and a storage medium of agricultural activities, which judge whether icons representing all agricultural activities can be displayed in a screen or not by calculating and comparing the areas of the icons representing all agricultural activities in an agricultural area with the areas of the agricultural areas in the screen. Therefore, icons representing the farming activities in the farming area can be reasonably displayed under a given map zoom level, namely all the icons representing the farming activities are displayed when the size requirement is met, and the marking display of the farming activities is stopped when the size requirement is not met, so that the operator can conveniently view farming information and manage the farming activities.

Description

Mark display method and device for farming activities, electronic equipment and storage medium
Technical Field
The invention relates to the field of big data, in particular to a mark display method and device for farming activities, electronic equipment and a storage medium.
Background
During the agricultural production process of planting and breeding, such as seedling raising, field planting, harvesting, primary processing, breeding and other production stages, a series of farming activities can be generated. Taking field planting as an example, the farming activities comprise land selection, land preparation, base fertilizer, seeding, watering, pesticide spraying, pollination and the like. The farming activities, whether planting or farming, need to be assigned to specific farming areas, such as greenhouses, farmland plots, houses, lagoons, waters, factory workshops, etc. By utilizing the electronic map technology, the geographical boundary of the farming area is displayed on the map, and farming activities are alternately displayed on the map by combining the farming area, so that operators can conveniently check farming information and manage farming activities.
Because the farming activities do not have geographical position information, if the farming activity information is to be checked on the electronic map, one way is to place a similar water drop icon at a certain point (such as a central point) of a farming area and display all the relevant farming activities in cooperation with an information frame; the other mode is that the region to which the mouse belongs is clicked or floated, and all related farming activities are displayed through an information frame. The two modes need an additional carrier (namely an information frame) to be capable of mutually showing the farming activities on the map, and the prior art cannot visually show the farming activities on the map, so that the farming activities cannot be quickly interacted to each farming activity.
Disclosure of Invention
The invention provides a mark display method and device for agricultural activities, electronic equipment and a storage medium, and mainly aims to provide a method for displaying agricultural activities in an icon form in an electronic map.
In order to achieve the above object, the present invention provides a method for displaying a mark of an agricultural activity, the method comprising:
acquiring a current zoom level SC, a screen size, an icon size and an icon number n of the electronic map, wherein the icon is used for marking the farming activities in the farming area;
under the current zoom level SC, respectively calculating the area A of the farming area and the total area B of the icon;
if the area A of the farming area is smaller than the total area B of the icons, the marking display of the farming activities is stopped;
and if the area A of the farming area is not smaller than the total area B of the icons, performing mesh subdivision on the farming area to form meshes, and placing the icons in the meshes to mark and display the farming activities.
To achieve the above object, the present invention also provides a mark display device for agricultural activities, the device comprising:
the data acquisition unit is used for acquiring the current zoom level SC, the screen size, the icon size and the icon number n of the electronic map, wherein the icons are icons used for marking the farming activities in the farming area;
the area calculation unit is used for respectively calculating the area A of the farming area and the total area B of the icon under the current zoom level SC;
the termination marking unit is used for terminating the marking display of the farming activities if the area A of the farming area is smaller than the total area B of the icons;
and the mark display unit is used for meshing the farming area to form a grid if the area A of the farming area is not smaller than the total area B of the icon, and placing the icon in the grid to mark and display the farming activity.
To achieve the above object, the present invention also provides an electronic device, including: the mark display program of the farming activities is executed by the processor to realize the steps of the mark display method of the farming activities.
In order to achieve the above object, the present invention further provides a computer readable storage medium, in which a mark display program of the farming activities is stored, and when the mark display program of the farming activities is executed by a processor, the steps of the mark display method of the farming activities as described above are realized.
The method, the device, the electronic equipment and the storage medium for displaying the marks of the agricultural activities judge whether the icons representing all the agricultural activities can be displayed on the screen or not by calculating and comparing the areas of the icons representing all the agricultural activities in the agricultural area with the areas of the agricultural areas in the screen. Therefore, under the given map zoom level, the icons representing the farming areas or farming activities can be reasonably displayed, namely all the icons representing the farming activities are displayed when the size requirement is met, and the farming activities are displayed in the form of the icons when the size requirement is not met. The operator can conveniently check the farming activity information and manage the farming activity.
Drawings
Fig. 1 is a schematic application environment diagram of a method for displaying a mark of an agricultural activity according to an embodiment of the present invention.
FIG. 2 is a block diagram illustrating an exemplary embodiment of a mark display procedure for the agricultural activities of FIG. 1.
FIG. 3 is a flowchart of an embodiment of a method for displaying indicia of farming activities according to the present invention.
FIG. 4 illustrates a farming area in a geographic coordinate system in an embodiment of the present invention.
FIG. 5 illustrates a screen canvas in a screen coordinate system in an embodiment of the present invention.
Fig. 6 is a schematic diagram of meshing of the farming area according to an embodiment of the present invention.
The implementation, functional features and advantages of the objects of the present invention will be further explained with reference to the accompanying drawings.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
The invention provides a mark display method of farming activities, which is applied to an electronic device 1. Referring to fig. 1, a schematic diagram of an application environment of a method for displaying a mark of a farming activity according to a preferred embodiment of the present invention is shown.
In the present embodiment, the electronic device 1 may be a terminal device having an arithmetic function, such as a server, a smart phone, a tablet computer, a portable computer, or a desktop computer.
The electronic device 1 includes: a processor 12, a memory 11, a network interface 14, and a communication bus 13.
The memory 11 includes at least one type of readable storage medium. The at least one type of readable storage medium may be a non-volatile storage medium such as a flash memory, a hard disk, a multimedia card, a card-type memory, and the like. In some embodiments, the readable storage medium may be an internal storage unit of the electronic device 1, such as a hard disk of the electronic device 1. In other embodiments, the readable storage medium may also be an external memory 11 of the electronic device 1, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), and the like, which are provided on the electronic device 1.
In the present embodiment, the readable storage medium of the memory 11 is generally used for storing the interface code and/or the interface document generating program 10 and the like installed in the electronic device 1. The memory 11 may also be used to temporarily store data that has been output or is to be output.
The processor 12 may be, in some embodiments, a Central Processing Unit (CPU), microprocessor or other data Processing chip for running program codes stored in the memory 11 or Processing data, such as the mark display program 10 for farm activities.
The network interface 14 may optionally include a standard wired interface, a wireless interface (e.g., WI-FI interface), and is typically used to establish a communication link between the electronic device 1 and other electronic devices.
The communication bus 13 is used to realize connection communication between these components.
FIG. 1 shows only an electronic device 1 having components 11-14, but it is understood that not all of the shown components are required to be implemented, and that more or fewer components may be implemented instead.
Optionally, the electronic device 1 may further comprise a user interface, the user interface may comprise an input unit such as a Keyboard (Keyboard), a voice input device such as a microphone (microphone) or other devices with voice recognition function, a voice output device such as a sound box, a headset or other devices, and optionally the user interface may further comprise a standard wired interface or a wireless interface.
Optionally, the electronic device 1 may further comprise a display, which may also be referred to as a display screen or a display unit. In some embodiments, the display device may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, an Organic Light-Emitting Diode (OLED) touch device, or the like. The display is used for displaying information processed in the electronic device 1 and for displaying a visualized user interface.
Optionally, the electronic device 1 further comprises a touch sensor. The area provided by the touch sensor for the user to perform touch operation is called a touch area. Further, the touch sensor described herein may be a resistive touch sensor, a capacitive touch sensor, or the like. The touch sensor may include not only a contact type touch sensor but also a proximity type touch sensor. Further, the touch sensor may be a single sensor, or may be a plurality of sensors arranged in an array, for example.
The area of the display of the electronic device 1 may be the same as or different from the area of the touch sensor. Optionally, a display is stacked with the touch sensor to form a touch display screen. The device detects touch operation triggered by a user based on the touch display screen.
Optionally, the electronic device 1 may further include a Radio Frequency (RF) circuit, a sensor, an audio circuit, and the like, which are not described herein again.
In the embodiment of the apparatus shown in fig. 1, the memory 11, which is a kind of computer storage medium, may include therein an operating system, and a mark display program 10 for farming activities; the processor 12, when executing the indicia display method program 10 for agricultural activities stored in the memory 11, implements the following steps:
acquiring a current zoom level SC, a screen size, an icon size and an icon number n of the electronic map, wherein the icon is used for marking the farming activities in the farming area;
under the current zoom level SC, respectively calculating the area A of the farming area and the total area B of the icon;
if the area A of the farming area is smaller than the total area B of the icons, the marking display of the farming activities is stopped;
and if the area A of the farming area is not smaller than the total area B of the icons, performing mesh subdivision on the farming area to form meshes, and placing the icons in the meshes to mark and display the farming activities.
Preferably, the step of calculating the area a of the farming area at the current zoom level SC comprises:
converting the geographical coordinate system of the farming area into a screen coordinate system;
and calculating the area A of the farming area under the screen coordinate system.
Preferably, before mesh generation is performed on the farming area, whether a historical mesh generation record exists in the farming area is retrieved;
if the farming area has no historical grid generation record, carrying out grid generation on the farming area;
if the farming area has a historical mesh generation record, judging whether the historical mesh generation record is effective;
if the historical grid generation record is valid, placing the icon in a grid in the historical grid generation to mark and display the farming activities;
and if the historical grid subdivision record is invalid, carrying out grid subdivision on the farming area or stopping marking and displaying the farming activities.
Further preferably, the determining whether the historical mesh generation record is valid includes:
acquiring a historical scaling level $4 and a historical grid quantity $5 in the historical grid subdivision record;
if the current zoom level SC is greater than the historical zoom level $4 and the icon number n is greater than the historical grid number $5, the historical grid generation record is invalid, and grid generation is carried out on the farming area;
if the current zoom level SC is greater than the historical zoom level $4 and the icon number n is not greater than the historical grid number $5, the historical grid subdivision record is valid;
if the current zoom level SC is equal to the historical zoom level $4 and the icon number n is greater than the historical grid number $5, the historical grid division record is invalid, and marking and displaying of the farming activities are stopped;
if the current zoom level SC is equal to the historical zoom level $4 and the icon number n is not greater than the historical grid number $5, the historical grid subdivision record is valid;
if the current zoom level SC is less than $4 of the historical zoom level and the number n of the icons is not less than $5 of the historical grid number, the historical grid subdivision record is invalid, and marking display of the farming activities is stopped;
and if the current zoom level SC is less than the historical zoom level $4 and the icon number n is less than the historical grid number $5, recording that the historical grid generation is invalid, and carrying out grid generation on the farming area.
Preferably, the method for meshing the farming area comprises the following steps:
and taking the gravity center of the farming area as a central point, taking the number of pixels of width and height of the icon as the width and height of the grids, carrying out grid subdivision on the farming area from inside to outside, and stopping the grid subdivision until the outermost grid contains the farming area.
Further preferably, after the mesh generation of the farming area is completed, it is further determined whether the mesh generation is effective, and the determination method includes:
all grids in the farming area are taken as qualified grids, the number of the qualified grids is recorded as m,
if the number m of the qualified grids is not less than the number n of the icons, the grid subdivision is effective;
and if the number m of the qualified grids is less than the number n of the icons, the grid subdivision is invalid.
Still further preferably, if the mesh generation is effective, the icons are placed in the mesh according to a preset sequence so as to mark and display the farming activities.
In other embodiments, the mark display method program 10 for farm activity can be further divided into one or more modules, and the one or more modules are stored in the memory 11 and executed by the processor 12 to implement the present invention. The modules referred to herein are referred to as a series of computer program instruction segments capable of performing specified functions. Referring to FIG. 2, a block diagram of a preferred embodiment of the indicia display method 10 for agricultural activities of FIG. 1 is shown. The mark display method program 10 of the farming activity may be divided into: a data acquisition unit 101, an area calculation unit 102, an end marker unit 103, and a marker display unit 104. The functions or operation steps performed by the modules 101-104 are similar to those described above and will not be described in detail here, for example, wherein:
the data acquisition unit 101 is used for acquiring the current zoom level SC, the screen size, the icon size and the icon number n of the electronic map, wherein the icon is used for marking the farming activities in the farming area;
an area calculating unit 102, configured to calculate, under the current zoom level SC, an area a of the farming area and a total area B of the icon respectively;
a termination marking unit 103, configured to terminate the marking display on the farming activity if the area a of the farming area is smaller than the total area B of the icons;
and the mark display unit 104 is configured to, if the area a of the farming area is not smaller than the total area B of the icons, perform mesh generation on the farming area to form a mesh, and place the icons in the mesh to mark and display the farming activities.
In other words, the present invention also provides a mark display device for agricultural activities, the device comprising:
the data acquisition unit 101 is used for acquiring the current zoom level SC, the screen size, the icon size and the icon number n of the electronic map, wherein the icon is used for marking the farming activities in the farming area;
an area calculating unit 102, configured to calculate, under the current zoom level SC, an area a of the farming area and a total area B of the icon respectively;
a termination marking unit 103, configured to terminate the marking display on the farming activity if the area a of the farming area is smaller than the total area B of the icons;
and the mark display unit 104 is configured to, if the area a of the farming area is not smaller than the total area B of the icons, perform mesh generation on the farming area to form a mesh, and place the icons in the mesh to mark and display the farming activities.
In addition, the invention also provides a marking display method of the farming activities. Referring to FIG. 3, a flow chart of a preferred embodiment of the method for displaying indicia of farming activities according to the present invention is shown. The method may be performed by an apparatus, which may be implemented by software and/or hardware.
In this embodiment, the method for displaying the mark of the farming activity includes: step S110 to step S140.
Step S110: and acquiring the current zoom level SC, the screen size, the icon size and the icon number n of the electronic map, wherein the icon is used for marking the farming activities in the farming area.
Wherein the number n of the icons is the number of the farming activities in the farming area.
When a user views an electronic map, a farming area in the electronic map and farming activities in the farming area on an electronic device with a display screen, a zoom level SC of the electronic map is first determined, where the zoom level SC may be determined by input into the electronic device or manually determined through a touch screen interface.
The screen size in this embodiment refers to the size of the display screen of the electronic device, and the width and height dimensions thereof are calculated in terms of the number of pixels. The size of the icon refers to the width and height of the icon used to represent farming activity, again calculated using the number of pixels. In particular embodiments, the icon may be of various shapes, such as circular, drop-shaped, oval, and the like. It should be noted that, when calculating the area b of the icon, the product of the width and the height of the icon is used, not the actual area.
Before marking and displaying the farm activity in the form of an icon, firstly, parameter information such as the zoom level SC of the electronic map, the screen size, the width and the height of the icon, the number n of the farm activity in the farm area and the like is acquired, and the purpose is to judge whether all the icons of the farm activity can be marked and displayed on the screen with the size under the zoom level.
It should be noted that, under the determined zoom level SC and screen size of the electronic map, the four to four ranges of the farm areas may not be all displayed, and all farm areas can be displayed only by translating the electronic map.
Step S120: and under the current zoom level SC, respectively calculating the area A of the farming area and the total area B of the icons.
Specifically, when calculating the area a of the farming area at the zoom level SC, the geographical coordinate system of the farming area is first converted into a screen coordinate system, and then the area a of the farming area is calculated under the screen coordinate system.
As shown in fig. 4 and 5, the screen canvas in the geographic coordinate system and the screen coordinate system are respectively shown, wherein H, W in fig. 4 represents the width and height of the farm area, and H 'and W' in fig. 5 represent the width and height of the screen canvas. In converting a point (X, Y) in the geographic coordinate system to a point (X ', Y') in the screen coordinate system, the conversion formula is:
Figure BDA0002804285500000091
in the formula (X)0,Y0) Is the coordinate of the origin in the geographic coordinate system.
After obtaining the coordinate points of the positions of the farming area in the screen coordinate system, the area a of the farming area under the screen coordinate system can be calculated, specifically, the area of the graph of the farming area can be calculated through a computer, and the area of the farming area can also be calculated through other prior arts, which is not described herein again.
In calculating the total area B of the icons representing the farming activities in the farming area, the formula B ═ n × B is employed. Wherein B is the total area of the icons marking the farming activities, B is the area of each icon, and n is the number of the icons.
Step S130: and if the area A of the farming area is smaller than the total area B of the icons, stopping displaying the marks of the farming activities. Specifically, if the area a of the farming area is smaller than the total area B of the icons, it turns out that in the farming area, the icons representing all the farming activities cannot be displayed in their entirety, and therefore, the display of the marks for the farming activities is terminated.
Step S140: and if the area A of the farming area is not smaller than the total area B of the icons, performing mesh subdivision on the farming area to form meshes, and placing the icons in the meshes to mark and display the farming activities.
Specifically, before mesh generation is performed on the farming area, whether a historical mesh generation record exists in the farming area is searched in the electronic device.
And if the agricultural area has no historical mesh generation record, carrying out mesh generation on the agricultural area, and storing the generation result as the historical mesh generation record in the later icon marking process. The naming format of the mesh generation record is unique, and for example, the following formats can be adopted: "$ 1{ farming area space-time unique identifier } _ 2{ icon wide pixel number } _$3{ icon high pixel number } _ 4{ map zoom level } _ 5{ grid number }".
If the farming area has a historical grid subdivision record, namely, the farming area represented by $1 is the farming area marked with the icon at this time, whether the historical grid subdivision record is effective or not needs to be further judged, if the historical grid subdivision record is effective, icons representing all farming activities in the farming area are respectively placed in grids in the historical grid subdivision for marking and displaying, and if the historical grid subdivision record is ineffective, the farming area is subjected to grid subdivision or the farming activities are stopped for marking and displaying.
Specifically, the process of determining whether the historical mesh generation record is valid includes the following steps:
firstly, acquiring a historical zoom level $4 and a historical grid number $5 in the historical grid division record, and then judging in different situations:
if the current zoom level SC is greater than $4 of the historical zoom level and the number n of the icons is greater than $5 of the historical grid, the historical grid subdivision record is invalid, and at this time, it needs to be further determined whether the icons of the farming activities in the farming area can be completely displayed in the screen canvas at the zoom level SC, that is, the grid subdivision is performed again on the farming area.
If the current zoom level SC is greater than $4 of the historical zoom level and the number n of the icons is not greater than $5 of the historical grid, the historical grid subdivision record is valid, at this time, the icons of all the farming activities in the farming area can be completely displayed in the screen canvas under the zoom level SC, and therefore, the icons representing the farming activities are only required to be displayed according to a certain rule.
If the current zoom level SC is equal to $4 of the historical zoom level and the number n of icons is greater than $5 of the historical grid, the historical grid subdivision record is invalid, and at this time, the icons of the farming activities in the farming area cannot be completely displayed in the screen canvas at the zoom level SC, so that the marking display of the farming activities is terminated.
If the current zoom level SC is equal to $4 of the historical zoom level and the number n of the icons is not greater than $5 of the historical grid, the historical grid subdivision record is valid, and at this time, the icons of the farming activities in the farming area can be completely displayed in the screen canvas under the zoom level SC, so that the icons representing the farming activities are only required to be displayed according to a certain rule.
If the current zoom level SC is less than $4 of the historical zoom level and the number n of icons is not less than $5 of the historical grid number, the historical grid subdivision record is invalid, and at this time, the icons of the farming activities in the farming area cannot be completely displayed in the screen canvas at the zoom level SC, so that the marking display of the farming activities is terminated.
If the current zoom level SC is less than $4 of the historical zoom level and the number n of the icons is less than $5 of the historical grid, the historical grid subdivision record is invalid, and at this time, it needs to be further determined whether the icons of the farming activities in the farming area can be completely displayed in the screen canvas at the zoom level SC, that is, the grid subdivision is performed again on the farming area.
In addition, the specific method for meshing the farming area comprises the following steps: and taking the gravity center of the farming area as a central point, taking the number of pixels of width and height of the icon as the width and height of the grids, carrying out grid subdivision on the farming area from inside to outside, and stopping the grid subdivision until the outermost grid contains the farming area. As shown in fig. 6, a farm area in the shape of a parallelogram is shown, and after meshing, 35 mesh cells of 7 rows and 5 columns are formed.
After the grid division of the farming area is finished, whether the grid division is effective needs to be judged, and the specific judgment method comprises the following steps:
all grids in the farming area are taken as qualified grids, the number of the qualified grids is recorded as m,
if the number m of qualified grids is not less than the number n of icons, the grid subdivision is valid,
and if the number m of the qualified grids is less than the number n of the icons, the grid subdivision is invalid. As shown in fig. 6, the number m of all qualified grids in the farming area is 13, that is, the grid marked with numbers is a qualified grid. If the number n of the farming activities in the farming area is larger than 13, the grid subdivision is invalid, that is, the 13 grids cannot hold all the icons representing the farming activities, and the marking display of the farming activities is stopped. If the number n of the farm activities in the farm area is less than or equal to 13, the mesh subdivision is effective, at the moment, icons representing the farm activities in the farm area are displayed in the mesh according to a certain rule arrangement, and meanwhile, the effective mesh subdivision is stored.
In one embodiment, the rule that the icons representing the farming activities are displayed in the grid according to a certain regular arrangement is as follows: the farming activities are firstly sequenced according to the sequence of the farming activities, and then icons of two farming activities with close sequence are placed in two grids with longer distance in the grids.
In a specific embodiment, the rule that the icons representing the farming activities are displayed in the grid according to a certain regular arrangement is as follows:
firstly, the farming activities are sequenced according to the time sequence of the farming activities, then the icon of the first farming activity is placed in the grid at the center of gravity of the farming area, and the icons of the subsequent farming activities are placed according to the sequence of the grids at the four corners of the grid where the previous farming activities are located (the specific sequence is upper left, upper right, lower right and lower left).
After icons representing the farming activities are placed on all the four-corner grids, the rest icons are sequentially placed in the four-to-grid of the grid where the prior farming activities are located according to the sequence of the farming activities (all the four-to-grid need to be sequenced during specific placement, and the sequencing method comprises the steps of calculating the number of the adjacent qualified grids of all the four-to-grid, and sequencing the four-to-grid according to the sequence of the number of the adjacent qualified grids from less to more and the sequence of the upper, the right, the lower and the left). Specifically, as shown in fig. 6, after icons representing farm activities are placed on all the four corner grids, the sequence of the grids is arranged to sequence number 5, at this time, all the four to grids need to be sorted, and the existing four to grids are respectively: the number of the qualified grids with adjacent edges of the grid No. 0 is respectively 3, 4 and 2; the upper grid of grid No. 1 (i.e. grid No. 7 in the figure), the number of the qualified grids adjacent to the edge of the grid is 2; the lower grid of grid No. 2 (i.e. grid No. 8 in the figure), the number of the qualified grids adjacent to the edge of the grid is 2; the lower grid of grid No. 3 (i.e. grid No. 9 in the figure), the number of the qualified grids adjacent to the edge of the grid is 2; the number of the qualified grids adjacent to the edges is counted from four to four grids of the No. 4 grid, and the counting is not carried out; it should be noted that, when counting, the number of the edge-adjacent qualified grids of the next four-to-grid is not counted again if the number of the edge-adjacent qualified grids of the previous four-to-grid is counted, and therefore, the number of the edge-adjacent qualified grids of the four-to-grid of grid No. 5 is not counted again. The four-to-grids are sorted according to the number of the qualified grids on the adjacent edges of the four-to-grids and the sequence of the upper, right, lower, left and four corner grids, and finally the sequencing of the remaining four-to-grids in the graph 6 is as follows: grids No. 6, No. 7, No. 8, No. 9, No. 10, No. 11 and No. 12.
Specifically, as shown in FIG. 6, the order of 13 active grids when placing icons representing farming activities is given. When the icons representing the farming activities are placed, the icons are sequentially placed in the grids numbered 0-12 in the figure 6 according to the sequence of the farming activities. And finally, displaying the placed icon representing the farming activities on the electronic map.
The specific implementation of the computer-readable storage medium of the present invention is substantially the same as the specific implementation of the method, the apparatus, and the electronic device for displaying the mark of the farming activities described above, and will not be described herein again.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, apparatus, article, or method that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, apparatus, article, or method. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, apparatus, article, or method that includes the element.
The above-mentioned serial numbers of the embodiments of the present invention are merely for description and do not represent the merits of the embodiments. Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium (e.g., ROM/RAM, magnetic disk, optical disk) as described above and includes instructions for enabling a terminal device (e.g., a mobile phone, a computer, a server, or a network device) to execute the method according to the embodiments of the present invention.
The above description is only a preferred embodiment of the present invention, and not intended to limit the scope of the present invention, and all modifications of equivalent structures and equivalent processes, which are made by using the contents of the present specification and the accompanying drawings, or directly or indirectly applied to other related technical fields, are included in the scope of the present invention.

Claims (10)

1. A method of displaying indicia of a farming activity, the method comprising:
acquiring a current zoom level SC, a screen size, an icon size and an icon number n of the electronic map, wherein the icon is used for marking the farming activities in the farming area;
under the current zoom level SC, respectively calculating the area A of the farming area and the total area B of the icon;
if the area A of the farming area is smaller than the total area B of the icons, the marking display of the farming activities is stopped;
and if the area A of the farming area is not smaller than the total area B of the icons, performing mesh subdivision on the farming area to form meshes, and placing the icons in the meshes to mark and display the farming activities.
2. The method for displaying indicia of farming activity of claim 1, wherein the step of calculating the area a of the farming area at the current zoom level SC comprises:
converting the geographical coordinate system of the farming area into a screen coordinate system;
and calculating the area A of the farming area under the screen coordinate system.
3. The marking and displaying method of agricultural activities according to claim 1, wherein before the gridding of the agricultural area, searching whether a historical gridding record exists in the agricultural area;
if the farming area has no historical grid generation record, carrying out grid generation on the farming area;
if the farming area has a historical mesh generation record, judging whether the historical mesh generation record is effective;
if the historical grid generation record is valid, placing the icon in a grid in the historical grid generation to mark and display the farming activities;
and if the historical grid subdivision record is invalid, carrying out grid subdivision on the farming area or stopping marking and displaying the farming activities.
4. The method of displaying indicia of agricultural activity of claim 3, wherein the determining whether the historical grid partitioning record is valid comprises:
acquiring a historical scaling level $4 and a historical grid quantity $5 in the historical grid subdivision record;
if the current zoom level SC is greater than the historical zoom level $4 and the icon number n is greater than the historical grid number $5, the historical grid generation record is invalid, and grid generation is carried out on the farming area;
if the current zoom level SC is greater than the historical zoom level $4 and the icon number n is not greater than the historical grid number $5, the historical grid subdivision record is valid;
if the current zoom level SC is equal to the historical zoom level $4 and the icon number n is greater than the historical grid number $5, the historical grid division record is invalid, and marking and displaying of the farming activities are stopped;
if the current zoom level SC is equal to the historical zoom level $4 and the icon number n is not greater than the historical grid number $5, the historical grid subdivision record is valid;
if the current zoom level SC is less than $4 of the historical zoom level and the number n of the icons is not less than $5 of the historical grid number, the historical grid subdivision record is invalid, and marking display of the farming activities is stopped;
and if the current zoom level SC is less than the historical zoom level $4 and the icon number n is less than the historical grid number $5, recording that the historical grid generation is invalid, and carrying out grid generation on the farming area.
5. The method for displaying indicia of agricultural activity of any one of claims 1 to 4, wherein the meshing of the agricultural area is performed by:
and taking the gravity center of the farming area as a central point, taking the number of pixels of width and height of the icon as the width and height of the grids, carrying out grid subdivision on the farming area from inside to outside, and stopping the grid subdivision until the outermost grid contains the farming area.
6. The marking and displaying method of agricultural activities according to claim 5, wherein after the meshing of the agricultural area is completed, it is further determined whether the meshing is valid, and the determining method is:
all grids in the farming area are taken as qualified grids, the number of the qualified grids is recorded as m,
if the number m of the qualified grids is not less than the number n of the icons, the grid subdivision is effective;
and if the number m of the qualified grids is less than the number n of the icons, the grid subdivision is invalid.
7. The method for displaying the mark of the farming activity of claim 6, wherein if the mesh subdivision is valid, the icons are placed in the mesh according to a preset sequence to display the mark of the farming activity.
8. An indicia display device for agricultural activities, the device comprising:
the data acquisition unit is used for acquiring the current zoom level SC, the screen size, the icon size and the icon number n of the electronic map, wherein the icons are icons used for marking the farming activities in the farming area;
the area calculation unit is used for respectively calculating the area A of the farming area and the total area B of the icon under the current zoom level SC;
the termination marking unit is used for terminating the marking display of the farming activities if the area A of the farming area is smaller than the total area B of the icons;
and the mark display unit is used for meshing the farming area to form a grid if the area A of the farming area is not smaller than the total area B of the icon, and placing the icon in the grid to mark and display the farming activity.
9. An electronic device, comprising: memory and processor, in which are stored indicia display programs of farming activities, which when executed by the processor implement the steps of the indicia display method of farming activities according to any of claims 1 to 7.
10. A computer-readable storage medium, wherein a program for displaying a mark of a farming activity is stored in the computer-readable storage medium, and when the program for displaying a mark of a farming activity is executed by a processor, the steps of the method for displaying a mark of a farming activity according to any one of claims 1 to 7 are implemented.
CN202011362138.8A 2020-11-27 2020-11-27 Mark display method and device for agricultural activities, electronic equipment and storage medium Active CN112379806B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011362138.8A CN112379806B (en) 2020-11-27 2020-11-27 Mark display method and device for agricultural activities, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011362138.8A CN112379806B (en) 2020-11-27 2020-11-27 Mark display method and device for agricultural activities, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN112379806A true CN112379806A (en) 2021-02-19
CN112379806B CN112379806B (en) 2024-04-16

Family

ID=74587487

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011362138.8A Active CN112379806B (en) 2020-11-27 2020-11-27 Mark display method and device for agricultural activities, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN112379806B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113052743A (en) * 2021-03-24 2021-06-29 中国科学院地理科学与资源研究所 Urban carbon emission data processing method, device, medium and terminal equipment

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103578347A (en) * 2012-08-01 2014-02-12 高德软件有限公司 Method and device for displaying POI in electronic map and mobile terminal
KR20160110877A (en) * 2015-03-13 2016-09-22 팅크웨어(주) System and method for providing nearby search service using poi clustering techniques
CN109146703A (en) * 2018-08-09 2019-01-04 成都天地量子科技有限公司 A kind of field-crop type real-time mark system
CN109376745A (en) * 2018-10-24 2019-02-22 中南民族大学 Farming activities method for pushing, device, server and storage medium
KR20200048494A (en) * 2018-10-30 2020-05-08 (주)나무플러스 Smartphone-based farming data memo management system
CN111459183A (en) * 2020-04-10 2020-07-28 广州极飞科技有限公司 Operation parameter recommendation method and device, unmanned equipment and storage medium
CN111552762A (en) * 2020-05-12 2020-08-18 广西旗鸣信息科技有限公司 Orchard planting digital map management method and system based on fruit tree coding

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103578347A (en) * 2012-08-01 2014-02-12 高德软件有限公司 Method and device for displaying POI in electronic map and mobile terminal
KR20160110877A (en) * 2015-03-13 2016-09-22 팅크웨어(주) System and method for providing nearby search service using poi clustering techniques
CN109146703A (en) * 2018-08-09 2019-01-04 成都天地量子科技有限公司 A kind of field-crop type real-time mark system
CN109376745A (en) * 2018-10-24 2019-02-22 中南民族大学 Farming activities method for pushing, device, server and storage medium
KR20200048494A (en) * 2018-10-30 2020-05-08 (주)나무플러스 Smartphone-based farming data memo management system
CN111459183A (en) * 2020-04-10 2020-07-28 广州极飞科技有限公司 Operation parameter recommendation method and device, unmanned equipment and storage medium
CN111552762A (en) * 2020-05-12 2020-08-18 广西旗鸣信息科技有限公司 Orchard planting digital map management method and system based on fruit tree coding

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113052743A (en) * 2021-03-24 2021-06-29 中国科学院地理科学与资源研究所 Urban carbon emission data processing method, device, medium and terminal equipment
CN113052743B (en) * 2021-03-24 2022-07-15 中国科学院地理科学与资源研究所 Urban carbon emission data processing method, device, medium and terminal equipment

Also Published As

Publication number Publication date
CN112379806B (en) 2024-04-16

Similar Documents

Publication Publication Date Title
CN103383682B (en) A kind of Geocoding, position enquiring system and method
Jones Decision support systems for agricultural development
US10475212B2 (en) Methods for generating soil maps and application prescriptions
CN105354022B (en) A kind of page layout document generating method and device
CN108024505A (en) Image determinant method
CN106484693A (en) Map-indication method, picture block storage method and picture display terminal
JP2010504560A (en) Method and system for displaying graphic objects on a digital map
CN102043586B (en) Method and device for displaying background color in electronic form
CN107193518A (en) The method and terminal device of a kind of presentation of information
CN108171797B (en) Grid object generation method and device
CN111291438B (en) File processing method and device, electronic equipment and storage medium
CN112379806B (en) Mark display method and device for agricultural activities, electronic equipment and storage medium
CN105338537B (en) A kind of method and terminal of the shared analysis of newly-increased base station site
CN106204358A (en) Real estate unifies register information management system
CN106952146A (en) A kind of intelligence chooses the method and system of private tutor
KR20210109575A (en) Information processing devices and information processing systems
JP2022189946A (en) Work information analysis device and work information analysis method
CN111460998A (en) Dynamic spraying method and system
CN110019612B (en) Map rendering method and related equipment
CN112328948A (en) Erosion calculation system for water and soil conservation
US20150364118A1 (en) Attribute based map marker clustering
CN116975170A (en) Map display method, map data generation method, map display device and electronic equipment
CN111489295B (en) Image processing method, electronic device, and storage medium
CN115271435A (en) Data processing method and device suitable for intelligent protection of cultivated land
KR20070049127A (en) Landscape architecture maintenance information method and the device having the same based on gis

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