Cartodb: Geocoding overrides all geometry values even when deselecting option to avoid overriding in Editor

Created on 20 Jan 2017  路  4Comments  路  Source: CartoDB/cartodb

Context

  • This come from an SB ticket 11143597.
  • When trying to geocode a dataset with already some geometries, even when deselecting the Override all values. Geocode all your rows, even those with geometry data. option, it geocodes the whole dataset.
  • I remember this could not happen before.

Steps to Reproduce

  1. Open a dataset with some rows with geometries and other with NULL values
  2. Click on "Edit".
  3. Click on "Georeference".
  4. Select "Street Addresses". Set parameters.
  5. Apply.

Current Result

  • It geocodes the whole dataset.

Expected result

  • It should geocode only the rows without geometry.

Browser and version

  • Google Chrome v54.
Editor Next bug

Most helpful comment

@rochoa not really, I just trusted Ramiro and Jamon and took for granted there's a bug.

@ramiroaznar the thing is that force_all_rows = false is taken into account when there's a cartodb_georef_status column and it's been like that for a long while.

Here's the code:
https://github.com/CartoDB/cartodb/blob/89ea62c9d57be71f6fc4640f91eabde8834cebbb/app/models/geocoding.rb#L194

And here the ticket describing the feature/enhancement: https://github.com/CartoDB/cartodb/issues/3958

As you can see, it is "easy to change" in code but there's a high chance of problems if changed because of conflicting or misunderstandings in requirements.

https://carto.com/docs/carto-editor/managing-your-data#cartodbgeorefstatus-column

Since the cartodb_georef_status is something documented and public I'd give the following instructions to the user to let him accomplish what he wants:

ALTER TABLE table_name ADD COLUMN cartodb_georef_status bool;
UPDATE table_name SET cartodb_georef_status = (the_geom IS NOT NULL);

Closing this for the moment. Feel free to reopen and comment if this doesn't fit the bill.

All 4 comments

did you check how the geocoding request is sent from the browser (developer tools) by any chance?

Yes, we have checked with @xavijam and it seems that nothing has been changed.

@rafatower Did you have time to triage this one?

@rochoa not really, I just trusted Ramiro and Jamon and took for granted there's a bug.

@ramiroaznar the thing is that force_all_rows = false is taken into account when there's a cartodb_georef_status column and it's been like that for a long while.

Here's the code:
https://github.com/CartoDB/cartodb/blob/89ea62c9d57be71f6fc4640f91eabde8834cebbb/app/models/geocoding.rb#L194

And here the ticket describing the feature/enhancement: https://github.com/CartoDB/cartodb/issues/3958

As you can see, it is "easy to change" in code but there's a high chance of problems if changed because of conflicting or misunderstandings in requirements.

https://carto.com/docs/carto-editor/managing-your-data#cartodbgeorefstatus-column

Since the cartodb_georef_status is something documented and public I'd give the following instructions to the user to let him accomplish what he wants:

ALTER TABLE table_name ADD COLUMN cartodb_georef_status bool;
UPDATE table_name SET cartodb_georef_status = (the_geom IS NOT NULL);

Closing this for the moment. Feel free to reopen and comment if this doesn't fit the bill.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

rochoa picture rochoa  路  3Comments

arianaescobar picture arianaescobar  路  4Comments

makella picture makella  路  3Comments

xavijam picture xavijam  路  5Comments

piensaenpixel picture piensaenpixel  路  4Comments