Opened 16 years ago

Closed 16 years ago

#2588 closed defect (fixed)

ogr2ogr: Failed to transform feature 144 (LL -> LAEA)

Reported by: Markus Neteler Owned by: warmerdam
Priority: normal Milestone:
Component: OGR_SF Version: svn-trunk
Severity: normal Keywords:
Cc:

Description (last modified by Markus Neteler)

I have taken the political world border from http://thematicmapping.org/downloads/world_borders.php (SHAPE FILE) and tried to reproject to EU-LAEA. The LAEA prj file for -t_srs is attached, it is from the European CORINE data set.

Problem:

ogr2ogr -t_srs index.prj world_borders_LAEA.shp TM_WORLD_BORDERS-0.3.shp
Warning 1: organizePolygons() received a polygon with more than 100 parts. The processing may be really slow.
You can skip the processing by setting OGR_ORGANIZE_POLYGONS=SKIP, or only make it analyze counter-clock wise parts by setting OGR_ORGANIZE_POLYGONS=ONLY_CCW if you can assume that the outline of holes is counter-clock wise defined
Failed to transform feature 144.
ERROR 1: Terminating translation prematurely after failed
translation of layer TM_WORLD_BORDERS-0.3

# trunk from 22 Sept 2008
ogrinfo --version
GDAL 1.6.0dev, released 2008/00/00

Could an internal precision problem trigger this?

Markus

Attachments (1)

index.prj (388 bytes ) - added by Markus Neteler 16 years ago.
CORINE LAEA proj file

Download all attachments as: .zip

Change History (6)

by Markus Neteler, 16 years ago

Attachment: index.prj added

CORINE LAEA proj file

comment:1 by Markus Neteler, 16 years ago

Description: modified (diff)

comment:2 by Even Rouault, 16 years ago

It is not an internal precison problem but an impossibility to reproject a point of longitude=180, latitude=-90 to LAEA. This point (feature 144, subpart 138, point 11397) is in Antartica, so that's not so surprising to find it... I'm not a specialist of projections but the poles are often problems when trying to reproject.

You can use the -skipfeature option to skip that failure and end the translation of other features.

So, not a bug but a feature of the LAEA projection ?

comment:3 by Markus Neteler, 16 years ago

I suspected this reason (after looking at the result). Would it be possible to spit out a more reasonable error message which indicates that we are "out of region" or so? Say, "Terminating translation prematurely after failed" is not saying much to an average user.

-skipfeature works.

comment:4 by Even Rouault, 16 years ago

r15443 : "Output error messages on stderr to be consistant; Make error message about failed reprojection more clearer (hopefully); Advertize the use of -skipfailures in error message (#2588)"

Warning 1: organizePolygons() received a polygon with more than 100 parts. The processing may be really slow.
You can skip the processing by setting OGR_ORGANIZE_POLYGONS=SKIP, or only make it analyze counter-clock wise parts by setting OGR_ORGANIZE_POLYGONS=ONLY_CCW if you can assume that the outline of holes is counter-clock wise defined
Failed to reproject feature 144 (geometry probably out of source or destination SRS).
ERROR 1: Terminating translation prematurely after failed
translation of layer TM_WORLD_BORDERS-0.3 (use -skipfailures to skip errors)

comment:5 by Markus Neteler, 16 years ago

Resolution: fixed
Status: newclosed

Excellent, thanks - closing.

Markus

Note: See TracTickets for help on using tickets.