wisn / hanum

An OpenStreetMap attributes linter with custom presets. Currently, abandoned.
MIT License
5 stars 2 forks source link

Make OSM format as a wrapper of the core function #3

Open bekicot opened 7 years ago

bekicot commented 7 years ago

Is it possible to make OSM format is the wrapper extension of this tools?

So that we can create a wrapper for another type of JSON object coming from another source.

One of the interesting types is wiki data. I also have sets of data need to be properly linted using this tools, but converting Wikidata objects into a compatible osm object will be a bit of pain.

In my opinion, Hanum should have a Generalized simple object schema. And then incompatible format with Hannum can easily be converted to Hannum's schema.

Not sure is a good thing though, let me know your thought.

wisn commented 7 years ago

There is exists a package for OSM like this. But, it's an old one and I think that package wouldn't maintained anymore. I think the best way indeed to creates a generalization of the object data structure as a schema. Let me take a look on Wikidata object first. Any sample?

bekicot commented 7 years ago

@wisn Wikidata JSON objectsis schema-less the results can be anything. Wikidata is a bad example I pointed out.

But the point is, if hanum provided a simple interface, I can easily format Wikidata into hanum's JSON schema.

Here is a sample of the data I'm going to use http://tinyurl.com/y9kovnjy

As you can see, if we change the select query, Wikidata will change the attributes into something else.

wisn commented 7 years ago

Sure. Will starts to design ASAP.