Mapping question

94 views
Skip to first unread message

andrej.ros...@unister.de

unread,
Apr 19, 2013, 4:42:38 AM4/19/13
to imp...@googlegroups.com
Hi,

a newbie question, probably, still it bothers me for a while. May be someone can give me an easy answer.
I am trying to import islands, if possible including the wikipedia tag, as example data set I downloaded Spain (http://download.geofabrik.de/europe/spain-latest.osm.bz2). For the import I use the following mapping (stripped of comments):

from imposm.mapping import (
    Options,
    Points, LineStrings, Polygons,
    String, Bool, Integer, OneOfInt,
    set_default_name_type, LocalizedName,
    WayZOrder, ZOrder, Direction,
    GeneralizedTable, UnionView,
    PseudoArea, meter_to_mapunit, sqr_meter_to_mapunit,
)

db_conf = Options(
    # db='osm',
    host='localhost',
    port=whatever,
    user='osm',
    password='osm',
    sslmode='allow',
    prefix='test_',
    proj='epsg:900913',
)

island = Polygons (
    name='island',
    fields = (
        ('admin_level', Integer()),
    ('wikipedia', String()),
    ('name', Name()),
    ('boundary', String())
    ),
    mapping = {
    'place' : (
        'island',
        'islet',
    ),
})

What I am wondering: the data contains a relation for Mallorca (id 374056, with tag place = island), but the polygon is not imported. Am I doing something wrong or is there a simple explanation for this?

Thanks!
Andrej

thomas bonfort

unread,
Apr 19, 2013, 4:59:04 AM4/19/13
to imp...@googlegroups.com
Andrej,
Check that all the ways referenced by the relation are also present in the extract. If not, the geometry is most certainly invalid and is not imported by imposm (you should get a warning message on your imposm output when that happens).

--
thomas




--
--
_______________________________________________
Imposm mailing list
imp...@googlegroups.com
http://groups.google.com/group/imposm
 
---
You received this message because you are subscribed to the Google Groups "imposm" group.
To unsubscribe from this group and stop receiving emails from it, send an email to imposm+un...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Reply all
Reply to author
Forward
0 new messages