-
-
Notifications
You must be signed in to change notification settings - Fork 114
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
Finish PMTiles write implementation and basic reader #502
Conversation
bdon
commented
Feb 28, 2023
•
edited
Loading
edited
- Reader is memory-inefficient, it loads entire dir into memory. Only really practical for unit testing. It's also limited to z15 because of the planetiler 32-bit IDs.
- follow up to this needs to expose multiple output formats via API
https://github.com/onthegomap/planetiler/actions/runs/4406722629 ℹ️ Base Logs 1375ee7
ℹ️ This Branch Logs 9a396fc
|
planetiler-core/src/main/java/com/onthegomap/planetiler/pmtiles/ReadablePmtiles.java
Show resolved
Hide resolved
planetiler-core/src/main/java/com/onthegomap/planetiler/pmtiles/ReadablePmtiles.java
Outdated
Show resolved
Hide resolved
planetiler-core/src/main/java/com/onthegomap/planetiler/pmtiles/ReadablePmtiles.java
Outdated
Show resolved
Hide resolved
planetiler-core/src/test/java/com/onthegomap/planetiler/pmtiles/PmtilesTest.java
Show resolved
Hide resolved
planetiler-core/src/main/java/com/onthegomap/planetiler/pmtiles/WriteablePmtiles.java
Outdated
Show resolved
Hide resolved
planetiler-core/src/main/java/com/onthegomap/planetiler/pmtiles/WriteablePmtiles.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking good!
planetiler-core/src/main/java/com/onthegomap/planetiler/pmtiles/ReadablePmtiles.java
Outdated
Show resolved
Hide resolved
planetiler-core/src/main/java/com/onthegomap/planetiler/pmtiles/ReadablePmtiles.java
Show resolved
Hide resolved
planetiler-core/src/main/java/com/onthegomap/planetiler/pmtiles/ReadablePmtiles.java
Outdated
Show resolved
Hide resolved
planetiler-core/src/main/java/com/onthegomap/planetiler/pmtiles/ReadablePmtiles.java
Outdated
Show resolved
Hide resolved
planetiler-core/src/main/java/com/onthegomap/planetiler/pmtiles/ReadablePmtiles.java
Outdated
Show resolved
Hide resolved
planetiler-core/src/main/java/com/onthegomap/planetiler/pmtiles/WriteablePmtiles.java
Outdated
Show resolved
Hide resolved
planetiler-core/src/test/java/com/onthegomap/planetiler/pmtiles/PmtilesTest.java
Outdated
Show resolved
Hide resolved
planetiler-core/src/test/java/com/onthegomap/planetiler/pmtiles/PmtilesTest.java
Show resolved
Hide resolved
planetiler-core/src/test/java/com/onthegomap/planetiler/pmtiles/PmtilesTest.java
Outdated
Show resolved
Hide resolved
planetiler-core/src/test/java/com/onthegomap/planetiler/pmtiles/PmtilesTest.java
Outdated
Show resolved
Hide resolved
planetiler-core/src/main/java/com/onthegomap/planetiler/pmtiles/WriteablePmtiles.java
Show resolved
Hide resolved
planetiler-core/src/main/java/com/onthegomap/planetiler/pmtiles/WriteablePmtiles.java
Outdated
Show resolved
Hide resolved
planetiler-core/src/main/java/com/onthegomap/planetiler/pmtiles/WriteablePmtiles.java
Show resolved
Hide resolved
…ctoryFromBytes, etc
…l pmtiles file; refactor reader getBytes and header
planetiler-core/src/main/java/com/onthegomap/planetiler/pmtiles/Pmtiles.java
Show resolved
Hide resolved
planetiler-core/src/main/java/com/onthegomap/planetiler/pmtiles/ReadablePmtiles.java
Outdated
Show resolved
Hide resolved
planetiler-core/src/main/java/com/onthegomap/planetiler/pmtiles/ReadablePmtiles.java
Show resolved
Hide resolved
planetiler-core/src/main/java/com/onthegomap/planetiler/pmtiles/WriteablePmtiles.java
Outdated
Show resolved
Hide resolved
planetiler-core/src/test/java/com/onthegomap/planetiler/pmtiles/PmtilesTest.java
Outdated
Show resolved
Hide resolved
this(vectorLayers, new HashMap<>()); | ||
} | ||
|
||
public byte[] toBytes() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The tests will catch that we can deserialize what we serialize, but will they confirm this actually hoists the other metadata attributes to top-level? If now you could try deserializing the bytes as a map and confirm it has keys from otherMetadata.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Kudos, SonarCloud Quality Gate passed! |
Looks great! 🎉 |