[Tile-serving] [osm2pgsql] Use the polygon flag from the tagtransforms to change multi-backend (#471)

Paul Norman notifications at github.com
Wed Oct 28 04:35:15 UTC 2015


> -                copy_to_table(id, wkt->geom.c_str(), outtags);
> +                if (polygon) {
> +                    // The way is required to be a polygon
> +                    if (boost::starts_with(wkt->geom, "POLYGON") || boost::starts_with(wkt->geom, "MULTIPOLYGON")) {
> +                        m_expire->from_nodes_poly(m_way_helper.node_cache, id);
> +                        copy_to_table(id, wkt->geom.c_str(), outtags);
> +                    }
> +                } else {
> +                    // The way is not required to be a polygon
> +                    copy_to_table(id, wkt->geom.c_str(), outtags);
> +                    if (boost::starts_with(wkt->geom, "POLYGON") || boost::starts_with(wkt->geom, "MULTIPOLYGON")) {
> +                        m_expire->from_nodes_poly(m_way_helper.node_cache, id);
> +                    } else {
> +                        m_expire->from_nodes_line(m_way_helper.node_cache);
> +                    }
> +                }

I think some of the stuff can be moved to copy_to_table

---
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/osm2pgsql/pull/471/files#r43217697
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/tile-serving/attachments/20151027/6ed14abe/attachment.html>


More information about the Tile-serving mailing list