Skip to content
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

Difference with py-mapzen-whosonfirst-export #7

Open
Joxit opened this issue Dec 30, 2019 · 5 comments
Open

Difference with py-mapzen-whosonfirst-export #7

Joxit opened this issue Dec 30, 2019 · 5 comments

Comments

@Joxit
Copy link

Joxit commented Dec 30, 2019

Hi there,

I know that this repository is experimental, I have a question for the export methods. I see a difference between the python version and go, it's the precision of the geometries. Is this a mandatory transformation when working on WOF documents? Or this project is now good enough ?

Python 2 will soon be deprecated, this may be an opportunity to finalize this project by the way. :)

Python 2.7 will reach the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 won't be maintained after that date. A future version of pip will drop support for Python 2.7.

@thisisaaronland
Copy link
Member

It's difficult to say with confidence that the Go tooling is ready to replace, or sit next to, the Python bindings.

It is currently being tested in the update branch of the go-whosonfirst-browser tool and it seems to working well:

If you've had any experiences, good or bad, testing the Go bindings we'd love to hear about them.

The EOL of Python 2.7 is not ideal but it's done and we'll start the migration process soon enough.

@Joxit
Copy link
Author

Joxit commented Dec 31, 2019

Thank you for your answer, ok so if I do some contributions, it will be still with the python version for now.

I minified a wof document and then I played to Spot the difference between go and python exporter and here are what I found :

  1. No precision reduction on coordinates
  2. No use of utf-8 hexa codes
  3. Extra space after the colon
  4. 2 spaces instead of 4 for the indentation
  5. Sometime an extra space at the end of the line

Example for 2, 3, 4

-    "name:jpn_x_preferred":[
-        "\u30a2\u30f3\u30c6\u30a3\u30fc\u30d6"
+    "name:jpn_x_preferred": [
+      "アンティーブ"
    ],

Example for 1 and 5

  "bbox": [
-    7.064374,
-    43.54155,
-    7.145075,
-    43.622545
+    7.06437411574864, 
+    43.54155041682094, 
+    7.14507537244949, 
+    43.62254464156442
]

In fact, I'm working on a WOF command line aggregator to make easy my work with WOF documents. This add bash completion with some features for export (for example export all git stagged files or all files of a specific commit, I used this for whosonfirst-data/whosonfirst-data-admin-fr#17).

@thisisaaronland
Copy link
Member

That's super helpful!

It's probably time to put together a reference document that

  1. Makes explicit encoding decisions (for example I think we decided decimal precision would be capped at 13 points but could be less).
  2. Language bindings can consult and test against.

(cc @nvkelso @stepps00 @tomtaylor)

For the time being I've filed the following issues:

(Also, yay Rust tools!)

@thisisaaronland
Copy link
Member

I have started an issues specific to the topic of formalizing how WOF (GeoJSON) documents are marshaled over here:

whosonfirst/whosonfirst-cookbook#35

Please weigh in with comments, suggestions and #feelings.

@Joxit
Copy link
Author

Joxit commented Dec 31, 2019

Hey! Thank you for all your thread on cookbook !

(Yeah, one more language in the list of WOF tools 😛)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants