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

Empty coordinates must be rejected in GeoJSON objects

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Fixed
    • 10.2(EOL)
    • 10.2.11
    • JSON
    • None
    • 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

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

            Dates

              Created:
              Updated:
              Resolved:

              Git Integration

                Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.