geoplotlib
geoplotlib copied to clipboard
geoplotlib.geojson() method throws "ValueError: math domain error"
here is my python code.
import geoplotlib geoplotlib.geojson('bus.json') geoplotlib.show()
and here is the content of file "bus.json".
{ "type": "FeatureCollection", "features": [ { "type": "Feature", "geometry": { "type": "Point", "coordinates": [ 39.994238, 116.326786 ] }, "properties": { "prop0": "value0" } } ] }
How could this happen?Any thing wrong?
@Silocean Looking at the code, there is no way something with the "type": "Feature"
will be used.
The four types that get checked are:
if feature['geometry']['type'] == 'Polygon':
elif feature['geometry']['type'] == 'MultiPolygon':
elif feature['geometry']['type'] == 'Point':
elif feature['geometry']['type'] == 'LineString':
Edit: Well I just saw that this issue was created starting of 2017, sorry.
@Silocean Looking at the code, there is no way something with the
"type": "Feature"
will be used.The four types that get checked are:
if feature['geometry']['type'] == 'Polygon': elif feature['geometry']['type'] == 'MultiPolygon': elif feature['geometry']['type'] == 'Point': elif feature['geometry']['type'] == 'LineString':
Edit: Well I just saw that this issue was created starting of 2017, sorry.
issue solved already. Also thank you for your reply. :)
I'm receiving similar exception errors but for loading a dictionary into GeoPlotLib on ticket #46: https://github.com/andrea-cuttone/geoplotlib/issues/46
Though I'm not passing my input through the geojson() function.