Skip to content

Conversation

@antoniocarlon
Copy link
Contributor

The error was:

ValueError: No valid geometry column types ({None, 'Point'}), it has to be one of the next type sets: [{'Point'}, {'MultiPoint'}, {'LineString'}, {'MultiLineString'}, {'LineString', 'MultiLineString'}, {'Polygon'}, {'MultiPolygon'}, {'MultiPolygon', 'Polygon'}].

when doing

from cartoframes.viz import Map, Layer
Map([Layer(geo_gdf)])

The workaround is pretty easy:

from cartoframes.viz import Map, Layer
Map([Layer(geo_gdf[geo_gdf.the_geom != None])])

but we can do it more straightforward by just removing the None from the set (None can be returned by the geocoder if no results are found for a given address for example).

Copy link
Member

@Jesus89 Jesus89 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If the problem is with our check, it's OK to remove it in that part. I would add a unit test to cover also None values.

@antoniocarlon antoniocarlon merged commit 9c41177 into develop Sep 23, 2020
@antoniocarlon antoniocarlon deleted the feature/ch106409/ibicarto-1-no-valid-geometry-error-in-cf branch September 23, 2020 06:49
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

Successfully merging this pull request may close these issues.

3 participants