imposm3 icon indicating copy to clipboard operation
imposm3 copied to clipboard

Clip data at 85S/85N when importing to EPSG:3857

Open olt opened this issue 11 years ago • 3 comments

OSM data at the poles for example will be inserted with invalid EPSG:3857 values, which will result in NaN values when transformed back to EPSG:4326 (see #2).

olt avatar Sep 17 '13 09:09 olt

Are there any news about this? Planet import not even possible with this and if we run "-optimize" it says e.g.

pq: relation "osm_landusages_geom_geohash" already exists

Maybe an option to force optimization with igonoring errors will solve this?

tds4u avatar Jan 23 '14 06:01 tds4u

On 23.01.2014, at 07:16, tds4u wrote:

Are there any news about this? Planet import not even possible with this and if we run "-optimize" it says e.g.

No, this is not implemented. But a planet import should work without clustering (-optimize).

pq: relation "osm_landusages_geom_geohash" already exists

Maybe an option to force optimization with igonoring errors will solve this?

You can't run -optimize a second time. Implementing a force option would be more work than implementing the clipping.

olt avatar Jan 23 '14 07:01 olt

We can make indizes and clustering on tables by our own. For deleting mistaken polygons we can use:

DELETE FROM osm_transport_points WHERE NOT ST_Intersects(geometry, ST_GeomFromText('POLYGON((-20037508.34 20037508.34, -20037508.34 20037508.34, 20037508.34 20037508.34, 20037508.34 -20037508.34))', '3857'))

and

DELETE FROM osm_places WHERE NOT ST_Intersects(geometry, ST_GeomFromText('POLYGON((-20037508.34 20037508.34, -20037508.34 20037508.34, 20037508.34 20037508.34, 20037508.34 -20037508.34))', '3857'))

tds4u avatar Jan 23 '14 15:01 tds4u