Skip to content

Commit

Permalink
feat(geo): export to Excel
Browse files Browse the repository at this point in the history
- refact CSV and wfs
  • Loading branch information
alecarn committed Nov 28, 2024
1 parent 1b51fab commit ade4ba2
Show file tree
Hide file tree
Showing 43 changed files with 979 additions and 695 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
run: npm audit --omit dev && npm audit signatures

- name: Quality
run: npm run circular-deps & npm run lint & npm run format.check
run: npm run circular-deps & npm run lint.ci & npm run format.check

- name: Test
run: npm run e2e & npm run test
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:
run: npm audit --omit dev && npm audit signatures

- name: Quality
run: npm run circular-deps & npm run lint
run: npm run circular-deps & npm run lint.ci & npm run format.check

- name: Test
run: npm run e2e & npm run test
Expand Down
70 changes: 41 additions & 29 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,9 @@
"build.doc": "compodoc -p tsconfig.json --disablePrivate --disableProtected --disableInternal --disableLifeCycleHooks --theme material",
"format.check": "prettier packages projects scripts --check --config .prettierrc",
"format": "npm run format --workspaces --if-present && npm run format.scripts",
"format.scripts": "prettier --write ./scripts/src/**/*.{ts,js,json}",
"format.scripts": "prettier --write ./scripts/src/**/*.{mts,ts,js,json}",
"lint": "ng lint",
"lint.ci": "ng lint --quiet",
"lint.fix": "ng lint --fix",
"e2e": "npm run prestart && npm run e2e -w demo",
"e2e.local": "npm run prestart &&npm run e2e.local -w demo",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -623,7 +623,7 @@ export class ContextService {
const source = layer.ol.getSource() as olVectorSource;
olFeatures = source.getFeatures();
}
const cleanedOlFeatures = this.exportService.generateFeature(
const cleanedOlFeatures = this.exportService.cleanFeatures(
olFeatures,
'GeoJSON',
'_featureStore'
Expand Down
4 changes: 2 additions & 2 deletions packages/geo/ng-package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@
},
"allowedNonPeerDependencies": [
"nosleep.js",
"windows-1252",
"ts-cacheable",
"ts-md5",
"@turf/helpers",
"@turf/line-intersect",
"@turf/point-on-feature"
"@turf/point-on-feature",
"xlsx"
],
"assets": [
{ "input": "", "glob": "**/*.them*.scss", "output": "" },
Expand Down
2 changes: 1 addition & 1 deletion packages/geo/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
"ts-cacheable": "^1.0.6",
"ts-md5": "^1.3.0",
"tslib": "^2.6.0",
"windows-1252": "^3.0.4"
"xlsx": "https://cdn.sheetjs.com/xlsx-0.20.2/xlsx-0.20.2.tgz"
},
"peerDependencies": {
"@angular/animations": "^18.0.0",
Expand Down
3 changes: 2 additions & 1 deletion packages/geo/src/_index.scss
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
@forward './lib/search/search-bar/search-bar.theming.scss' as search-bar-* show search-bar-color,
@forward './lib/search/search-bar/search-bar.theming.scss' as search-bar-* show
search-bar-color,
search-bar-density, search-bar-theme;
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import { DataSource } from './datasource';
import { Legend } from './datasource.interface';

export class ArcGISRestDataSource extends DataSource {
public declare ol: olSourceVector;
public declare options: ArcGISRestDataSourceOptions;
declare public ol: olSourceVector;
declare public options: ArcGISRestDataSourceOptions;

protected createOlSource(): olSourceVector {
const esrijsonFormat = new olFormatEsriJSON();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ import { DataSource } from './datasource';
import { Legend } from './datasource.interface';

export class CartoDataSource extends DataSource {
public declare ol: olSourceCarto;
public declare options: CartoDataSourceOptions;
declare public ol: olSourceCarto;
declare public options: CartoDataSourceOptions;

get params(): any {
return this.options.params as any;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ import { ClusterDataSourceOptions } from './cluster-datasource.interface';
import { FeatureDataSource } from './feature-datasource';

export class ClusterDataSource extends FeatureDataSource {
public declare options: ClusterDataSourceOptions;
public declare ol: olSourceCluster;
declare public options: ClusterDataSourceOptions;
declare public ol: olSourceCluster;

protected createOlSource(): olSourceCluster {
this.options.format = this.getSourceFormatFromOptions(this.options);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import { DataSource } from './datasource';
import { FeatureDataSourceOptions } from './feature-datasource.interface';

export class FeatureDataSource extends DataSource {
public declare options: FeatureDataSourceOptions;
public declare ol: olSourceVector;
declare public options: FeatureDataSourceOptions;
declare public ol: olSourceVector;
protected createOlSource(): olSourceVector {
const sourceOptions = {
format: this.getSourceFormatFromOptions(this.options)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ import { Legend } from './datasource.interface';
import { ArcGISRestImageDataSourceOptions } from './imagearcgisrest-datasource.interface';

export class ImageArcGISRestDataSource extends DataSource {
public declare ol: ImageArcGISRest;
public declare options: ArcGISRestImageDataSourceOptions;
declare public ol: ImageArcGISRest;
declare public options: ArcGISRestImageDataSourceOptions;

get params(): any {
return this.options.params as any;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ import { DataSource } from './datasource';
import { MVTDataSourceOptions } from './mvt-datasource.interface';

export class MVTDataSource extends DataSource {
public declare options: MVTDataSourceOptions;
public declare ol: olSourceVectorTile;
declare public options: MVTDataSourceOptions;
declare public ol: olSourceVectorTile;

protected createOlSource(): olSourceVectorTile {
let mvtFormat;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import { DataSource } from './datasource';
import { OSMDataSourceOptions } from './osm-datasource.interface';

export class OSMDataSource extends DataSource {
public declare options: OSMDataSourceOptions;
public declare ol: olSourceOSM;
declare public options: OSMDataSourceOptions;
declare public ol: olSourceOSM;

protected createOlSource(): olSourceOSM {
if (!this.options.url) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import { Legend } from './datasource.interface';
import { TileArcGISRestDataSourceOptions } from './tilearcgisrest-datasource.interface';

export class TileArcGISRestDataSource extends DataSource {
public declare ol: olSourceTileArcGISRest;
public declare options: TileArcGISRestDataSourceOptions;
declare public ol: olSourceTileArcGISRest;
declare public options: TileArcGISRestDataSourceOptions;

get params(): any {
return this.options.params as any;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import { DataSource } from './datasource';
import { TileDebugDataSourceOptions } from './tiledebug-datasource.interface';

export class TileDebugDataSource extends DataSource {
public declare options: TileDebugDataSourceOptions;
public declare ol: TileDebug;
declare public options: TileDebugDataSourceOptions;
declare public ol: TileDebug;

protected createOlSource(): TileDebug {
const baseOptions = JSON.parse(JSON.stringify(this.options)); // to avoid to alter the original options
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { WebSocketDataSourceOptions } from './websocket-datasource.interface';

export class WebSocketDataSource extends FeatureDataSource {
public ws: WebSocket;
public declare options: WebSocketDataSourceOptions;
declare public options: WebSocketDataSourceOptions;

protected createOlSource(): olSourceVector {
this.createWebSocket();
Expand Down
Loading

0 comments on commit ade4ba2

Please sign in to comment.