readOGR() in rgdal and 64-bit integers

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

readOGR() in rgdal and 64-bit integers

Roger Bivand
Administrator
Since the release of GDAL 2, feature IDs are 64-bit integers and fields of
vector data may be 64-bit integers. Most often, the declarations of these
fields are misunderstandings, as such data is almost always a long key ID
(should be string), or may be an area in square metres (should be float).

readOGR() received an argument integer64= with the default value of
"allow.loss", which silently clamps 64-bit integers to 32-bit signed
integers. Of course, users who first read the output of ogrInfo() on their
input files would have been warned that action may be required on their
part to avoid data loss.

The alternative values, as in base::type.convert(), are "warn.loss" -
which issues a warning if clamping takes place, and "no.loss" which
returns character strings (often represented as a factor) instead of
clamping.

The current default assumes that users actually use ogrInfo() to examine
their data before reading it. Is this overly optimistic? Would it be
better to change the default to "no.loss" or "warn.loss"? A doodle is
here: http://doodle.com/poll/9qaqrkbs6q7k5skz - I'd be grateful for
feedback.

Roger

--
Roger Bivand
Department of Economics, Norwegian School of Economics,
Helleveien 30, N-5045 Bergen, Norway.
voice: +47 55 95 93 55; fax +47 55 95 91 00
e-mail: [hidden email]
http://orcid.org/0000-0003-2392-6140
https://scholar.google.no/citations?user=AWeghB0AAAAJ&hl=en
http://depsy.org/person/434412

_______________________________________________
R-sig-Geo mailing list
[hidden email]
https://stat.ethz.ch/mailman/listinfo/r-sig-geo
Roger Bivand
Department of Economics
Norwegian School of Economics
Helleveien 30
N-5045 Bergen, Norway
Reply | Threaded
Open this post in threaded view
|

Re: readOGR() in rgdal and 64-bit integers

Rich Shepard
On Thu, 27 Oct 2016, Roger Bivand wrote:

> The current default assumes that users actually use ogrInfo() to examine
> their data before reading it. Is this overly optimistic? Would it be
> better to change the default to "no.loss" or "warn.loss"? A doodle is
> here: http://doodle.com/poll/9qaqrkbs6q7k5skz - I'd be grateful for
> feedback.

Roger,

   Given human nature I think that default assumption is incorrect. While
'warn.loss' seems to be a resonable replacement it assumes that users all
know what to do about the loss of data. I voted for 'no.loss' as
accommodating everyone without assumptions about reading or adjusting.

Regards,

Rich

_______________________________________________
R-sig-Geo mailing list
[hidden email]
https://stat.ethz.ch/mailman/listinfo/r-sig-geo
Reply | Threaded
Open this post in threaded view
|

Re: readOGR() in rgdal and 64-bit integers

chris english-2
Roger,

I concur with Rich, both that most (new) users won't quite follow the
implication of the transforms, clamping, work flow, nor yet have a sense of
what the numbers "should look like". Perhaps no.loss coupled with warning
pointing to readOGR() help to expand on implications.

Chris

On Oct 27, 2016 2:02 PM, "Rich Shepard" <[hidden email]> wrote:

> On Thu, 27 Oct 2016, Roger Bivand wrote:
>
> The current default assumes that users actually use ogrInfo() to examine
>> their data before reading it. Is this overly optimistic? Would it be
>> better to change the default to "no.loss" or "warn.loss"? A doodle is
>> here: http://doodle.com/poll/9qaqrkbs6q7k5skz - I'd be grateful for
>> feedback.
>>
>
> Roger,
>
>   Given human nature I think that default assumption is incorrect. While
> 'warn.loss' seems to be a resonable replacement it assumes that users all
> know what to do about the loss of data. I voted for 'no.loss' as
> accommodating everyone without assumptions about reading or adjusting.
>
> Regards,
>
> Rich
>
> _______________________________________________
> R-sig-Geo mailing list
> [hidden email]
> https://stat.ethz.ch/mailman/listinfo/r-sig-geo
>

        [[alternative HTML version deleted]]

_______________________________________________
R-sig-Geo mailing list
[hidden email]
https://stat.ethz.ch/mailman/listinfo/r-sig-geo