Opened 18 years ago

Last modified 18 years ago

#1150 closed defect (fixed)

importFromWKT fails for values beginning with a decimal point

Reported by: pgerritson@… Owned by: warmerdam
Priority: high Milestone:
Component: OGR_SF Version: unspecified
Severity: normal Keywords:
Cc:

Description

When I give importFromWKT the input 'POINT(.5 .5)' it fails, whereas if I gave it 
'POINT(0.5 0.5)' it succeeds.  I tracked it down to the function OGRWktReadPoints
(ogrutils.cpp).  A check is performed to see that the first character of each
numeric token is either a number or a minus sign. 

.5 is clearly a valid number, and this function should support input in this format.

Change History (1)

comment:1 by warmerdam, 18 years ago

I have committed a fix in gdal/ogr/ogrutils.cpp to handle this, and 
modified autotest/ogr/ogr_wkbwkt_geom.py to test this in at least one case.

Thanks!

Note: See TracTickets for help on using tickets.