Ticket #1614 (closed defect: fixed)

Opened 7 years ago

Last modified 7 years ago

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

Changed 7 years ago by fwarmerdam

  • status changed from new to closed
  • resolution set to fixed
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. 


Changed 7 years ago by fwarmerdam

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

Changed 7 years ago by szekerest

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

Changed 7 years ago by szekerest

This bug also affects

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


Changed 7 years ago by fwarmerdam

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

Changed 7 years ago by szekerest

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

Tamas

Changed 7 years ago by szekerest

And for multipoints as well.

Tamas

Changed 7 years ago by szekerest

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.