-
Notifications
You must be signed in to change notification settings - Fork 260
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
Use JavaScript for everything, split sources into features and resources #490
Conversation
Much of this approach is borrowed from https://github.com/osmlab/osm-community-index
Cool, and impressive for one evening of work! I'm not against retiring Robot Fairhurst, but what's your plan to build releases automatically when a source is updated? Something similar with Travis/Jenkins? |
Trying to leave out the political aspect of this (which practically mostly means future updates from me would likely be untested) i would like to - since you change the source file format again - add a general comment regarding that - which probably also applies to https://github.com/osmlab/osm-community-index. In a project like this were people are meant to be encouraged to contribute by editing and adding to the source data and not just the surrounding code it is universally a good idea to - i will borrow the terminology of the GPL here - maintain the source data in the preferred form of the work for making modifications. Manually editing JSON/GeoJSON files is not really the most sensible form of doing this when you have fairly unstructured data like here. It deters contributions and makes people invest energy into making their work convenient for the programmer. A format for manual edits should be intuitive and fault tolerant, no nested structures where avoidable, etc. I mostly use simple But the most important thing is not to change the format people are asked to contribute in whenever it might seem convenient from a data user perspective. As said the requirements of the data format are defined by the contribution ergonomics and these do not typically change considerably unless the scope of content changes. |
I can help with that, if needed.
I assume you would prefer replacing it with a mechanism using |
Aehmm ... how is the re-licensing supposed to work? |
from @grischard
We could leave it in if you find it helpful, but I don't like how it introduces conflicts. |
from @tyrasd
Great!
Yeah - the idea is that people would consume the index by pulling from tagged releases on GitHub or the |
from @simonpoole
None of the original code remains, so there isn't really anything complicated here. I tend to use ISC these days because it is simpler and freer. Are you really attached to CC-BY-SA 3.0? |
from @imagico:
I actually think this proposed change improves a lot on this idea.. As new imagery is updated, often the only thing being modified is the imagery url and name/description. You can look under existing |
@bhousel I'm not attached to CC BY-SA at all, but I expect you will find that the original content creators for this index (JOSM devs and others) might not be happy with your unilateral decision to simply ignore the original licence. |
As said separating the footprints from the rest of the metadata is not necessarily a bad idea. The US however is not really a good example for reusing footprints because most of the layers have different actual coverages which are not all the full US - large scale imagery is only CONUS, Forest Service data seems to not cover Puerto Rico and the topographic maps do not cover the outer Aleutians. Most image layers have specific coverages which are not exactly identical to each other or a national boundary. Practically multiple layers with exactly the same footprint are a rare exception, mostly in case of several related layers by the same provider (like visible light and NIR images). Allowing contributors a simple way to contribute national image layers with a simplified way to specify a national border as an approximate coverage footprint (like with the Nominatim boundary polygons database) would not hurt of course. But on the other hand there are many layers where the GeoJSON footprint code is smaller than the icon definition of the layer. My comment was mostly about choosing a source data format with consideration for the contributor rather than for the downstream data users or conversion script development. Frankly i currently see no good reason to change the format for reasons other than improving contribution ergonomics (which this change currently does not). Allowing to specify footprints by reference to an external file or to a national boundary could change that - but this should be optional and not mandatory as in your current draft. If in the process of addressing #130 more sophisticated handling of coverage polygons with additional meanings is to be added this might be a factor as well but without a concrete plan for that it is not really possible to draft a change that makes sense at this time. |
Cool, good to know..
Please tag anyone who you think might care. |
from @imagico
Cool, glad you can see the benefit..
Yeah the icons can be kind of wasteful, especially in duplication. I was actually thinking of splitting out the icons too.. So they would sit in a separate folder and get merged into a spritesheet or something rather than existing as data urls attached to the imagery resources. Would this be helpful?
I think it does improve things. I mean, it's already not easy to contribute to this index - you need to know about tile servers and licenses and stuff. The kinds of people who want to add an entry here are not going to be deterred by needing to add both a |
@Klumbumbus see above licence issue (imho not solvable without an immense amount of work, and in particular not worth the effort). |
That is an understandable but errant impression from a programmer perspective. From the viewpoint of a mapper licenses and tile server URLs are things you become familiar with automatically over time. But the hurdle to contribute to this index is unreachable for most mappers even as is. And it would be even higher if it is mandatory to provide two or three different files carefully named and located with respect to another in the directory structure or referencing each other. The current format is anything but ideal but the mapper can take an existing layer as a template and go from there. For the footprint you can sketch it in JOSM, save it as GeoJSON and copy&paste the coordinate list. As said i would choose a different format probably but this is not a big deal for most i suppose. Duplicating the same footprint or icon code several times is not a contribution hurdle. The advantage of having footprints in separate files would in terms of contributor ergonomics mainly be that they can be generated with standard tools like ogr2ogr. But copying and pasting a WKT or GeoJSON geometry is easy enough as well. |
Do you want to change the license for the whole ELI project or only for the "program code" leaving the license of the contents of https://github.com/osmlab/editor-layer-index/tree/gh-pages/sources untouched? |
from @Klumbumbus
Whole project, ideally.. I don't see any reason to have separate licenses for the program code and the sources. |
@Klumbumbus asked to comment on a possible license change in https://josm.openstreetmap.de/ticket/16294: from @bhousel:
Well. To change the license you must:
Especially point 1 may be a lot of work. And 2 partly impossible, as you don't have contact information for many of them. And after the license for data is changed a sync between JOSM and ELI is no longer possible, as JOSM license is CC-BY-SA (and LGPL for any wiki contents after 2014 where possible). Also it may be impossible to use OSM data for boundary polygons afterwards, but I'm not sure about this. So my suggestion: Don't do it. If you want ISC in any case drop all data and start from scratch. |
Hey @stoecker - thanks for the context, this is a good reason to leave the index license alone. I'll change the PR so that the index stays CC-BY-SA, and the source code is ISC. I was very confused about the license situation, since |
I agree. I have raised similar issues a few weeks back also at the then brand new osm-community-index: osmlab/osm-community-index#7 (comment) |
Please do, it makes contributing easier. |
this PR seems to do too many things at once when these elements have nothing to do with each other.
|
@grischard are you mostly ok with this PR or should we abandon it? Not really sure how to proceed. Since people seem really hung up on the "2 files" thing, I could put everything back under |
The "two files" bit is what I actually like about this PR, but it needs to be accompanied with a solution for creating at least new entries that makes things a bit easier (its probably not really needed for later edits). Lets say a form for the attributes plus the ability to select one of the existing geojson features (and the ability to include one in a PR if none exist that fit). |
This PR indeed tries to to many things at once, which makes it hard to review. I'll try to split them individually. Switching to JS: I'm more familiar with python, but this should ultimately be a doocracy. If a javascript rewrite helps us close some issues without creating new ones, why not? I think our familiarity with js for you, python for me, might make us underestimate the complexity of setting up a new environment for a newbie. Ideally, I don't want contributors to have to install or run anything. The input and output format change: I'm not in favour of it, mostly because it isn't supported by our ecosystem. It's really useful, for example, to be able to tell people to simply load their file onto geojson.io to adjust their imagery boundaries. Having npm releases: it seems to me that we're partially solving an iD problem here. The current travis system guarantees that we'll only ever build valid files. If we ever change the output format in a breaking way - which we shouldn't - we could create an imagery_v2.geojson. We could also create github releases, which build systems or iD itself could download, but I don't really see the advantages. We could also keep the current system, and build npm releases with travis. The goodies are all good. Simplifying to 5 decimals is something we already do. As I said on IRC a few days ago, I'm still not sure I see the business case for the rewrite. It has an organisational cost to the project, and we should be sure that it's worth that cost and that there are no easier alternatives before we spend the energy on it. What does this do that is impossible to do more easily? |
Ok, let's leave things as-is then.. |
Much of this approach is copied from https://github.com/osmlab/osm-community-index
closes #168 #211 #214 #216 #217 (maybe #179 with the polygon deduplication)
There's a lot going on here, but I'll try to list out what has changed:
What's done:
Everything that was Python/Make is now JavaScript
This makes it much easier to setup your development environment and manage dependencies. The only prerequisite now is Node.
npm install
to install the dependenciesnpm run build
to build the indexnpm run test
to test itpackage.json
contains all the dependencies and commands you can runThe files originally under
sources/
have been split up:features/
(.geojson files for the polygons)resources/
(.json files for the imagery information - original files weregit mv
here, to preserve history)This lets us reuse polygons..
License is changed to ISCit's just simplerWe decided against this, to allow continued sync with JOSM
More goodies:
npm run stats
will show you what files are taking up the most space in the indexRELEASE.md
contains instructions on how to prepare a release, publish torelease
branch, tag (github release) andnpm publish
i18n/en.yaml
is doneStill to do:
imagery.json
/imagery.geojson
imagery.xml
outputCONTRIBUTING
andREADME
instructionsI also recommend:
gh-pages
tomaster