-
Notifications
You must be signed in to change notification settings - Fork 201
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
GDALException raised when providing bad input to GeometryFilter #187
Comments
+1 |
1 similar comment
+1 |
I have tried to debug all python code, including django connection with GDAL using ctype, but the problem is on input data. For example, I was entering this geojson string: But GEOSGeometry reads only the geometry content, so I replaced to And it works. |
I tried to pass a valid feature collection like {
"type":"FeatureCollection",
"features": [
{
"type":"Feature",
"properties":{},
"geometry":{"type":"Polygon","coordinates":[[[11.601563,52.160762],[7.03125,45.948361],[32.34375,44.461573],[24.609375,52.160762],[11.601563,52.160762]]]}
}
]
}
which raises: GDALException at /api/registry/layersInvalid geometry pointer returned from "OGR_G_CreateGeometryFromJson". Why is this a bad request? Can i only pass in geometry objects? |
My setup it is something along the lines of this:
When I query the filter providing invalid input
http://localhost:8000/api/locations/?within={"type":"Feature","I am not valid":"1,1,1"}
I get the following exception:
I've kind of fixed the issue by using the code below. This doesn't seem like a hugely eloquent solution though.
Is there something I'm missing? I've read through the docs and check the issues and I can't seem to find a better solution.
The text was updated successfully, but these errors were encountered: