[OSM-talk] Server slowness
Kristian Thy
thy at 42.dk
Sun Jan 14 23:15:03 GMT 2007
On Sun, Jan 14, Nick Hill wrote:
> I suppose an even better solution would be to devise a spacial indexing scheme
> for MySQL or postgress using b-tree based on the discussion. I don't think it
> would be ultra-complex and would be composed of interleaved integers.
PostGIS, at least (I don't know much about MySQL's spatial abilities) has
GiST indexing, which is a nested polygon bounding-box index. If you have
geodata, why do you not store it in a geodatabase and get all the bells
and whistles for free, instead of trying to come up with a home-grown
solution?
When using PostGIS, you don't save separate nodes and segments. You save
geometry (like Martin said), which comes in two flavours, WKT[1] and WKB[2].
In this context, a linear feature would be created as a record in a table
with polyline geometry. Ways, as we currently know them in OSM, could
then be created as just a one-to-many join between a road metadata table
and the polyline table.
Note that in this model, we could also do away with the notion of xml
being anything but a data transfer format. The important thing is the
data, not the arbitrary presentation thereof in xml.
1) http://en.wikipedia.org/wiki/Well-known_text
2) http://dev.mysql.com/doc/refman/5.0/en/gis-wkb-format.html
\\kristian
--
Cthulhu.call();
More information about the talk
mailing list