Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GEOS_ERROR when using empty Point in GeometryField #258

Open
daanvaningen opened this issue Jun 18, 2021 · 0 comments
Open

GEOS_ERROR when using empty Point in GeometryField #258

daanvaningen opened this issue Jun 18, 2021 · 0 comments

Comments

@daanvaningen
Copy link

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 ( )

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant