I know how to check a [point in a polygon. But my main problem is a GEOJSON consist of multi data types such a Polygon, Multi Polygon and Multi Line String. How can I achieve the solution? Should I use library or is there specific algorithm for this kind of problems? My priority is to achieve the solution with native JavaScript. here is simplified GEOJSON.
{
"type": "Feature",
"geometry": {
"type": "MultiPolygon",
"coordinates": [
[
[
[
49.111221438,
30.10109108299997
],
[
49.113533168000096,
30.103797081000025
],
[
49.11106481600011,
30.106136648000103
],
[
49.11442937499999,
30.107470637000134
],
[
49.1161612860001,
30.106002348000118
],
[
49.116107924000104,
30.10155146799997
]
]
],
[
[
[
48.7795410730001,
30.143445568000075
],
[
48.7763593770001,
30.145010960999997
],
[
48.7753754230001,
30.14971452600001
],
[
48.7795410730001,
30.143445568000075
]
]
],
]
] }
{
"type": "Feature",
"properties": {
"FNODE_": 33,
"TNODE_": 61,
"LPOLY_": 1,
"RPOLY_": 1,
"LENGTH": 70009.96,
"CON_ALL_": 31,
"CON_ALL_ID": 6567,
"DXF_ELEVAT": 900
},
"geometry": {
"type": "MultiLineString",
"coordinates": [
[
[
52.50931406450401,
34.41497301767497
],
[
52.50794987983731,
34.41395625923523
],
[
52.50696974128559,
34.41136455807418
],
[
52.503155059152384,
34.411328093408954
],
[
52.50072840199781,
34.41130153688085
],
[
52.49934365428397,
34.41128470636023
]
],
[
[
52.51899510810492,
34.41309054333186
],
[
52.5180432345018,
34.41234125510482
],
[
52.51612423451168,
34.413660624347564
]
]
]
}
}