May-06-2020, 11:49 AM
(May-06-2020, 11:36 AM)WBPYTHON Wrote: When you convert to float, what does strip() does (which I don't do in my version?)it strips the leading/trailing whitespace if present after split at comma,
But you are right - it's not really necessary. it can be removed
feature['geometry']['coordinates'] = [float(coord) for coord in coordinates]or using
map
if you preferfeature['geometry']['coordinates'] = list(map(float, coordinates))
If you can't explain it to a six year old, you don't understand it yourself, Albert Einstein
How to Ask Questions The Smart Way: link and another link
Create MCV example
Debug small programs
How to Ask Questions The Smart Way: link and another link
Create MCV example
Debug small programs