-
Notifications
You must be signed in to change notification settings - Fork 444
FlatGeobuf format support #11833
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
base: master
Are you sure you want to change the base?
FlatGeobuf format support #11833
Conversation
9d25ef7 to
19b4fef
Compare
api catalog in metadataexplorer load dynamic fgb module unit tests flatgebouf api FlatGeobuf OL Loader FlatGeobuf Cesium Loader upgrade flatgeobuf 4.3.3 enable Mapinfo identify flatgeobuf layers update docs fix strategy style editor enabled flatgeobuf layer type fix lints
19b4fef to
c189a73
Compare
db1b800 to
23b4b41
Compare
23b4b41 to
b62f5c3
Compare
|
@allyoucanmap last commit upgrade flatgeobuf to v4.4.0 and replacement with new optimized readMetadata() method |
| // copy and paste in catalog for testing: https://flatgeobuf.org/test/data/countries.fgb | ||
| // | ||
| export const getCapabilities = (url) => { | ||
| return getFlatGeobufGeneric().then(async flatgeobuf => { // load lib dynamically |
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.
As far as I know, we avoid using async await in mapstore project. So, I would suggest converting it to promise chaining.
cc: @allyoucanmap
| const parts = serviceUrl.split(/\./g); | ||
| // remove query params | ||
| const ext = (parts[parts.length - 1] || '').split(/\?/g)[0]; | ||
| return ext === FGB |
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.
I would suggest to only use:
return ext === FGB| }; | ||
|
|
||
| export const preprocess = commonPreprocess; | ||
| // export const validate = (service) => Observable.of(service); |
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.
Why is this commented? I would suggest to remove it if not necessary.
|
|
||
| const createLayer = (options, map) => { | ||
|
|
||
| // console.log('createLayer FlatGeobuf Cesium', options, map); |
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.
I would suggest to remove the console.log. Check for other console.logs too.
|
|
||
| const geojson = new GeoJSON().writeFeatures(featuresVect); | ||
|
|
||
| // console.log('getFeatures', geojson, featuresVect); |
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.
I would suggest to remove the console.logs.
|
@stefanocudini Here are some bugs:
test-flatGeoBuff-1.mp4
test_flatgeobuff_2.mp4 |
Fix issue #11749 introducing the FlatGeobuf format support as new layer loaded from remote resource.
Flatgeobuf library version supported is last 4.3.3
added a new .fgb files and metadata sample for CI tests here:
https://github.com/stefanocudini/MapStore2/tree/fix-11749-flatgeobuf/web/client/test-resources/flatgeobuf
and a new public map here: http://localhost:8081/#/viewer/62619
Description
flatgeobuflayer typeWhat kind of change does this PR introduce? (check one with "x", remove the others)
Issue
What is the new behavior?
Support loading FlatGeobuf (remote .fgb files) from catalog
flatgeobuf.mp4
Breaking change
Does this PR introduce a breaking change? (check one with "x", remove the other)
Other useful information
just merged here:
flatgeobuf/flatgeobuf@15f137c