I am trying to build an app where the ability to do geometric operations on map polygons is very important. what I am trying to achieve is as follows:
1. I have shapefiles created with ArcMap which I then converted to json files.
2. I wish to use the data from the json files (by parsing them) to create polygons on google map (using google_maps_flutter), the challenges and progress I have met and dealt with so far in this particular section is:
a. the coordinate system in the json files is UTM, I have managed to create a function that can convert the UTM coordinates to Decimal Degrees and Degree Minute Second coordinate systems.
b. I am not sure if polygon system in google_maps_flutter enables the creation of 'rings' (polygons with holes, like donuts... or rings). Since Many of the Shapefile polygons are in this form, this ability will be pretty important.
3. If I somehow overcome the challenges from point 2, I wish to use the polygons as some sort of area indicators which can be manipulated (substracted, joined together, etc).
4. if point 3 is possible, I hope to utilize it for following scenarios:
a. user gets notified when he/she enters a certain area indicated by the polygons (all I know from this is how to compare user current location with the map extents... I dont know how to utilize polygon as extents to compare user's locations with)
b. user can plot an area (using gps tracking to form a polygon) which then can overlap the polygons from json files and know exactly which area his/her plotted polygon overlaps
c. if b is possible, then user can use geometric operations to calculate the area size with which his or her plotted polygon overlapped.
For me this is a pretty big undertakings especially since I am just starting with flutter or app dev in general. But this project really gets me excited. I hope anyone can shed some lights on me.
my immediate need is an algorithm which can be used to detect user's presence in an area so I can use it like follows:
Latlang userLoc = getLocation();
Polygon somePolygon = createPolygon();
bool isInArea = areaChecker(userLoc, somePolygon);
Thank You!