diff --git a/3d-style/data/bucket/model_bucket.ts b/3d-style/data/bucket/model_bucket.ts index 04cf9bd3008..3a21f272962 100644 --- a/3d-style/data/bucket/model_bucket.ts +++ b/3d-style/data/bucket/model_bucket.ts @@ -445,6 +445,7 @@ class ModelBucket implements Bucket { ): string { const layer = this.layers[0]; const modelIdProperty = layer.layout.get('model-id'); + const modelAllowDensityReductionProperty = layer.layout.get('model-allow-density-reduction'); assert(modelIdProperty); const modelId = modelIdProperty.evaluate(evaluationFeature, {}, this.canonical); @@ -479,7 +480,7 @@ class ModelBucket implements Bucket { continue; // Clip on tile borders to prevent duplicates } // reduce density - if (this.lookupDim !== 0) { + if (this.lookupDim !== 0 && modelAllowDensityReductionProperty) { const tileToLookup = (this.lookupDim - 1.0) / EXTENT; const lookupIndex = this.lookupDim * ((point.y * tileToLookup) | 0) + (point.x * tileToLookup) | 0; if (this.lookup) { diff --git a/3d-style/style/style_layer/model_style_layer_properties.ts b/3d-style/style/style_layer/model_style_layer_properties.ts index ec7a54c172e..ccd6662c91d 100644 --- a/3d-style/style/style_layer/model_style_layer_properties.ts +++ b/3d-style/style/style_layer/model_style_layer_properties.ts @@ -19,11 +19,13 @@ import type {StylePropertySpecification} from '../../../src/style-spec/style-spe export type LayoutProps = { "visibility": DataConstantProperty<"visible" | "none">; "model-id": DataDrivenProperty; + "model-allow-density-reduction": DataConstantProperty; }; let layout: Properties; export const getLayoutProperties = (): Properties => layout || (layout = new Properties({ "visibility": new DataConstantProperty(styleSpec["layout_model"]["visibility"]), "model-id": new DataDrivenProperty(styleSpec["layout_model"]["model-id"]), + "model-allow-density-reduction": new DataConstantProperty(styleSpec["layout_model"]["model-allow-density-reduction"]), })); export type PaintProps = { diff --git a/src/style-spec/reference/v8.json b/src/style-spec/reference/v8.json index 7d8e1f3f87b..93141d667db 100644 --- a/src/style-spec/reference/v8.json +++ b/src/style-spec/reference/v8.json @@ -1828,6 +1828,21 @@ "vector" ] }] + }, + "model-allow-density-reduction": { + "type": "boolean", + "default": true, + "transition": false, + "experimental": true, + "doc": "If true, the models will be reduced in density based on the zoom level. This is useful for large datasets that may be slow to render.", + "sdk-support": { + "basic functionality": { + "js": "0.10.0", + "android": "2.0.1", + "ios": "2.0.0" + } + }, + "property-type": "data-constant" } }, "layout_clip": { diff --git a/src/style-spec/types.ts b/src/style-spec/types.ts index 713fd860e57..8095640c691 100644 --- a/src/style-spec/types.ts +++ b/src/style-spec/types.ts @@ -1360,7 +1360,11 @@ export type ModelLayerSpecification = { "filter"?: FilterSpecification, "layout"?: { "visibility"?: "visible" | "none" | ExpressionSpecification, - "model-id"?: DataDrivenPropertyValueSpecification + "model-id"?: DataDrivenPropertyValueSpecification, + /** + * @experimental This property is experimental and subject to change in future versions. + */ + "model-allow-density-reduction"?: boolean }, "paint"?: { "model-opacity"?: DataDrivenPropertyValueSpecification, diff --git a/test/integration/data/trees-dense.geojson b/test/integration/data/trees-dense.geojson new file mode 100644 index 00000000000..0f1df4bf370 --- /dev/null +++ b/test/integration/data/trees-dense.geojson @@ -0,0 +1,1468 @@ +{ + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": {}, + "geometry": { + "coordinates": [ + -122.40272006619924, + 37.78545648087558 + ], + "type": "Point" + } + }, + { + "type": "Feature", + "properties": {}, + "geometry": { + "coordinates": [ + -122.4025289639477, + 37.785463193325654 + ], + "type": "Point" + } + }, + { + "type": "Feature", + "properties": {}, + "geometry": { + "coordinates": [ + -122.40255869096465, + 37.78519637297586 + ], + "type": "Point" + } + }, + { + "type": "Feature", + "properties": {}, + "geometry": { + "coordinates": [ + -122.40263937858208, + 37.78518630426457 + ], + "type": "Point" + } + }, + { + "type": "Feature", + "properties": {}, + "geometry": { + "coordinates": [ + -122.40266910559876, + 37.785104076404224 + ], + "type": "Point" + } + }, + { + "type": "Feature", + "properties": {}, + "geometry": { + "coordinates": [ + -122.40243341282206, + 37.78524168215965 + ], + "type": "Point" + } + }, + { + "type": "Feature", + "properties": {}, + "geometry": { + "coordinates": [ + -122.40238882229661, + 37.78506715774313 + ], + "type": "Point" + } + }, + { + "type": "Feature", + "properties": {}, + "geometry": { + "coordinates": [ + -122.40227628430408, + 37.78503023906357 + ], + "type": "Point" + } + }, + { + "type": "Feature", + "properties": {}, + "geometry": { + "coordinates": [ + -122.40231662811291, + 37.785107432644935 + ], + "type": "Point" + } + }, + { + "type": "Feature", + "properties": {}, + "geometry": { + "coordinates": [ + -122.40221683027042, + 37.7850151359622 + ], + "type": "Point" + } + }, + { + "type": "Feature", + "properties": {}, + "geometry": { + "coordinates": [ + -122.40222957042047, + 37.78493122978671 + ], + "type": "Point" + } + }, + { + "type": "Feature", + "properties": {}, + "geometry": { + "coordinates": [ + -122.40325939922002, + 37.78504534216188 + ], + "type": "Point" + } + }, + { + "type": "Feature", + "properties": {}, + "geometry": { + "coordinates": [ + -122.40318932839449, + 37.785087295196774 + ], + "type": "Point" + } + }, + { + "type": "Feature", + "properties": {}, + "geometry": { + "coordinates": [ + -122.40309377726884, + 37.78498492975018 + ], + "type": "Point" + } + }, + { + "type": "Feature", + "properties": {}, + "geometry": { + "coordinates": [ + -122.4029812392763, + 37.78490437979028 + ], + "type": "Point" + } + }, + { + "type": "Feature", + "properties": {}, + "geometry": { + "coordinates": [ + -122.40290904509234, + 37.78485907039973 + ], + "type": "Point" + } + }, + { + "type": "Feature", + "properties": {}, + "geometry": { + "coordinates": [ + -122.40308316047697, + 37.784857392274176 + ], + "type": "Point" + } + }, + { + "type": "Feature", + "properties": {}, + "geometry": { + "coordinates": [ + -122.4030279531599, + 37.78484564539005 + ], + "type": "Point" + } + }, + { + "type": "Feature", + "properties": {}, + "geometry": { + "coordinates": [ + -122.40307679040194, + 37.78476006089353 + ], + "type": "Point" + } + }, + { + "type": "Feature", + "properties": {}, + "geometry": { + "coordinates": [ + -122.4030237064433, + 37.78470300450854 + ], + "type": "Point" + } + }, + { + "type": "Feature", + "properties": {}, + "geometry": { + "coordinates": [ + -122.40307679040194, + 37.78467112003834 + ], + "type": "Point" + } + }, + { + "type": "Feature", + "properties": {}, + "geometry": { + "coordinates": [ + -122.4027965070998, + 37.78468622321 + ], + "type": "Point" + } + }, + { + "type": "Feature", + "properties": {}, + "geometry": { + "coordinates": [ + -122.4027858902545, + 37.784601477699866 + ], + "type": "Point" + } + }, + { + "type": "Feature", + "properties": {}, + "geometry": { + "coordinates": [ + -122.40294832716819, + 37.78465266070684 + ], + "type": "Point" + } + }, + { + "type": "Feature", + "properties": {}, + "geometry": { + "coordinates": [ + -122.40306086516074, + 37.78458721357673 + ], + "type": "Point" + } + }, + { + "type": "Feature", + "properties": {}, + "geometry": { + "coordinates": [ + -122.40277056605453, + 37.78446612773041 + ], + "type": "Point" + } + }, + { + "type": "Feature", + "properties": {}, + "geometry": { + "coordinates": [ + -122.40264320981605, + 37.784432199971306 + ], + "type": "Point" + } + }, + { + "type": "Feature", + "properties": {}, + "geometry": { + "coordinates": [ + -122.4025473348947, + 37.78444350922625 + ], + "type": "Point" + } + }, + { + "type": "Feature", + "properties": {}, + "geometry": { + "coordinates": [ + -122.40249147476368, + 37.78522668333707 + ], + "type": "Point" + } + }, + { + "type": "Feature", + "properties": {}, + "geometry": { + "coordinates": [ + -122.40238696947794, + 37.78519535537281 + ], + "type": "Point" + } + }, + { + "type": "Feature", + "properties": {}, + "geometry": { + "coordinates": [ + -122.40248066387208, + 37.78517257139035 + ], + "type": "Point" + } + }, + { + "type": "Feature", + "properties": {}, + "geometry": { + "coordinates": [ + -122.40257435826624, + 37.78514124340313 + ], + "type": "Point" + } + }, + { + "type": "Feature", + "properties": {}, + "geometry": { + "coordinates": [ + -122.40250588928596, + 37.78511845940402 + ], + "type": "Point" + } + }, + { + "type": "Feature", + "properties": {}, + "geometry": { + "coordinates": [ + -122.40260318731035, + 37.78509567539858 + ], + "type": "Point" + } + }, + { + "type": "Feature", + "properties": {}, + "geometry": { + "coordinates": [ + -122.40254552922167, + 37.785087131394576 + ], + "type": "Point" + } + }, + { + "type": "Feature", + "properties": {}, + "geometry": { + "coordinates": [ + -122.40247345661072, + 37.78506434737875 + ], + "type": "Point" + } + }, + { + "type": "Feature", + "properties": {}, + "geometry": { + "coordinates": [ + -122.40263922361581, + 37.78504441135891 + ], + "type": "Point" + } + }, + { + "type": "Feature", + "properties": {}, + "geometry": { + "coordinates": [ + -122.40270940451234, + 37.78507747320111 + ], + "type": "Point" + } + }, + { + "type": "Feature", + "properties": {}, + "geometry": { + "coordinates": [ + -122.40269304973967, + 37.78504677533205 + ], + "type": "Point" + } + }, + { + "type": "Feature", + "properties": {}, + "geometry": { + "coordinates": [ + -122.40258061067827, + 37.78504839100994 + ], + "type": "Point" + } + }, + { + "type": "Feature", + "properties": {}, + "geometry": { + "coordinates": [ + -122.40252336897413, + 37.78503869694369 + ], + "type": "Point" + } + }, + { + "type": "Feature", + "properties": {}, + "geometry": { + "coordinates": [ + -122.40243546207151, + 37.78503223423189 + ], + "type": "Point" + } + }, + { + "type": "Feature", + "properties": {}, + "geometry": { + "coordinates": [ + -122.40248248204266, + 37.785022540163496 + ], + "type": "Point" + } + }, + { + "type": "Feature", + "properties": {}, + "geometry": { + "coordinates": [ + -122.40256016721253, + 37.78503223423189 + ], + "type": "Point" + } + }, + { + "type": "Feature", + "properties": {}, + "geometry": { + "coordinates": [ + -122.40260718718369, + 37.785022540163496 + ], + "type": "Point" + } + }, + { + "type": "Feature", + "properties": {}, + "geometry": { + "coordinates": [ + -122.40266647323423, + 37.78500961473725 + ], + "type": "Point" + } + }, + { + "type": "Feature", + "properties": {}, + "geometry": { + "coordinates": [ + -122.40272575928478, + 37.78501769312882 + ], + "type": "Point" + } + }, + { + "type": "Feature", + "properties": {}, + "geometry": { + "coordinates": [ + -122.40263785238216, + 37.7849869952349 + ], + "type": "Point" + } + }, + { + "type": "Feature", + "properties": {}, + "geometry": { + "coordinates": [ + -122.40258674371796, + 37.784991842271594 + ], + "type": "Point" + } + }, + { + "type": "Feature", + "properties": {}, + "geometry": { + "coordinates": [ + -122.40252132462773, + 37.78500476770171 + ], + "type": "Point" + } + }, + { + "type": "Feature", + "properties": {}, + "geometry": { + "coordinates": [ + -122.40270122712602, + 37.784998304986985 + ], + "type": "Point" + } + }, + { + "type": "Feature", + "properties": {}, + "geometry": { + "coordinates": [ + -122.40236186559491, + 37.78502900287614 + ], + "type": "Point" + } + }, + { + "type": "Feature", + "properties": {}, + "geometry": { + "coordinates": [ + -122.40242319599213, + 37.785190570502664 + ], + "type": "Point" + } + }, + { + "type": "Feature", + "properties": {}, + "geometry": { + "coordinates": [ + -122.40243750641815, + 37.78516310403138 + ], + "type": "Point" + } + }, + { + "type": "Feature", + "properties": {}, + "geometry": { + "coordinates": [ + -122.40245590553724, + 37.78513563754912 + ], + "type": "Point" + } + }, + { + "type": "Feature", + "properties": {}, + "geometry": { + "coordinates": [ + -122.40243341772509, + 37.78510493970424 + ], + "type": "Point" + } + }, + { + "type": "Feature", + "properties": {}, + "geometry": { + "coordinates": [ + -122.40239866383334, + 37.78517441375568 + ], + "type": "Point" + } + }, + { + "type": "Feature", + "properties": {}, + "geometry": { + "coordinates": [ + -122.40239253079365, + 37.78515179430461 + ], + "type": "Point" + } + }, + { + "type": "Feature", + "properties": {}, + "geometry": { + "coordinates": [ + -122.40236390994157, + 37.78513402187315 + ], + "type": "Point" + } + }, + { + "type": "Feature", + "properties": {}, + "geometry": { + "coordinates": [ + -122.40232711170316, + 37.78503384991005 + ], + "type": "Point" + } + }, + { + "type": "Feature", + "properties": {}, + "geometry": { + "coordinates": [ + -122.40224942653353, + 37.784996689307945 + ], + "type": "Point" + } + }, + { + "type": "Feature", + "properties": {}, + "geometry": { + "coordinates": [ + -122.40230462389103, + 37.78500476770171 + ], + "type": "Point" + } + }, + { + "type": "Feature", + "properties": {}, + "geometry": { + "coordinates": [ + -122.40239866383334, + 37.78501284609382 + ], + "type": "Point" + } + }, + { + "type": "Feature", + "properties": {}, + "geometry": { + "coordinates": [ + -122.40243341772509, + 37.784998304986985 + ], + "type": "Point" + } + }, + { + "type": "Feature", + "properties": {}, + "geometry": { + "coordinates": [ + -122.40246817161662, + 37.784991842271594 + ], + "type": "Point" + } + }, + { + "type": "Feature", + "properties": {}, + "geometry": { + "coordinates": [ + -122.40255198982618, + 37.78498214819794 + ], + "type": "Point" + } + }, + { + "type": "Feature", + "properties": {}, + "geometry": { + "coordinates": [ + -122.40260514283705, + 37.784961144366974 + ], + "type": "Point" + } + }, + { + "type": "Feature", + "properties": {}, + "geometry": { + "coordinates": [ + -122.40267260627394, + 37.78496437572646 + ], + "type": "Point" + } + }, + { + "type": "Feature", + "properties": {}, + "geometry": { + "coordinates": [ + -122.40271758189844, + 37.784961144366974 + ], + "type": "Point" + } + }, + { + "type": "Feature", + "properties": {}, + "geometry": { + "coordinates": [ + -122.40263580803577, + 37.78494660324996 + ], + "type": "Point" + } + }, + { + "type": "Feature", + "properties": {}, + "geometry": { + "coordinates": [ + -122.4026460297685, + 37.78492398372909 + ], + "type": "Point" + } + }, + { + "type": "Feature", + "properties": {}, + "geometry": { + "coordinates": [ + -122.40269100539302, + 37.78493206213005 + ], + "type": "Point" + } + }, + { + "type": "Feature", + "properties": {}, + "geometry": { + "coordinates": [ + -122.40267669496723, + 37.78488843875314 + ], + "type": "Point" + } + }, + { + "type": "Feature", + "properties": {}, + "geometry": { + "coordinates": [ + -122.40259083241101, + 37.78493367781043 + ], + "type": "Point" + } + }, + { + "type": "Feature", + "properties": {}, + "geometry": { + "coordinates": [ + -122.4026133202234, + 37.78489974852026 + ], + "type": "Point" + } + }, + { + "type": "Feature", + "properties": {}, + "geometry": { + "coordinates": [ + -122.40263785238216, + 37.78486097216958 + ], + "type": "Point" + } + }, + { + "type": "Feature", + "properties": {}, + "geometry": { + "coordinates": [ + -122.40253563505351, + 37.78495306596925 + ], + "type": "Point" + } + }, + { + "type": "Feature", + "properties": {}, + "geometry": { + "coordinates": [ + -122.40252541332076, + 37.78491590532653 + ], + "type": "Point" + } + }, + { + "type": "Feature", + "properties": {}, + "geometry": { + "coordinates": [ + -122.40255607851924, + 37.78491105828485 + ], + "type": "Point" + } + }, + { + "type": "Feature", + "properties": {}, + "geometry": { + "coordinates": [ + -122.40257447763858, + 37.78487066625914 + ], + "type": "Point" + } + }, + { + "type": "Feature", + "properties": {}, + "geometry": { + "coordinates": [ + -122.40249065942899, + 37.78489328579633 + ], + "type": "Point" + } + }, + { + "type": "Feature", + "properties": {}, + "geometry": { + "coordinates": [ + -122.40247839334961, + 37.784969222764616 + ], + "type": "Point" + } + }, + { + "type": "Feature", + "properties": {}, + "geometry": { + "coordinates": [ + -122.40243750641815, + 37.78496276004674 + ], + "type": "Point" + } + }, + { + "type": "Feature", + "properties": {}, + "geometry": { + "coordinates": [ + -122.40242524033877, + 37.78492075236787 + ], + "type": "Point" + } + }, + { + "type": "Feature", + "properties": {}, + "geometry": { + "coordinates": [ + -122.40237413167432, + 37.7849869952349 + ], + "type": "Point" + } + }, + { + "type": "Feature", + "properties": {}, + "geometry": { + "coordinates": [ + -122.40232506735676, + 37.78496437572646 + ], + "type": "Point" + } + }, + { + "type": "Feature", + "properties": {}, + "geometry": { + "coordinates": [ + -122.40236186559491, + 37.78494821893001 + ], + "type": "Point" + } + }, + { + "type": "Feature", + "properties": {}, + "geometry": { + "coordinates": [ + -122.40230053519774, + 37.78492883076993 + ], + "type": "Point" + } + }, + { + "type": "Feature", + "properties": {}, + "geometry": { + "coordinates": [ + -122.40235777690187, + 37.78491590532653 + ], + "type": "Point" + } + }, + { + "type": "Feature", + "properties": {}, + "geometry": { + "coordinates": [ + -122.4023863977537, + 37.78490782692384 + ], + "type": "Point" + } + }, + { + "type": "Feature", + "properties": {}, + "geometry": { + "coordinates": [ + -122.4024456838045, + 37.78490136420059 + ], + "type": "Point" + } + }, + { + "type": "Feature", + "properties": {}, + "geometry": { + "coordinates": [ + -122.40252950201382, + 37.78487551330349 + ], + "type": "Point" + } + }, + { + "type": "Feature", + "properties": {}, + "geometry": { + "coordinates": [ + -122.4026030984904, + 37.78483512125756 + ], + "type": "Point" + } + }, + { + "type": "Feature", + "properties": {}, + "geometry": { + "coordinates": [ + -122.40226169261292, + 37.78489490147754 + ], + "type": "Point" + } + }, + { + "type": "Feature", + "properties": {}, + "geometry": { + "coordinates": [ + -122.40232302301011, + 37.78489974852026 + ], + "type": "Point" + } + }, + { + "type": "Feature", + "properties": {}, + "geometry": { + "coordinates": [ + -122.40240888556608, + 37.78487066625914 + ], + "type": "Point" + } + }, + { + "type": "Feature", + "properties": {}, + "geometry": { + "coordinates": [ + -122.40245794988388, + 37.78486905057741 + ], + "type": "Point" + } + }, + { + "type": "Feature", + "properties": {}, + "geometry": { + "coordinates": [ + -122.4024967924687, + 37.784844815350525 + ], + "type": "Point" + } + }, + { + "type": "Feature", + "properties": {}, + "geometry": { + "coordinates": [ + -122.40254176809322, + 37.78483673693928 + ], + "type": "Point" + } + }, + { + "type": "Feature", + "properties": {}, + "geometry": { + "coordinates": [ + -122.40235164386218, + 37.78486905057741 + ], + "type": "Point" + } + }, + { + "type": "Feature", + "properties": {}, + "geometry": { + "coordinates": [ + -122.40229644650469, + 37.784883591709686 + ], + "type": "Point" + } + }, + { + "type": "Feature", + "properties": {}, + "geometry": { + "coordinates": [ + -122.40242728468516, + 37.78484319966816 + ], + "type": "Point" + } + }, + { + "type": "Feature", + "properties": {}, + "geometry": { + "coordinates": [ + -122.40237413167432, + 37.78483996830421 + ], + "type": "Point" + } + }, + { + "type": "Feature", + "properties": {}, + "geometry": { + "coordinates": [ + -122.40231075693072, + 37.78485774080556 + ], + "type": "Point" + } + }, + { + "type": "Feature", + "properties": {}, + "geometry": { + "coordinates": [ + -122.40223920480054, + 37.78486905057741 + ], + "type": "Point" + } + }, + { + "type": "Feature", + "properties": {}, + "geometry": { + "coordinates": [ + -122.40245590553724, + 37.784820580115706 + ], + "type": "Point" + } + }, + { + "type": "Feature", + "properties": {}, + "geometry": { + "coordinates": [ + -122.40257038894528, + 37.78480603897101 + ], + "type": "Point" + } + }, + { + "type": "Feature", + "properties": {}, + "geometry": { + "coordinates": [ + -122.40251110289475, + 37.78480765465338 + ], + "type": "Point" + } + }, + { + "type": "Feature", + "properties": {}, + "geometry": { + "coordinates": [ + -122.40233120039645, + 37.78481734874998 + ], + "type": "Point" + } + }, + { + "type": "Feature", + "properties": {}, + "geometry": { + "coordinates": [ + -122.4024027525264, + 37.78481734874998 + ], + "type": "Point" + } + }, + { + "type": "Feature", + "properties": {}, + "geometry": { + "coordinates": [ + -122.40227191434566, + 37.78484643103205 + ], + "type": "Point" + } + }, + { + "type": "Feature", + "properties": {}, + "geometry": { + "coordinates": [ + -122.4026133202234, + 37.78481088601956 + ], + "type": "Point" + } + }, + { + "type": "Feature", + "properties": {}, + "geometry": { + "coordinates": [ + -122.40266034019454, + 37.7848157330678 + ], + "type": "Point" + } + }, + { + "type": "Feature", + "properties": {}, + "geometry": { + "coordinates": [ + -122.4026971384327, + 37.78486905057741 + ], + "type": "Point" + } + }, + { + "type": "Feature", + "properties": {}, + "geometry": { + "coordinates": [ + -122.40272984797807, + 37.78493367781043 + ], + "type": "Point" + } + }, + { + "type": "Feature", + "properties": {}, + "geometry": { + "coordinates": [ + -122.40270327147265, + 37.784814117384855 + ], + "type": "Point" + } + }, + { + "type": "Feature", + "properties": {}, + "geometry": { + "coordinates": [ + -122.40273802536417, + 37.784902979881636 + ], + "type": "Point" + } + }, + { + "type": "Feature", + "properties": {}, + "geometry": { + "coordinates": [ + -122.40274415840412, + 37.78486743489559 + ], + "type": "Point" + } + }, + { + "type": "Feature", + "properties": {}, + "geometry": { + "coordinates": [ + -122.40274415840412, + 37.78483027421059 + ], + "type": "Point" + } + }, + { + "type": "Feature", + "properties": {}, + "geometry": { + "coordinates": [ + -122.40274415840412, + 37.78477534098921 + ], + "type": "Point" + } + }, + { + "type": "Feature", + "properties": {}, + "geometry": { + "coordinates": [ + -122.40268282800692, + 37.78478665077287 + ], + "type": "Point" + } + }, + { + "type": "Feature", + "properties": {}, + "geometry": { + "coordinates": [ + -122.40263580803577, + 37.78478988213999 + ], + "type": "Point" + } + }, + { + "type": "Feature", + "properties": {}, + "geometry": { + "coordinates": [ + -122.40252950201382, + 37.78478988213999 + ], + "type": "Point" + } + }, + { + "type": "Feature", + "properties": {}, + "geometry": { + "coordinates": [ + -122.40242932903182, + 37.7847882664564 + ], + "type": "Point" + } + }, + { + "type": "Feature", + "properties": {}, + "geometry": { + "coordinates": [ + -122.40247634900297, + 37.78479634487296 + ], + "type": "Point" + } + }, + { + "type": "Feature", + "properties": {}, + "geometry": { + "coordinates": [ + -122.40236595428823, + 37.78480927033651 + ], + "type": "Point" + } + }, + { + "type": "Feature", + "properties": {}, + "geometry": { + "coordinates": [ + -122.40228213607864, + 37.78482219579777 + ], + "type": "Point" + } + }, + { + "type": "Feature", + "properties": {}, + "geometry": { + "coordinates": [ + -122.40222898306779, + 37.784844815350525 + ], + "type": "Point" + } + }, + { + "type": "Feature", + "properties": {}, + "geometry": { + "coordinates": [ + -122.40219422917603, + 37.784820580115706 + ], + "type": "Point" + } + }, + { + "type": "Feature", + "properties": {}, + "geometry": { + "coordinates": [ + -122.40223102741444, + 37.78480927033651 + ], + "type": "Point" + } + }, + { + "type": "Feature", + "properties": {}, + "geometry": { + "coordinates": [ + -122.40226782565261, + 37.78478988213999 + ], + "type": "Point" + } + }, + { + "type": "Feature", + "properties": {}, + "geometry": { + "coordinates": [ + -122.40259287675765, + 37.78477534098921 + ], + "type": "Point" + } + }, + { + "type": "Feature", + "properties": {}, + "geometry": { + "coordinates": [ + -122.4024967924687, + 37.78477372530536 + ], + "type": "Point" + } + } + ] +} \ No newline at end of file diff --git a/test/integration/render-tests/model-layer/density-reduction/expected.png b/test/integration/render-tests/model-layer/density-reduction/expected.png new file mode 100644 index 00000000000..4fbc2ab0b97 Binary files /dev/null and b/test/integration/render-tests/model-layer/density-reduction/expected.png differ diff --git a/test/integration/render-tests/model-layer/density-reduction/style.json b/test/integration/render-tests/model-layer/density-reduction/style.json new file mode 100644 index 00000000000..634ca30305b --- /dev/null +++ b/test/integration/render-tests/model-layer/density-reduction/style.json @@ -0,0 +1,38 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 512, + "height": 512 + } + }, + "center": [ + -122.402822, + 37.78503 + ], + "zoom": 16, + "pitch": 10, + "sources": { + "trees": { + "type": "geojson", + "data": "local://data/trees-dense.geojson" + } + }, + "models": { + "tree-diffuse": "local://models/tree-no-material.glb" + }, + "layers": [ + { + "id": "tree-layer-diffuse", + "type": "model", + "source": "trees", + "layout": { + "model-id": "tree-diffuse" + }, + "paint": { + "model-scale": [ 10, 10, 10], + "model-translation": [0, 0, 100] + } + } + ] +} \ No newline at end of file