[OSM-newbies] Data corruption?
Ævar Arnfjörð Bjarmason
avarab at gmail.com
Sun Nov 15 12:17:34 GMT 2009
On Sun, Nov 15, 2009 at 7:09 AM, Ingmar Heinrich
<ingmar.heinrich at gmail.com> wrote:
> Hi,
>
> On Sat, Nov 14, 2009 at 11:57 PM, Ævar Arnfjörð Bjarmason <avarab at gmail.com>
> wrote:
>>
>> On Sat, Nov 14, 2009 at 11:16 AM, Ingmar Heinrich
>> <ingmar.heinrich at gmail.com> wrote:
>> > nodeId;lat;lon
>> > 204781;-227258777;-643418311
>> > 204782;-227267522;-6434112 <<<
>> > 204783;-227234727;-643442608
>> > 204784;-227282826;-643394608
>> >
>> > The second node has a weird lon value. I suppose in this context
>> > -6434112
>> > should be padded with Zeros to the right so it becomes -643411200, but
>> > how
>> > do I tell my parser how many digits it should pad?
>>
>> That is perfectly valid data. Why is your parser breaking on
>> non-padded values in the first place?
>
> I worked it out. What you see above is NOT valid data since I didn't do a
> Float->Int conversion, but just removed the Dot... :-/
I meant that the XML was valid data and when parsing floating point
numbers in the OSM XML you shouldn't be making assumptions about the
number of trailing significant digits.
But good to hear that it worked out for you.
More information about the newbies
mailing list