On Sun, Sep 20, 2009 at 5:45 AM, John Smith <deltafoxtrot...@gmail.com> wrote:
> 2009/9/20 Martijn van Oosterhout <klep...@gmail.com>:
>
>> I suppose it would be possible to get osm2pgsql to assign columns
>> based on country locations, if the relevant polygons were available in
>> another table. Handling diffs is not the problem, osm2pgsql knows
>> exactly which things have changed and can do the relevent query to
>> supplement the data.
>
> Any thoughts on osm2pgsql patches to do this?
>
> Would be be able to use a shape file for this instead of trying to use
> information that may or may not already exist in the DB?

On the whole I'm not a great fan of shapefile during processing, it
means you have to converts shapes back and forth between various
formats the whole time.

What I was thinking is:

1. Provide a process to read a defined shapefile into the database or
something like that (mind you shp2pgsql already exists ofcourse).
Perhaps the data could be copied from the polygons table depending on
the tag? The thing is you need more attributes, and shapefiles provide
a nice way bundle the extra data (shield types, colours, whatever).

2. Once the data is there, osm2pgsql can use joins to match the shapes
and given the shapes, copy the values with those shapes into extra
columns on the main table. Alternatively, give each shape a number,
store the number with the shapes and let mapnik do the join (saves
tons of disk space, thus time and memory).

As for patches, I don't have time right now, but maybe in the future
(a month or three).

Do you want the country to be determined for all objects, or just
some, like roads?

Have a nice day,
-- 
Martijn van Oosterhout <klep...@gmail.com> http://svana.org/kleptog/

_______________________________________________
talk mailing list
talk@openstreetmap.org
http://lists.openstreetmap.org/listinfo/talk

Reply via email to