Comments (3)
You're right. It works after use mvt.UnmarshalGzipped
instead. Previously the .mvt
comes from http works because the http.Get
will silently uncompress the response if see Content-Encoding: gzip
.
The .mvt
comes from mapbox server is always gzipped, whatever with Accept-Encoding: gzip
or not. I didn't see any explaination from mapbox document about the gzip
. It looks like an implementation issue of mapbox's vector tile service.
from orb.
I made a simple command line tool vt2geojson
based on this library, which supports load mvt
from either file or URL. The strange thing is it's ok to download from URL directly, but it reports this error from file, even from the file in encoding/mvt/testdata
.
Please refer to the command line tool from: https://github.com/wangyoucao577/orb/tree/feature/vt2geojson/cmd/vt2geojson
$ cd cmd/vt2geojson
$ go build
$
$ ./vt2geojson -mvt ../../encoding/mvt/testdata/15-8956-12223.mvt -summary
2020/02/03 15:52:51 proto: wrong wireType = 7 for field Layers
from orb.
I believe this failure is due to the data being gzipped. Try to gunzip the file or use mvt.UnmarshalGzipped
.
from orb.
Related Issues (20)
- Can we use wkb.Scanner with orb.Geometry type ? HOT 2
- Units of orb.Bound.Pad() HOT 2
- Reverse Geocoding HOT 2
- panic in wkt.Unmarshal
- Polygon and line intersection coordinates
- quadtree KNearest search is fickle
- Subdivide polygon HOT 1
- How to process the result of encoding/mvt HOT 3
- Mongo/BSON: no decoder found for orb.Geometry HOT 6
- How to update DefaultRoundingFactor for Lat/Lon? HOT 6
- get geometry center HOT 1
- Failed to parse wkt MultiPolygon HOT 2
- Invalid MULTIPOLYGON no longer gives an error HOT 2
- Degraded performance wkt.Unmarshal since v.0.9.1 HOT 2
- Support for (storing) altitude HOT 6
- encoding/mvt fails on nil features HOT 5
- PointAtBearingAndDistance return points with large vertical distance HOT 1
- Tilecover returns adjacent / touching tiles HOT 2
- When i use a large polygon and clip it,it looks bad HOT 5
- JSON Unmarshalling panics if the geojson object is null HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from orb.