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

Generic Types and Header Only #27

Open
flippmoke opened this issue Nov 22, 2016 · 4 comments
Open

Generic Types and Header Only #27

flippmoke opened this issue Nov 22, 2016 · 4 comments

Comments

@flippmoke
Copy link
Member

While exploring this library, I noticed two things that I would like to change -- but might be viewed as larger changes to the library.

First, I would like to make the library more generic such that it would output all geometry<T> types rather then just geometry<double>. As part of these changes I would like to also make the library header only -- we could get away with not doing this and simply defining the types specifically outside the impl file, but I could prefer it to simply be header only and if there are compile time issues let the implementing library solve this problem by encapsulating the use of the library.

/cc @jfirebaugh @kkaefer

@kkaefer
Copy link
Contributor

kkaefer commented Nov 22, 2016

FWIW, we are already using this as a header-only library in Mapbox GL: #24

@flippmoke
Copy link
Member Author

@kkaefer I would prefer to simply make it geojson.hpp and drop the geojson_impl.hpp

@jfirebaugh
Copy link
Contributor

The drawback to making it header only is that it then requires the downstream library to depend on and provide rapidjson.

May I ask why you want support for coordinate types other than double?

@flippmoke
Copy link
Member Author

@jfirebaugh I would like to use std::int64_t for situations where it is well known that the geojson will not be anything but whole numbers. This could be an intermediate format during a map reduce type processing for creation of vector tiles.

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

3 participants