Hi Nick!
On Feb 20, 2010, at 12:51 AM, Nick Whitelegg wrote:
Hi,
I originally developed the Mapnik OSM plugin about two years ago,
though owing to other commitments I haven't taken things a lot
further.
I've enjoyed using the plugin. It is a great way to get going quickly
visualizing osm data before importing into postgis (in my cases).
Particularly in regards to tags, its an excellent thing to be able to
use Mapnik to introspect tags and figure out what is available.
As an example, I frequently run a simple script that looks like this
(to pull out unique tags of interest):
import mapnik
osm_file = 'hospitals.osm'
osm = mapnik.Osm(file=osm_file)
attr = []
feats = osm.all_features()
for f in feats:
tags = f.attributes
if tags not in attr and 'tiger:' not in ''.join(tags.keys()):
attr.append(f.attributes)
for idx,tags in enumerate(attr):
print idx
for key,val in tags.items():
if val:
print "\t%s = %s" % (key,val)
Recently, I've also been experimenting with adding support for direct
reading of .osm files in Quantumink using it in tandem with the QGIS
OpenStreetMap plugin. The latter is a built-in plugin to QGIS that
parses out a .osm into an sqlite file, but can also handle the .osm
file.
However I have a couple of ideas for software using it and was
wondering if there was more general interest.
Firstly, I'm having quite significant memory issues attempting to
run and maintain a PostGIS database containing OSM data for the UK
on my Freemap server.
What kind of issues? It would be great to learn more about this. It
seems like reading/parsing .osm files would take more memory that
postgis, so I must be missing something.
An alternative I thought of some time ago, but never really got
round to implementing beyond a demo program in the OSM plugin
distribution, is a piece of software which will take an OSM file, or
files, and render Mapnik tiles at various zoom levels from them.
Rather like the ti...@home project, this would move the burden of
data storage and rendering from server to client.
This sounds interesting for sure, although honestly I'm not very
familiar with t...@h, so it would be great if you would describe this a
bit more.
It could also lower the barrier to creating your own Mapnik-based
OSM site as you wouldn't have to install a PostGIS database, which
IMX can be quite tricky to set up.
Have you looked into SQLite3?
As an extension to this, a GUI interface could be implemented.
Do people think these are good ideas?
Everything you've come up with so far has been progressive and useful,
so I'm sure its a good idea. Can't wait for more info.
Dane
Thanks,
Nick
_______________________________________________
Mapnik-users mailing list
[email protected]
https://lists.berlios.de/mailman/listinfo/mapnik-users
_______________________________________________
Mapnik-users mailing list
[email protected]
https://lists.berlios.de/mailman/listinfo/mapnik-users