omniscale / imposm3

Imposm imports OpenStreetMap data into PostGIS
http://imposm.org/docs/imposm3/latest/
Apache License 2.0
719 stars 157 forks source link

Polygon generalized tables empty for SRID 4326 #114

Closed rouen-sk closed 8 years ago

rouen-sk commented 8 years ago

I imported OSM extract with Imposm (default mapping.json) with SRID 3857 and 4326 (to different databases of course). With 3857, generalized tables containing polygons (water areas, landuse..) are fine, but when you set 4326, they are just empty.

olt commented 8 years ago

The tolerances for simplification are in the unit of the projection. So you need to convert meters to degree.

rouen-sk commented 8 years ago

Interesting, didnt think of that. I wonder why it works for linestring generalized tables (roads) with default tolerances? Shoud I change tolerance numbers for landuse and waterareas, but not for roads and waterways? Thats seems odd..

olt commented 8 years ago

Probably because polygons collapse to invalid geometries, while lines are still contains at least to points.

rouen-sk commented 8 years ago

OK, so I should change both. One more question - if I am supposed to provide tolerances in degrees, doesnt that mean that the real-world tolerance (in meters for example) will be quite different on equator and closed to the poles? Oh, and do I need to adjust also areas in sql_filter to some other units? Thanks!

olt commented 8 years ago

Yes and yes (square degrees). Not optimal, but that's how it is right now.