hauke96 / simple-task-manager

A simple tasking manager made for OpenStreetMap.
https://stm.hauke-stieler.de
Other
34 stars 6 forks source link

Project creation: Client allows invalid task geometry #129

Closed hauke96 closed 3 years ago

hauke96 commented 3 years ago

The server-log shows such occurrence, that invalid task geometries have been sent to the server. In an ideal situation the client would convert geometries or show an error. This doesn't happen here.

There should be a better handling of such invalid geometries in the client.

This was one of the geometry (a MultiPolygon) added:

{
    "type": "Feature",
    "geometry": {
        "type": "MultiPolygon",
        "coordinates": [
            [
                [
                    [
                        -4.0643099,
                        43.26444829999997
                    ],
                    [
                        -4.0643363,
                        43.264436399999965
                    ],
                    [
                        -4.0642598,
                        43.26436530000001
                    ],
                    [
                        -4.0641847,
                        43.264289899999994
                    ],
                    [
                        -4.0641608,
                        43.2643027
                    ],
                    [
                        -4.0642354,
                        43.26437659999999
                    ],
                    [
                        -4.0643099,
                        43.26444829999997
                    ]
                ]
            ],
            [
                [
                    [
                        -4.0641357,
                        43.26428229999999
                    ],
                    [
                        -4.0641617,
                        43.264268000000015
                    ],
                    [
                        -4.0640752,
                        43.26418460000002
                    ],
                    [
                        -4.0640492,
                        43.2641989
                    ],
                    [
                        -4.0640924,
                        43.264240599999994
                    ],
                    [
                        -4.0641357,
                        43.26428229999999
                    ]
                ]
            ]
        ]
    },
    "properties": {
        "id": "11",
        "name": "11"
    }
}