Skip to content

GEOS_ERROR when using empty Point in GeometryField #258

@daanvaningen

Description

@daanvaningen

Hi,

When a user submits an empty point request: POINT ( ) this validation error is raised:
Invalid format: string or unicode input unrecognized as GeoJSON, WKT EWKT or HEXEWKB.'

Only internally we also see this error:
django.contrib.gis:100 ERROR GEOS_ERROR: ParseException: Expected number but encountered ')'

As this is the only information we are given it is a bit difficult to see what exactly caused the error but I believe it is coming from your package. If so, it would be great if you could catch this error :) otherwise please let me know what else caused it and feel free to close the issue.

Example code:

class RasterPointSerializer(serializers.Serializer):
    geom = GeometryField()
    ....

Example request: ?geom=POINT ( )

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