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

yaml mapping support? #55

Closed
yohanboniface opened this issue Jul 10, 2015 · 7 comments
Closed

yaml mapping support? #55

yohanboniface opened this issue Jul 10, 2015 · 7 comments

Comments

@yohanboniface
Copy link
Contributor

I personally consider config files are much easier to be written in yaml than in json, so I think supporting yaml for mapping file would be very handy.
If you think it's worth it, I may have a try on it (I don't know go, but that would be certainly simple enough to be a good occasion to hack a bit ;) ).

@thomersch
Copy link
Contributor

Although I like the idea of writing yaml instead of json, I don't think it is a particularly great idea to maintain two different systems.

@yohanboniface
Copy link
Contributor Author

I don't know go details, but in general yaml can map to json like structure, so it should only be a matter of having two parsers that ends up to the same structure, no?

@thomersch
Copy link
Contributor

It is indeed very easy to map yaml and json onto a struct in Go (yaml would need an additional dependency, but that's a rather minor problem). I just think that it might be a case of unnecessary over-complication for a tool that is supposed to do one thing right.

@yohanboniface
Copy link
Contributor Author

ok ok, let's count my { and } so ;)

(Closing as there is no call for action, but debate is still possible.)

@olt
Copy link
Member

olt commented Jul 13, 2015

Imposm 3 uses JSON because it is supported by Go's stdlib and was easy to integrate. JSON itself is horrible for a configuration format, since it doesn't support comments. I won't mind switching to YAML.

All valid JSON is also valid YAML, so a switch to YAML with the same mapping structure will still read "old" imposm mappings. Question is: does go-yaml support the same mapping?

@olt olt reopened this Jul 13, 2015
@tds4u
Copy link

tds4u commented Jul 22, 2015

Hello,
I'm working on a conversion of the OSM CartoCSS style (with YAML). But I've some problems, maybe it's related to import error? Look at the image please.
imposm_error_roads
Info: Hannover / Bemerode (Germany)

A road should be a LINESTRING and not an area so maybe there is a problem regarding the geometry of many roads or with IMPOSM3?

@thomersch
Copy link
Contributor

@tds4u I think you should open a new issue, because I don't see that your post is related to this thread.

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

4 participants