Serviceability Construct Enhancement | Polygons | geoJSON #400
tanya-ondc
started this conversation in
Core Specification
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Objective
The objective is to enhance the location based serviceability construct to define the fulfillment area serviceable by the provider.
The geographical boundaries within which the merchants are able to fulfill the orders defines the location based serviceability for the provider.
Current construct
The location object currently has a circle object specifying the gps coordinates and radius to define the boundary area based on the geometric radius.
However, the circle based location construct has issues with its application. Most of all, the sellers do not offer consistent services across uniformly spread geolocations. They generally have a non-uniform area of coverage for providing goods and services, specially in case of hyperlocal and milkrun commerce. Therefore, it is pertinent that the sellers on the network are able to provide the non-uniform area to define serviceability.
Location.polygon is also a string, which needs to be enahanced to be able to parse boundary coordinates of linear ring.
Proposed Solution:
A polygon defines a series of coordinates arranged in a closed area in an ordered sequence. Polygons enhances the serviceability for a merchant, where the merchant is not limited only to the radius around the gps coordinate, but can provide lat-long coordinates for defining the geo boundaries which results in an optimised area of service with a closed bound of a location.
Using Geospatial GeoJSON location construct:
GeoJSON is an open source geospatial data interchange format based on JavaScript Object Notation (JSON). It defines several types of JSON objects and the manner in which they are combined to represent data about geographic features, their properties, and their spatial extents.
We can define geoJSON to define coordinates for geometry types: Polygon and MultiPolygon.
Example geoJSON:
1. Polygon:
geoJSON Schema for Polygon - https://geojson.org/schema/Polygon.json
Visualize geoJSON here - https://geojson.io/#
Example -
2. Multi-polygon and Polygon with holes:
Schema for Multi-polygons - https://geojson.org/schema/MultiPolygon.json
Visualize geoJSON here - https://geojson.io/#
Example:
Example Polygon:
Enhancing current schema of polygon:
to an array of gps coordinates.
Kindly review and share your thoughts around this.
Beta Was this translation helpful? Give feedback.
All reactions