Re: [R-sig-Geo] rgdal retirement

2021-09-21 Thread GilbertoCamara
Dear Roger 

I would like to offer you a strong praise and recognition from our team at 
INPE, Brasil, for your strong contributions to the R-spatial community. Rgdal 
is perhaps the most tangible direct outcome from your efforts, but your 
influence goes much beyond the support for developing R packages.

You have made a decisive contribution to the whole R-spatial community, by your 
strong community for building bridges between us. I remember vividly your visit 
to Brazil in 2002, where you showed us the benefits of joining the R community. 
It took some time, but now we are firmly on board. 

Your example and your leadership are encouraging proofs that there’s hope to 
build a better and more cooperative planet.

All the best
Gilberto
===
Prof Dr Gilberto Camara
Senior Researcher
National Institute for Space Research (INPE), Brazil
https://gilbertocamara.org/
==


>>> On Sun, Sep 19, 2021 at 9:35 AM Jean-Luc Dupouey <
>> jean-luc.dupo...@inrae.fr>
>>> wrote:
>>> 
 Dear Roger Bivand,
 
 I read your message about the rgdal retirement. It was a nice package
 and an important step in the development of R-spatial.
 
 I looked for alternatives for the functions I was using, but I didn't
 find them all. Those I am missing:
 
 . ogrInfo
 . ogrFIDs
 . make_EPSG
 
 Do you know of any (more or less) equivalent functions in the packages
 you mentioned that have taken over from rgdal?
 
 Thanks in advance,
 
 Jean-Luc Dupouey
 
 --
 INRAE
 UMR Silva
 F-54280 Champenoux
 France
 
 ___
 R-sig-Geo mailing list
 R-sig-Geo@r-project.org
 https://stat.ethz.ch/mailman/listinfo/r-sig-geo
 
>>> 
>>> 
>>> 
>> 
>> --
>> Roger Bivand
>> Emeritus Professor
>> Department of Economics, Norwegian School of Economics,
>> Postboks 3490 Ytre Sandviken, 5045 Bergen, Norway.
>> e-mail: roger.biv...@nhh.no
>> https://orcid.org/-0003-2392-6140
>> https://scholar.google.no/citations?user=AWeghB0J=en
>> 
> 
> 
> -- 
> Michael Sumner
> Software and Database Engineer
> Australian Antarctic Division
> Hobart, Australia
> e-mail: mdsum...@gmail.com
> 
>   [[alternative HTML version deleted]]
> 
> ___
> R-sig-Geo mailing list
> R-sig-Geo@r-project.org
> https://stat.ethz.ch/mailman/listinfo/r-sig-geo

___
R-sig-Geo mailing list
R-sig-Geo@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-geo


Re: [R-sig-Geo] rgdal retirement

2021-09-21 Thread Michael Sumner
On Tue, Sep 21, 2021 at 8:04 PM Roger Bivand  wrote:

> On Sun, 19 Sep 2021, Michael Sumner wrote:
>
> > Hi Jean-Luc, if the packages mentioned don't yet cover it, you can get
> > ogrInfo and ogrFIDs with a combination of vapour's vapour_read_names()
> > (for FID), vapour_geom_summary()  (for FID and type) and
> > vapour_layer_info().
>
> In sf you can use the fid_column_name= argument to st_read() to retreive
> the FIDs with the geometries, but I think not the FIDs alone. orgInfo grew
> over time and became unwieldy, are there specific components that you use?
> Might sf::st_read() be modified to report these (and return FIDs) without
> reading the data and geometries? Using vapour is of course a good way to
> proceed, and very useful for cross-checking (Do rgdal and vapour return
> the same values, I hope so, vapour is much cleaner).
>
>
They do where I've checked!  I've put some notes here running the code
below: https://gist.github.com/mdsumner/6e756ded5f73c19bfb5935b12e4cec16


file <- "list_locality_postcode_meander_valley.tab"

## MapInfo file is 1-based FID
mvfile <- system.file(file.path("extdata/tab", file), package="vapour")
range(vapour::vapour_read_names(mvfile))
range(rgdal::ogrFIDs(mvfile, "list_locality_postcode_meander_valley"))

