[R-sig-Geo] convert from any spatial* classes to a specific character string

Matteo Mattiuzzi m@tteo @end|ng |rom m@tt|uzz|@com
Wed Sep 2 14:25:23 CEST 2020


Dear list,

I have recently submitted a little R package to CRAN (now waiting for
approval) https://github.com/MatMatt/clmsapi.
The package is a R client for downloading data from the Copernicus Land
Monitoring Service (https://cryo.land.copernicus.eu/finder/).

The API expects a parameter called 'geometry' with the following formatting
(character):
'POLYGON((lon+lat,lon+lat,lon+lat, ... ))' # commas are replaced with ascii
'%2C' in the query string
or
'POINT(lon+lat)'
see also here:
https://cryo.land.copernicus.eu/resto/api/collections/HRSI/describe.xml

I could expect users to prepare the geometry parameter as it is needed by
the API, but I would prefer to improve the user friendliness by adding some
functionalities (similar as in the MODIS package) that can convert from
different spatial extent objects/classes to the needed character string (in
clmsapi::composeUrl).

What is the best way to implement that? What are the classes I should
consider as input for the geometry parameter? (i.e. well established and
well supplied with conversion-functions).

Thanks and kind regards, Matteo

	[[alternative HTML version deleted]]



More information about the R-sig-Geo mailing list