tyrasd left a comment (openstreetmap/openstreetmap-website#6399)
I was just about to post the potential use cases from an OSM editor application
(custom background imagery URLs, custom presets data in JSON format, etc.), but
it seems @tordans was faster. :sweat_smile:
Not having looked at @tordans's
[editor-settings-schema](https://github.com/tordans/editor-settings-schema) in
detail yet, my initial idea was also to implement this using the _preferences_
API: e.g. by storing the number of to be saved custom background layer entries
as the value of one, and then one additional entry per to be stored URL. For
presets this would be similar, except that the payload would be a JSON
representation of the preset instead.
Would introducing a new API for this really be a big benefit? I see the
downside of having to implement and maintain of additional endpoints. And there
we would again have the same question of how much data one would allow a user
to store in that extra API, wouldn't we?
PS: here are some numbers for reference for some of the mentioned use cases:
* currently, an median length of a URL of an imagery entry in ELI is 170
characters, but 59 entries are longer than 255 characters
* the average file size of a preset in the id-tagging-schema is 433 bytes. that
might be compressible a bit by stripping unnecessary whitespace, but it would
still be often over the 255 bytes limit, I assume
* for how overpass-turbo currently stores queries (which admittedly is kind of
questionable of whether its use of the _preferences_ API is intended or not),
the average size of a stored query should be in the ballpark of around 550
characters (based on the average size of queries shared publicly through
overpass-turbo.eu's short URL service)
--
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/6399#issuecomment-3720373596
You are receiving this because you are subscribed to this thread.
Message ID:
<openstreetmap/openstreetmap-website/pull/6399/[email protected]>
_______________________________________________
rails-dev mailing list
[email protected]
https://lists.openstreetmap.org/listinfo/rails-dev