## shapefile is 0-based FID
pfile <- system.file("extdata/point.shp", package="vapour")
range(vapour::vapour_read_names(pfile))
range(rgdal::ogrFIDs(pfile, "point"))

## geopackage is 1-based
gfile <- system.file("gpkg/nc.gpkg", package = "sf")
range(vapour::vapour_read_names(gfile))
range(rgdal::ogrFIDs(gfile, "nc.gpkg"))  ## quirky layer name, it's not
always predictable

## real DB used not to have FIDS accessible by SQL (so I thought ... but
now it seems to work
vapour::vapour_read_attributes(mvfile, sql = "SELECT FID FROM
list_locality_postcode_meander_valley")
sf::read_sf(mvfile, query = "SELECT FID FROM
list_locality_postcode_meander_valley")

## some formats are arbitrary FIDS (not sequential by-1 or starting from
0/1)
osmfile <- system.file("extdata/osm/osm-ways.osm", package = "vapour")
vapour::vapour_read_names(osmfile)
rgdal::ogrFIDs(osmfile, "points")

My major concern with the vapour version is it won't handle 64-bit FIDs, I
tried and failed to get that to work but I've also never needed it, I don't
use databases much. I'm not sure if there's a broader variety of FIDS/names
to be concerned with.



> >
> > For make_EPSG() it's probably time to hit the proj.db more directly and
> I'd
> > be happy to have a look at that.
>
> Right, RSQLite can handle this quite well, but sometimes the names of
> tables and fields in tables change.
>
>

Indeed, note that you can read it with gdal itself i.e.

## on my linux (I don't know how to generalize this proj.db find step)
f <- "/usr/share/proj/proj.db"
## or CRAN built windows/macos
#f <- system.file("proj/proj.db", package = "sf", mustWork  = TRUE)

## table of authority codes, but I don't generally know my way around this
projected_crs  <- sf::read_sf(f, "projected_crs")

Cheers, Mike

Roger
>
> >
> > Cheers, Mike
> >
> > On Sun, Sep 19, 2021 at 9:35 AM Jean-Luc Dupouey <
> jean-luc.dupo...@inrae.fr>
> > wrote:
> >
> >> Dear Roger Bivand,
> >>
> >> I read your message about the rgdal retirement. It was a nice package
> >> and an important step in the development of R-spatial.
> >>
> >> I looked for alternatives for the functions I was using, but I didn't
> >> find them all. Those I am missing:
> >>
> >> . ogrInfo
> >> . ogrFIDs
> >> . make_EPSG
> >>
> >> Do you know of any (more or less) equivalent functions in the packages
> >> you mentioned that have taken over from rgdal?
> >>
> >> Thanks in advance,
> >>
> >> Jean-Luc Dupouey
> >>
> >> --
> >> INRAE
> >> UMR Silva
> >> F-54280 Champenoux
> >> France
> >>
> >> ___
> >> R-sig-Geo mailing list
> >> R-sig-Geo@r-project.org
> >> https://stat.ethz.ch/mailman/listinfo/r-sig-geo
> >>
> >
> >
> >
>
> --
> Roger Bivand
> Emeritus Professor
> Department of Economics, Norwegian School of Economics,
> Postboks 3490 Ytre Sandviken, 5045 Bergen, Norway.
> e-mail: roger.biv...@nhh.no
> https://orcid.org/-0003-2392-6140
> https://scholar.google.no/citations?user=AWeghB0J=en
>


-- 
Michael Sumner
Software and Database Engineer
Australian Antarctic Division
Hobart, Australia
e-mail: mdsum...@gmail.com

[[alternative HTML version deleted]]

___
R-sig-Geo mailing list
R-sig-Geo@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-geo


Re: [R-sig-Geo] rgdal retirement

2021-09-21 Thread Roger Bivand

On Sun, 19 Sep 2021, Michael Sumner wrote:

Hi Jean-Luc, if the packages mentioned don't yet cover it, you can get 
ogrInfo and ogrFIDs with a combination of vapour's vapour_read_names() 
(for FID), vapour_geom_summary()  (for FID and type) and 
vapour_layer_info().


In sf you can use the fid_column_name= argument to st_read() to retreive 
the FIDs with the geometries, but I think not the FIDs alone. orgInfo grew 
over time and became unwieldy, are there specific components that you use? 
Might sf::st_read() be modified to report these (and return FIDs) without 
reading the data and geometries? Using vapour is of course a good way to 
proceed, and very useful for cross-checking (Do rgdal and vapour return 
the same values, I hope so, vapour is much cleaner).




For make_EPSG() it's probably time to hit the proj.db more directly and I'd
be happy to have a look at that.


Right, RSQLite can handle this quite well, but sometimes the names of 
tables and fields in tables change.


Roger



Cheers, Mike

On Sun, Sep 19, 2021 at 9:35 AM Jean-Luc Dupouey 
wrote:


Dear Roger Bivand,

I read your message about the rgdal retirement. It was a nice package
and an important step in the development of R-spatial.

I looked for alternatives for the functions I was using, but I didn't
find them all. Those I am missing:

. ogrInfo
. ogrFIDs
. make_EPSG

Do you know of any (more or less) equivalent functions in the packages
you mentioned that have taken over from rgdal?

Thanks in advance,

Jean-Luc Dupouey

--
INRAE
UMR Silva
F-54280 Champenoux
France

___
R-sig-Geo mailing list
R-sig-Geo@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-geo







--
Roger Bivand
Emeritus Professor
Department of Economics, Norwegian School of Economics,
Postboks 3490 Ytre Sandviken, 5045 Bergen, Norway.
e-mail: roger.biv...@nhh.no
https://orcid.org/-0003-2392-6140
https://scholar.google.no/citations?user=AWeghB0J=en

___
R-sig-Geo mailing list
R-sig-Geo@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-geo


Re: [R-sig-Geo] rgdal retirement

2021-09-19 Thread Michael Sumner
Hi Jean-Luc, if the packages mentioned don't yet cover it, you can get
ogrInfo and ogrFIDs with a combination of vapour's vapour_read_names() (for
FID), vapour_geom_summary()  (for FID and type) and vapour_layer_info().

