Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-11881

Empty coordinates must be rejected in GeoJSON objects

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 10.2
    • Fix Version/s: 10.2.11
    • Component/s: JSON
    • Labels:
      None
    • Sprint:
      10.2.11

      Description

      MariaDB [(none)]> SELECT st_astext(st_geomfromgeojson('
          '> {
          '>     "type": "MultiLineString",
          '>     "coordinates": [
          '>     ]
          '> }')) as a;
      +------------------+
      | a                |
      +------------------+
      | MULTILINESTRING) |
      +------------------+
      1 row in set (0.00 sec)
       
      MariaDB [(none)]>
      MariaDB [(none)]> SELECT st_astext(st_geomfromgeojson('
          '> {
          '>     "type": "Polygon",
          '>     "coordinates": [
          '>     ]
          '> }')) as a;
      +----------+
      | a        |
      +----------+
      | POLYGON) |
      +----------+
      1 row in set (0.00 sec)
       
      MariaDB [(none)]>
      MariaDB [(none)]> SELECT st_astext(st_geomfromgeojson('
          '> {
          '>     "type": "MultiPolygon",
          '>     "coordinates": [
          '>     ]
          '> }')) as a;
      +---------------+
      | a             |
      +---------------+
      | MULTIPOLYGON) |
      +---------------+
      1 row in set (0.00 sec)
      

      These objects are valid in json, but invalid in geojson , so must be handled accordingly.

        Attachments

          Activity

            People

            Assignee:
            holyfoot Alexey Botchkov
            Reporter:
            anikitin Andrii Nikitin (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: