CartoDB / bigmetadata

BSD 3-Clause "New" or "Revised" License
43 stars 11 forks source link

Avoid removing the holes for TIGER geometries #579

Closed antoniocarlon closed 5 years ago

antoniocarlon commented 6 years ago

When we populate the observatory tables for TIGER we are removing the holes (we force the exterior ring of the geometry). See https://github.com/CartoDB/bigmetadata/blob/master/tasks/us/census/tiger.py#L805-L807

juanignaciosl commented 6 years ago

This blocks CartoDB/bigmetadata/pull/572, right? cc @javitonino

antoniocarlon commented 6 years ago

Not the development, buy the deploy, for sure :(

juanignaciosl commented 6 years ago

Yep, I'm not blocked (yet).

javitonino commented 6 years ago

Uhm, this is on-purpose, right? https://carto.com/blog/tiger-shoreline-clip/

In particular, you are probably running into https://github.com/CartoDB/bigmetadata/issues/34, right? There is a proposed solution there.

Just removing the exterior ring will probably break the geoms a lot, see the blog post to see how the geoms look before that step.

juanignaciosl commented 6 years ago

Ok. If you have more info about that "self-substraction", I'd be happy to know about it :)

javitonino commented 6 years ago

No such luck I'm afraid :(

antoniocarlon commented 6 years ago

We will need to find a way to maintain the holes without breaking the geometries to remove those spurious geometries.

We can perform the self substraction finding geometries that are ST_Within and doing a ST_Difference (I'm not sure how ST_Difference is implemented, but at first sight, it may be better to just add new interior rings to the geometry -ST_BuildArea may help-)

juanignaciosl commented 6 years ago

Roger that, thanks!

juanignaciosl commented 6 years ago

These are likely to be a corner case, so we will address this after the first release of Tilesets API.

alrocar commented 5 years ago

I'm closing this issue (tomorrow's one year old).