For make_EPSG() it's probably time to hit the proj.db more directly and I'd
be happy to have a look at that.

Cheers, Mike

On Sun, Sep 19, 2021 at 9:35 AM Jean-Luc Dupouey 
wrote:

> Dear Roger Bivand,
>
> I read your message about the rgdal retirement. It was a nice package
> and an important step in the development of R-spatial.
>
> I looked for alternatives for the functions I was using, but I didn't
> find them all. Those I am missing:
>
> . ogrInfo
> . ogrFIDs
> . make_EPSG
>
> Do you know of any (more or less) equivalent functions in the packages
> you mentioned that have taken over from rgdal?
>
> Thanks in advance,
>
> Jean-Luc Dupouey
>
> --
> INRAE
> UMR Silva
> F-54280 Champenoux
> France
>
> ___
> R-sig-Geo mailing list
> R-sig-Geo@r-project.org
> https://stat.ethz.ch/mailman/listinfo/r-sig-geo
>


-- 
Michael Sumner
Software and Database Engineer
Australian Antarctic Division
Hobart, Australia
e-mail: mdsum...@gmail.com

[[alternative HTML version deleted]]

___
R-sig-Geo mailing list
R-sig-Geo@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-geo


[R-sig-Geo] rgdal retirement

2021-09-18 Thread Jean-Luc Dupouey

Dear Roger Bivand,

I read your message about the rgdal retirement. It was a nice package 
and an important step in the development of R-spatial.


I looked for alternatives for the functions I was using, but I didn't 
find them all. Those I am missing:


. ogrInfo
. ogrFIDs
. make_EPSG

Do you know of any (more or less) equivalent functions in the packages 
you mentioned that have taken over from rgdal?


Thanks in advance,

Jean-Luc Dupouey

--
INRAE
UMR Silva
F-54280 Champenoux
France

___
R-sig-Geo mailing list
R-sig-Geo@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-geo