AcroSuite GeoValidator may check LineString and Polygon’s validity from a points’ coordinates(longitude/latitude) array.
##1> Validate LineString
Validate a set of LineString’s coordinates(longitude/latitude) of Well-known text (WKT).
https://acrosuite-geovalidator.p.rapidapi.com/v0_1/CstService/tools/geometry/isline
http method: post
Content-Type: application/json
x-rapidapi-host: acrosuite-geovalidator.p.rapidapi.com
x-rapidapi-key: [your rapidapi-key]
{
"geom":"LINESTRING(139.632447 35.633454,139.630939 35.714560,139.712362 35.768352,139.798481 35.725624)"
}
“geom”: LineString’s coordinates(longitude/latitude) array. LineString’s coordinates’ format is Well-known text (WKT) defined by the Open Geospatial Consortium (OGC).
https://en.wikipedia.org/wiki/Well-known_text_representation_of_geometry
{
"contents": {
"code": "0000",
"message": "Congratulations on your success!",
"subject": "getIsLineStringWKT"
},
"errors": null,
"memo": "",
"result": true
}
“result”: if there are intersections, FALSE will be returned.
##2> Validate Polygon
Validate a set of Polygon’s coordinates(longitude/latitude) of Well-known text (WKT).
https://acrosuite-geovalidator.p.rapidapi.com/v0_1/CstService/tools/geometry/ispolygon
http method: post
Content-Type: application/json
x-rapidapi-host: acrosuite-geovalidator.p.rapidapi.com
x-rapidapi-key: [your rapidapi-key]
{
"geom": "POLYGON((139.421134 35.904979,140.238484 35.767676,140.156450 35.441841,139.433170 35.392131,139.421134 35.904979))"
}
“geom”: Polygon’s coordinates(longitude/latitude) array. Polygon’s coordinates’ format is Well-known text (WKT) defined by the Open Geospatial Consortium (OGC).
https://en.wikipedia.org/wiki/Well-known_text_representation_of_geometry
{
"contents": {
"code": "0000",
"message": "Congratulations on your success!",
"subject": "getIsPolygon"
},
"errors": null,
"memo": "",
"result": true
}
“result”: If there are intersections or Counterclockwise(interior linear rings) and Clockwise(exterior linear ring), FALSE will be returned.