Skip to content
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

Prevent reprojection in addGeoJSONFeatureToGeoPackageWithFeatureDaoAndSrs #196

Open
wants to merge 4 commits into
base: 4.2.x
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/geoPackage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -847,7 +847,7 @@ export class GeoPackage {
const geometryData = new GeometryData();
geometryData.setSrsId(srs.srs_id);
if (!(srs.organization === ProjectionConstants.EPSG && srs.organization_coordsys_id === ProjectionConstants.EPSG_CODE_4326)) {
feature = reproject.reproject(feature, ProjectionConstants.EPSG_4326, featureDao.projection);
// feature = reproject.reproject(feature, ProjectionConstants.EPSG_4326, featureDao.projection);
}

const featureGeometry = typeof feature.geometry === 'string' ? JSON.parse(feature.geometry) : feature.geometry;
Expand Down
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -111,10 +111,10 @@
},
"scripts": {
"gh-pages-build": "npm install && npm run typedoc --options typedoc.json",
"typedoc": "rm -rf ./api-docs; typedoc --tsconfig tsconfig.json --mode file --out api-docs index.ts",
"clean": "rm -rf ./.test_run; rm -rf ./.nyc_output; rm -rf ./docs/coverage; npm run clean-dist; npm run clean-test;",
"clean-dist": "rm -rf ./dist",
"clean-test": "rm -rf ./test/bundle ./test/sql-wasm.wasm ./test/node_modules ./test/tmp",
"typedoc": "rimraf ./docs/api && typedoc --tsconfig tsconfig.json --out docs/api index.ts",
"clean": "rimraf ./.test_run ./.nyc_output ./docs/coverage && npm run clean-dist && npm run clean-test",
"clean-dist": "rimraf ./dist",
"clean-test": "rimraf test/bundle test/sql-wasm.wasm test/node_modules test/tmp",
"test-node": "npm run clean; nyc --no-clean mocha -r ts-node/register",
"build-browser-test": "npm run clean && webpack -c browser.test.config.js --output-filename browser.test.bundle.js --mode=development",
"test": "npm run test-node && npm run report",
Expand Down