[OSM-dev] osm2psql .style file parameters/values
bareman at tpg.com.au
Tue Jul 10 23:33:45 BST 2012
On Tue, 10 Jul 2012 12:33:32 +0000 (UTC)
Sven Geggus <lists at fuchsschwanzdomain.de> wrote:
> mick <bareman at tpg.com.au> wrote:
> > osm2pgsql does a decent job as far as _I_ can use it, the style file looks
> > to me like it should be able to refine things more with different data
> > types, eg. boolean, short int, int, long int, float,...
> No! In osm2pgsql tags are always assumed to be text which is of course what
> they actually are. The "z_order int4" and and "way_area real" are calculated
> during import so the do not count.
> I did however add support for "real" columns in february in order to be able
> to import width and ele tags as floating point values.
> This currently involves a lot of hard coded heuristics!
> Here is what it do:
> * assume "," to be a decimal mark which need to be replaced by "."
> * take the leading number if there is more than one or additional text
> * average if it's a-b
> * assume values to be in meters thus ignore any unit but feet
> * convert feet to meters if "ft" is given as unit (1 foot = 0.3048 meters)
> * reject anything else
No problem, I'm not sure if it matters anyway and I can change it after I import the data into mapinfo for editing.
My main reason for wanting to use more specific data types was the possibility that I might need to do some processing / analysis at a later stage.
More information about the dev