Code Monkey home page Code Monkey logo

polyk's Introduction

polyk's People

Contributors

deniscarriere avatar febeling avatar martywallace avatar meelkor avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

polyk's Issues

Is this a fork?

Could you clarify how the project is being maintained, and if it's a goal to go beyond Ivan's PolyK library that he distributes from http://polyk.ivank.net/ ? I imagine this is basically a copy of Ivan's original source licensed via MIT with tests added and maybe other improvements. It's nice to see it on Github and NPM, which I understand Ivan wasn't too keen to do.

Thank you for adding the tests. I wouldn't have considered using the library without seeing these.

Publish new release 0.24.0

Just published a new release 0.24.0.

Could you test your applications that depend on it.

There's also an easy CDN URL that you can simply import into your HTML page.

<script src="https://unpkg.com/polyk/dist/polyk.min.js"></script>

Also looks like the bower works.

$ bower install polyk -f
bower resolve       https://github.com/MartyWallace/PolyK.git#*
bower download      https://github.com/MartyWallace/PolyK/archive/0.24.0.tar.gz
bower extract       polyk#* archive.tar.gz
bower resolved      https://github.com/MartyWallace/PolyK.git#0.24.0
bower install       polyk#0.24.0

polyk#0.24.0 bower_components/polyk

Close this issue whenever you've successfully tested the bower build.

CC: @febeling @martywallace

Add basic unit testing

For a geo-processing library, it would be nice to include some tests, even if they are very basic unit testing. At least it would show that the obvious test cases are covered and if someone has any issues with more complex scenarios they could simply just submit a PR with the test case failing.

I'm happy to help to build the initial tests using jest (preferred) or tape.

Add NPM support

Should be as easy as something like:

if (typeof module !== 'undefined' && typeof module.exports !== 'undefined) {
    // Export PolyK.
}

Bug in Point Intersection demo when cursor is at a certain position

Very likely it's possible to write a test case that fails which is the root cause of this issue.

This is the screenshot of what happens when the bug occurs.

1
2
3

The polygon is not highlighted indicating the point under cursor being reported not to be inside the polygon.

PolyK.Slice Polylines

We have the original polygons (counties) and the polylines to be used for splitting (highways). What if instead of trying to split the county polygons with the highway polylines we go a step back - get the counties boundaries (Polylines), merge them with the highways (Polylines) and use the merged dataset to build a brand new polygon dataset. Then we can get the original attributes from the County polygons to the resulting dataset with a simple Spatial Join.
image
Result Polygons:
image

IsSimple function

Hi,

My understanding of the issimple function is it returns false if the polygon is self-intersecting and true if not.

For co-ordiantes

0,0 , 25,25, 12,12, 11,30 it returns false which is what I expect.

however for 0,0 25, 25, 12,12 10, -15 it give false as well. I think it should be true.
even co-oridnates 0,0 25,25 ,12, 12 10,0, 0,0 is coming as false.

Could you please help with what is going on here?

Regards,
Ajay

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.