Skip to content

Commit

Permalink
deleted utm coordinates from the sample. it has never used them
Browse files Browse the repository at this point in the history
  • Loading branch information
Jin IGARASHI committed Jul 24, 2020
1 parent 0d054c3 commit 6131410
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 8 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@watergis/geojson2inp",
"version": "0.1.0",
"version": "0.1.1",
"description": "This module converts GeoJSON to EPANET INP file",
"main": "dist/index.js",
"types": "dist/index.d.ts",
Expand Down
4 changes: 0 additions & 4 deletions src/asset/Coordinate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@ export default class Coordinate {
lon: number;
lat: number;
elevation: number;
lon_utm: number;
lat_utm: number;
demand: number;
pattern: string;
isJunction: boolean;
Expand All @@ -16,8 +14,6 @@ export default class Coordinate {
this.lon = roundTo(params.lon, 6);
this.lat = roundTo(params.lat, 6);
this.elevation = roundTo(params.elevation, 0);
this.lon_utm = roundTo(params.lon_utm, 3);
this.lat_utm = roundTo(params.lon, 3);
this.demand = params.demand ? roundTo(params.demand, 6) : 0;
this.pattern = params.patten ? params.patten : '';
this.isJunction = true;
Expand Down
2 changes: 1 addition & 1 deletion tests/data/junctions.geojson

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion tests/data/reservoirs.geojson
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"type":"FeatureCollection","features":[{"type":"Feature","geometry":{"type":"Point","coordinates":[30.5993118051029,-2.05965428378165,0]},"properties":{"id":"Spring-4710","lon":30.5993118051029,"lat":-2.05965428378165,"elevation":1447,"source_type":"Spring","lon_utm":232956.467353214,"lat_utm":9772144.1748012}},{"type":"Feature","geometry":{"type":"Point","coordinates":[30.5992083815269,-2.05968351218354,0]},"properties":{"id":"Spring-4711","lon":30.5992083815269,"lat":-2.05968351218354,"elevation":1445,"source_type":"Spring","lon_utm":232944.961011037,"lat_utm":9772140.92394745}}]}
{"type":"FeatureCollection","features":[{"type":"Feature","geometry":{"type":"Point","coordinates":[30.5993118051029,-2.05965428378165,0]},"properties":{"id":"Spring-4710","lon":30.5993118051029,"lat":-2.05965428378165,"elevation":1447,"source_type":"Spring"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[30.5992083815269,-2.05968351218354,0]},"properties":{"id":"Spring-4711","lon":30.5992083815269,"lat":-2.05968351218354,"elevation":1445,"source_type":"Spring"}}]}
2 changes: 1 addition & 1 deletion tests/data/tanks.geojson
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"type":"FeatureCollection","features":[{"type":"Feature","geometry":{"type":"Point","coordinates":[30.5976615245649,-2.05740566413172,0]},"properties":{"id":"Tank-17268","lon":30.5976615245649,"lat":-2.05740566413172,"elevation":1439,"capacity":50,"init_level":0.75,"min_level":0.15,"max_level":1.5,"lon_utm":232772.413417688,"lat_utm":9772392.66073379}},{"type":"Feature","geometry":{"type":"Point","coordinates":[30.6242587540787,-2.03586619977387,0]},"properties":{"id":"Tank-17269","lon":30.6242587540787,"lat":-2.03586619977387,"elevation":1687,"capacity":200,"init_level":0.75,"min_level":0.15,"max_level":1.5,"lon_utm":235729.177113193,"lat_utm":9774779.93989548}},{"type":"Feature","geometry":{"type":"Point","coordinates":[30.6137485399724,-2.05527579848944,0]},"properties":{"id":"Tank-17270","lon":30.6137485399724,"lat":-2.05527579848944,"elevation":1728,"capacity":200,"init_level":0.75,"min_level":0.15,"max_level":1.5,"lon_utm":234562.566500004,"lat_utm":9772630.97086623}},{"type":"Feature","geometry":{"type":"Point","coordinates":[30.6137514970047,-2.05534962706559,0]},"properties":{"id":"Tank-17271","lon":30.6137514970047,"lat":-2.05534962706559,"elevation":1728,"capacity":50,"init_level":0.75,"min_level":0.15,"max_level":1.5,"lon_utm":234562.907826745,"lat_utm":9772622.80386495}},{"type":"Feature","geometry":{"type":"Point","coordinates":[30.5972185451444,-2.05652723519944,0]},"properties":{"id":"Tank-17272","lon":30.5972185451444,"lat":-2.05652723519944,"elevation":1439,"capacity":50,"init_level":0.75,"min_level":0.15,"max_level":1.5,"lon_utm":232722.962576546,"lat_utm":9772489.76630751}},{"type":"Feature","geometry":{"type":"Point","coordinates":[30.5971629111444,-2.02988659706958,0]},"properties":{"id":"Tank-17273","lon":30.5971629111444,"lat":-2.02988659706958,"elevation":1727,"capacity":20,"init_level":0.75,"min_level":0.15,"max_level":1.5,"lon_utm":232712.361061302,"lat_utm":9775436.98770418}},{"type":"Feature","geometry":{"type":"Point","coordinates":[30.6043246292553,-2.02457889137323,0]},"properties":{"id":"Tank-17274","lon":30.6043246292553,"lat":-2.02457889137323,"elevation":1729,"capacity":10,"init_level":0.75,"min_level":0.15,"max_level":1.5,"lon_utm":233508.616956151,"lat_utm":9776025.35443907}},{"type":"Feature","geometry":{"type":"Point","coordinates":[30.5866741411721,-1.98391974737572,0]},"properties":{"id":"Tank-17275","lon":30.5866741411721,"lat":-1.98391974737572,"elevation":1445,"capacity":100,"init_level":0.75,"min_level":0.15,"max_level":1.5,"lon_utm":231537.410121398,"lat_utm":9780520.55888781}},{"type":"Feature","geometry":{"type":"Point","coordinates":[30.6213228206143,-1.99847683688685,0]},"properties":{"id":"Tank-17276","lon":30.6213228206143,"lat":-1.99847683688685,"elevation":1740,"capacity":300,"init_level":0.75,"min_level":0.15,"max_level":1.5,"lon_utm":235396.355717551,"lat_utm":9778915.73656969}}]}
{"type":"FeatureCollection","features":[{"type":"Feature","geometry":{"type":"Point","coordinates":[30.5976615245649,-2.05740566413172,0]},"properties":{"id":"Tank-17268","lon":30.5976615245649,"lat":-2.05740566413172,"elevation":1439,"capacity":50,"init_level":0.75,"min_level":0.15,"max_level":1.5}},{"type":"Feature","geometry":{"type":"Point","coordinates":[30.6242587540787,-2.03586619977387,0]},"properties":{"id":"Tank-17269","lon":30.6242587540787,"lat":-2.03586619977387,"elevation":1687,"capacity":200,"init_level":0.75,"min_level":0.15,"max_level":1.5}},{"type":"Feature","geometry":{"type":"Point","coordinates":[30.6137485399724,-2.05527579848944,0]},"properties":{"id":"Tank-17270","lon":30.6137485399724,"lat":-2.05527579848944,"elevation":1728,"capacity":200,"init_level":0.75,"min_level":0.15,"max_level":1.5}},{"type":"Feature","geometry":{"type":"Point","coordinates":[30.6137514970047,-2.05534962706559,0]},"properties":{"id":"Tank-17271","lon":30.6137514970047,"lat":-2.05534962706559,"elevation":1728,"capacity":50,"init_level":0.75,"min_level":0.15,"max_level":1.5}},{"type":"Feature","geometry":{"type":"Point","coordinates":[30.5972185451444,-2.05652723519944,0]},"properties":{"id":"Tank-17272","lon":30.5972185451444,"lat":-2.05652723519944,"elevation":1439,"capacity":50,"init_level":0.75,"min_level":0.15,"max_level":1.5}},{"type":"Feature","geometry":{"type":"Point","coordinates":[30.5971629111444,-2.02988659706958,0]},"properties":{"id":"Tank-17273","lon":30.5971629111444,"lat":-2.02988659706958,"elevation":1727,"capacity":20,"init_level":0.75,"min_level":0.15,"max_level":1.5}},{"type":"Feature","geometry":{"type":"Point","coordinates":[30.6043246292553,-2.02457889137323,0]},"properties":{"id":"Tank-17274","lon":30.6043246292553,"lat":-2.02457889137323,"elevation":1729,"capacity":10,"init_level":0.75,"min_level":0.15,"max_level":1.5}},{"type":"Feature","geometry":{"type":"Point","coordinates":[30.5866741411721,-1.98391974737572,0]},"properties":{"id":"Tank-17275","lon":30.5866741411721,"lat":-1.98391974737572,"elevation":1445,"capacity":100,"init_level":0.75,"min_level":0.15,"max_level":1.5}},{"type":"Feature","geometry":{"type":"Point","coordinates":[30.6213228206143,-1.99847683688685,0]},"properties":{"id":"Tank-17276","lon":30.6213228206143,"lat":-1.99847683688685,"elevation":1740,"capacity":300,"init_level":0.75,"min_level":0.15,"max_level":1.5}}]}

0 comments on commit 6131410

Please sign in to comment.