Skip to content

Ignoring invalid geometry #42

@marklit

Description

@marklit

Is there a way to instruct ST_GeomFromText and its sibling functions to return NULL rather than an exception for invalid geometry? The Microsoft Road AI dataset has 204K single-point LINESTRING records inside of the 50M+ plus valid records. It would be easier to exclude NULLs using SQL afterword instead of coming up with a grep command that filters on less than four commas appearing in a GeoJSON line.

SELECT ST_GeomFromText('LINESTRING (30 10)');
Error: Invalid Input Error: Could not read WKT

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions