-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow epsg-code to be provided as string? #99
Comments
Doesn't seem to work for me: > p = processes()
> datacube = p$load_collection(
+ id = "SENTINEL2_L2A_SENTINELHUB",
+ spatial_extent=list(west = 16.06, south = 48.06, east = 16.65, north = 48.35, crs = "EPSG:3857"),
+ temporal_extent=c("2017-03-01", "2017-04-01")
+ )
> datacube = p$filter_bbox(data = datacube, extent=list(west=16.06, south=48.06, east=16.65, north=48.35, crs = "EPSG:3857"))
> as(datacube, "Process")
Fehler in value[[3L]](cond) :
Error serializing parameter 'spatial_extent' in process node 'load_collection_CLGAF1015P' :Error serializing parameter '' in process node 'load_collection_CLGAF1015P' :Unsupported value type.
```
If I remove the crs parameter or specify it as integer, it works as expected. |
2843135#diff-766d8c7b4cd9dd95fab53577c45b7252147b8245528d4bb5d7edd7a82b537adaR469 Do you need to change the type there to ["integer", "string"]? Or: 2843135#diff-766d8c7b4cd9dd95fab53577c45b7252147b8245528d4bb5d7edd7a82b537adaR484 Do you need to change the regexp to |
I missed enabling it for type |
Yes, I can confirm that this works now. |
The specification asks to provide EPSG codes as numbers (e.g. 4326 instead of EPSG:4326). We see many code snippets that actually use the string variant, which strictly speaking should be WKT2.
So an idea coming up in recent discussions is that we use the clients to correct this common mistake.
So for subtype
epsg-code
a client could simply match against the pattern/regexp/^EPSG:(\d{4,})$/i
and replace it with the first match converted to an int.In pseudo-code something like:
The text was updated successfully, but these errors were encountered: