[Tile-serving] [osm2pgsql] Fix incorrect resizing of node cache in geometry processor (#322)

Paul Norman notifications at github.com
Thu Apr 2 07:33:54 UTC 2015


>          node_cache.resize(node_count);
> -    //get the node data
> +    // get the node data
>      mid->nodes_get_list(&node_cache.front(), node_ids, node_count);

testing with this XML reveals that the multi-backend doesn't work at all with incomplete extracts (i.e. extracts where not all nodes referenced by ways are present)

```
<osm version="0.6">
 <node id="1" lat="49.00" lon="-123.00"/>
 <node id="2" lat="49.00" lon="-123.01"/>
 <node id="3" lat="49.01" lon="-123.02"/>
 <node id="4" lat="49.02" lon="-123.00"/>
 <node id="5" lat="49.02" lon="-123.01"/>
 <node id="6" lat="49.03" lon="-123.00"/>
 <node id="8" lat="49.03" lon="-123.02"/>
 <way id="1">
  <nd ref="1"/>
  <nd ref="2"/>
  <nd ref="3"/>
 </way>
 <way id="2">
  <nd ref="4"/>
  <nd ref="5"/>
 </way>
 <way id="3">
  <nd ref="6"/>
  <nd ref="7"/>
 </way>
</osm>
```

It errors on a copy statement trying to copy `SRID=900913;LINESTRING (-13692297.3599999994039536 6279953.2999999998137355, nan nan, -13694523.7500...` as a geometry.

The same file works with `-O pgsql --slim --hstore`

So a good catch.

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


More information about the Tile-serving mailing list