How to add Enable/Disable extention functionality in admin side in custom extention magento 2.3

Do you have polygons defining the rural, suburban and urban areas? If so this should be fairly straightforward with a few steps

  • add three float fields to your existing coverage table to hold the overlap percentage for rural, suburban and urban areas
  • if you haven't got one already, add a unique ID column to your Coverage table and populate it (with RowID for example)
  • using sql, select your rural, suburban and urban areas into individual query results tables e.g. SELECT * FROM LandClassification WHERE Class = "Rural" INTO RuralArea
  • for each land class, use another SQL statement to calculate the overlap percentage e.g. SELECT Coverage.ID, Sum(ProportionOverlap(Coverage.obj, RuralArea.obj)) "PercentRural" FROM Coverage, RuralArea WHERE Coverage.obj INTERSECTS RuralArea.obj GROUP BY Coverage.ID INTO RuralCoverage
  • Once you have your three percentage coverage results tables you can use these to update the fields we created in the Coverage table in step 1 by joining them on the ID field

The overlap percentage will be in decimal format so if you want to show this as a percentage you will need to multiply the values by 100 when you update the Coverage table in the last step.