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

Add WKB parse tests #37

Open
wants to merge 1 commit into
base: kyle/wkb
Choose a base branch
from

Conversation

smohiudd
Copy link

Add tests for parseWkb for the following geometries:

  • Polygon
  • LineString
  • Point

@smohiudd
Copy link
Author

@kylebarron I pulled in parse-test-cases from loaders. Let me know what you think.


for (const [title, testCase] of Object.entries(testCasesPoint)) {
const data = new Uint8Array(testCase.wkb);
const offsets = new Uint32Array([0, data.length]);
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These offsets are incorrect. I'm having trouble getting the binary length of each polygon

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What do you mean by "binary length of each polygon"? The number of bytes after being serialized to WKB?

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

Successfully merging this pull request may close these issues.

2 participants