Giter VIP home page Giter VIP logo

polyline's Issues

Refactor from 0.7.1 to 0.10.0 causing unrecoverable crash

Hi!

First of, thanks a lot for your work on this crate!

I am experiencing a bug when using georust/polyline through a python wrapper called pypolyline.

If that's okay, I will link to the issue that I filed in their repository which contains the necessary information.

To repeat and summarize some of the information I gave on that other issue:

Any help very much appreciated.

Let me know if you need more information.

Best,
Stefan

Reconsider encode_coordinates interface

Right now, encode_coordinates looks like:

pub fn encode_coordinates(coordinates: &[[f64; 2]], precision: u32) -> Result<String, String> {
    ...
}

We don't need the entire slice at once, we just need anything that can iterate over coordinates:

pub fn encode_coordinates<C>(coordinates: C, precision: u32) -> Result<String, String>
where
    C: Iterator<Item=[f64; 2]>
{
    ...
}

And maybe it makes sense to pull in the geo-types crate to reuse our common Coordinate construct:

pub fn encode_coordinates<C, T>(coordinates: C, precision: u32) -> Result<String, String>
where
    C: Iterator<Item=Coordinate<T>>
{
    ...
}

crates publishing team

๐Ÿ‘‹ Hi @tmcw, you are the only "user-owner" of the polyline crate on crates.io, so only you can edit that crate's owners on crates.io.

Following up on georust/meta#21, I created a new polyline-publishers team for publishing to crates.io with you as maintainer.

Could you please update the crate owners? Specifically:


  • update polyline crate owners on crates.io:
cd polyline

# ๐Ÿ’ฅ remove large publishing group
cargo owner --remove github:georust:core

# ๐Ÿ” add small publishing group
cargo owner --add github:georust:polyline-publishers

# you're currently the only user-owner of the crate. Consider adding another user-owner, 
# that way if for some reason you become inaccessible we have someone else who can edit the owners. 
# See https://github.com/rust-lang/crates.io/issues/2906
cargo owner --add <username>

# make sure everything looks good ๐Ÿ‘€ 
cargo owner --list

If there's anyone else you'd like to be able to publish the crate, feel free to add them to your publishing team, or as a user-owner. Consider that user-owners, as opposed to owners-via-team, can themselves edit the crate's owners, which could be desirable, or not, depending.

In particular, it looks like @urschrei has been actively contributing to GH. Once you switch the publishing team, @urschrei (or anyone else) won't be able to publish until either they are added back to the publishing team or added as a user owner.

Let me know if you have any questions, or you can review georust/meta#21.

panicked at 'attempt to subtract with overflow', src/lib.rs:129:20

I have a large polyline6 which seems to trigger an overflow in the decoder. It's recreated with the following patch
overflow.patch.txt

cargo test then produces

test tests::should_not_trigger_overflow ... FAILED

failures:

---- tests::should_not_trigger_overflow stdout ----
thread 'tests::should_not_trigger_overflow' panicked at 'attempt to subtract with overflow', src/lib.rs:129:20


failures:
    tests::should_not_trigger_overflow

test result: FAILED. 4 passed; 1 failed; 0 ignored; 0 measured; 0 filtered out; finished in 7.76s

error: test failed, to rerun pass `--lib````

Adopt a similar strategy to proj for geo-types compatibility

Although polyline also uses LineStrings, these can be primitively represented without too much trouble. Should we thus adopt a similar strategy to the proj crate, enabling geo-types compatibility by default but allowing a more simple option for consumers who don't want or need the overhead?

noisy benchmarks

I regularly see 10% swings in performance. Typically if I run the benches 3 times, I'll see a spread of at least 10%.

Is anyone else seeing this? I haven't yet figured out why, but it renders the benchmarks nearly useless if you can't safely measure a 10% change in behavior.

P.S. I noticed this while trying to evaluate #37

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.