Opened 18 years ago

Closed 18 years ago

Last modified 18 years ago

#1614 closed defect (fixed)

msOGRShapeFromWKT incorrectly tests msOGRGeometryToShape return value

Reported by: szekerest Owned by: warmerdam
Priority: high Milestone:
Component: GDAL Support Version: 4.6
Severity: normal Keywords:
Cc:

Description

These is a confusion in msOGRShapeFromWKT by testing the retval of the
msOGRGeometryToShape call. msOGRGeometryToShape returns MS_SUCCESS when the
function sucessfully completed, but msOGRShapeFromWKT tests against MS_FALSE.
Both of the constants were defined to zero so the success will be treated as an
error


Tamas Szekeres

Change History (8)

comment:1 by fwarmerdam, 18 years ago

Resolution: fixed
Status: newclosed
I have fixed this.  In fact, the msOGRGeometryToShape was also returning
MS_FALSE under some circumstances erroneously which I have corrected to 
MS_FAILURE.

I have also added a test for WKT encoding in the mapfile in 
msautotest/misc/ogr_wkt.map. 


comment:2 by fwarmerdam, 18 years ago

I would add the fix is going into the 4.8 branch (in time for the 4.8 release)
and 4.9 (head).

comment:3 by szekerest, 18 years ago

I would like to test this fix, but the reverse conversion (msOGRShapeToWKT)
seems not having been implemented yet. Would it be possible to make it work?

Tamas

comment:4 by szekerest, 18 years ago

This bug also affects

http://mapserver.gis.umn.edu/bugs/show_bug.cgi?id=1466


comment:5 by fwarmerdam, 18 years ago

I have completed the reverse (shape2wkt) conversin and tested it now.
Change in 4.8 and 4.9.

comment:6 by szekerest, 18 years ago

This implementation does not allow multilinestring to be converted.
msOGRShapeToWKT returns "OGR Support is not available."

Tamas

comment:7 by szekerest, 18 years ago

And for multipoints as well.

Tamas

comment:8 by szekerest, 18 years ago

I've posted a bug containing more problems.

http://mapserver.gis.umn.edu/bugs/show_bug.cgi?id=1618

Tamas
Note: See TracTickets for help on using tickets.