Johnson,
Thanks for offering to develop some code to implement an OSM import. I continue to think this is a great idea, and an "OSM Connector" would a real contribution. A few things to consider:
Approaches
There are at least a couple of potential approaches:
-> Bulk Importer - we are in the process of developing a bulk import feature for OpenTreeMap, and we expect this to be completed and committed to the GitHub repo in the next few weeks. One simple solution would be export the OSM data, convert to a CSV file and then import using the bulk importer. There will be some limitations in this initial version of the importer - you'll need to adhere to a fixed set of field names - there won't be a feature for matching arbitrary field names to the OpenTreeMap database, but that's probably easy to overcome. And this initial version is not very fast yet. If you wanted to help smooth the way for OSM imports, you could potentially build a tool that would convert the standard set of
OSM tree tags to OpenTreeMap field names.
-> API - the OpenTreeMap project exposes an API that supports all core functionality. Another approach would be to develop an import tool that would support transferring data from OSM to OpenTreeMap by implementing software that would bridge the two APIs. The most significant challenge in taking this approach is that we haven't done the work to document the OpenTreeMap API. We use the API extensively to support the native iOS and Android clients, so it's well-tested, but not well-document. We'd like to see the documentation completed, but we haven't had a lot of demand, so it's been low on our priority list. Still, there's probably only a small amount of the API that you'd need, and it might not be too tough to use it to pull off development of an OSM Connector.
Potential Issues
-> Fields vs. Tags - OSM has a very flexible data model - any tag is possible - while OpenTreeMap is based on a relational database. The OpenTreeMap data model is flexible and can accommodate many custom fields, but you would likely need to make some decisions about which tags you want to import and if they are not part of the standard OpenTreeMap list, you'd have to set up custom fields in your instance
-> Standard OSM Tree Tags - The accepted OSM tags for trees -
http://wiki.openstreetmap.org/wiki/Tag:natural%3Dtree - are fairly limited but despite the short list, they only partially match the standard set in OpenTreeMap. There is support in OpenTreeMap for species, species:en and circumference (would need to be converted to diameter at breast height [DBH]), but you'd likely need to set custom fields for other tags, like leaf-type, taxon. or sex.
-> Units - OSM assumes meters as the default; you'd likely need to query the OpenTreeMap instance to check the units to be sure they match.
If you are interested in developing a new tool, the first step will likely be to go through the installation process outlined in the OTM2 wiki at
https://github.com/OpenTreeMap/OTM2/wiki and get the system up and running. Then I'd suggest putting together some notes on the approach you'd like to take and share with the mailing list to get feedback.
Best,
Robert