bruce-models 1.0.5 → 1.0.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1617,19 +1617,16 @@
1617
1617
  ]
1618
1618
  };
1619
1619
  }
1620
- let url = "entities" +
1621
- // Page size and index.
1622
- `?PageSize=${filter.pageSize}&PageIndex=${filter.pageIndex}` +
1623
- // Entity type id.
1624
- (filter.entityTypeId ? `&BruceEntityType=${filter.entityTypeId}` : "") +
1625
- // Lod.
1626
- (filter.lodCategoryId ? "&LODType=" + filter.lodCategoryId : "") +
1627
- // Attribute filter.
1628
- (!requestFilter ? "" : "&Filter=" + exports.Api.Encode(JSON.stringify(requestFilter))) +
1629
- // Order by attribute + sort order.
1630
- (!filter.orderBy ? "" : "&OrderBy=" + filter.orderBy) +
1631
- (filter.sortOrder ? `&SortOrder=${filter.sortOrder == exports.Api.ESortOrder.Asc ? "ASC" : "DESC"}` : "");
1632
- const data = yield api.GET(url, exports.Api.PrepReqParams(reqParams));
1620
+ const body = {
1621
+ SortOrder: filter.sortOrder == exports.Api.ESortOrder.Asc ? "ASC" : "DESC",
1622
+ OrderBy: filter.orderBy,
1623
+ Filter: requestFilter,
1624
+ LODType: filter.lodCategoryId,
1625
+ BruceEntityType: filter.entityTypeId,
1626
+ PageIndex: filter.pageIndex,
1627
+ PageSize: filter.pageSize
1628
+ };
1629
+ const data = yield api.POST("entities", body, exports.Api.PrepReqParams(reqParams));
1633
1630
  const entities = data.Items;
1634
1631
  for (let i = 0; i < entities.length; i++) {
1635
1632
  const entity = entities[i];
@@ -3228,6 +3225,7 @@
3228
3225
  const lon2 = lon1 + cellDegreeSize;
3229
3226
  const lat2 = lat1 + cellDegreeSize;
3230
3227
  const [id, cell] = getOrCreateCell(this.cells, cellDegreeSize, lon1, lon2, lat1, lat2);
3228
+ /*
3231
3229
  {
3232
3230
  const cell_bounds = { south: lat1, west: lon1, north: lat2, east: lon2 };
3233
3231
  const subcells = [];
@@ -3254,11 +3252,13 @@
3254
3252
  cell.Fetched = true;
3255
3253
  return;
3256
3254
  }
3255
+
3257
3256
  let [x2, y2] = max;
3258
3257
  x2 = Math.max(x2, lon2);
3259
3258
  y2 = Math.max(y2, lat2);
3260
3259
  max = [x2, y2];
3261
3260
  }
3261
+ */
3262
3262
  ids.push(id);
3263
3263
  cells.push(cell);
3264
3264
  cells[id] = cell;
@@ -3294,31 +3294,6 @@
3294
3294
  const { west: wr, south: sr, north: nr, east: er } = r;
3295
3295
  return !(e <= wr || w >= er || n <= sr || s >= nr);
3296
3296
  }
3297
- function contains(l, r) {
3298
- const { west: w, south: s, north: n, east: e } = l;
3299
- const { west: wr, south: sr, north: nr, east: er } = r;
3300
- return !(er < e || wr > w || nr > n || sr < s);
3301
- }
3302
- function crop(rect, by) {
3303
- let { west: w, south: s, north: n, east: e } = rect;
3304
- const { west: wc, south: sc, north: nc, east: ec } = by;
3305
- w = Math.max(w, ec);
3306
- e = Math.min(e, wc);
3307
- s = Math.max(s, nc);
3308
- n = Math.min(n, sc);
3309
- return { west: w, south: s, north: n, east: e };
3310
- }
3311
- function intersection(l, r) {
3312
- const { west: w, south: s, north: n, east: e } = l;
3313
- const { west: wr, south: sr, north: nr, east: er } = r;
3314
- const x = Math.min(e, er) - Math.max(w, wr);
3315
- const y = Math.min(n, nr) - Math.max(s, sr);
3316
- return (x > 0 && y > 0) ? x * y : 0;
3317
- }
3318
- function area(rect) {
3319
- let { west: w, south: s, north: n, east: e } = rect;
3320
- return Math.abs((e - w) * (n - s));
3321
- }
3322
3297
  function floorValueToCellSize(size, value) {
3323
3298
  return Math.floor(value / size) * size;
3324
3299
  }