-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: basic logic converting csv into db (MAPCO-3357) (#1)
* feat: basic logic converting csv into db * feat: add classification matching + product adaptation * chore: refactor folder structure * fix: adding empty lines * docs: pr notes + logging + documentation * fix: ignore config * feat: adding more data validations + refactoring * chore: adding .licrc
- Loading branch information
1 parent
01542c3
commit 57e9a9c
Showing
10 changed files
with
1,328 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -128,3 +128,6 @@ dist | |
.yarn/build-state.yml | ||
.yarn/install-state.gz | ||
.pnp.* | ||
|
||
# config | ||
config/local.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
[licenses] | ||
# This indicates which are the only licenses that Licensebat will accept. | ||
# The rest will be flagged as not allowed. | ||
#accepted = ["MIT", "MSC", "BSD"] | ||
# This will indicate which licenses are not accepted. | ||
# The rest will be accepted, except for the unknown licenses or dependencies without licenses. | ||
unaccepted = ["LGPL"] | ||
# Note that only one of the previous options can be enabled at once. | ||
# If both of them are informed, only accepted will be considered. | ||
|
||
[dependencies] | ||
# This will allow users to flag some dependencies so that Licensebat will not check for their license. | ||
ignored=["ignored_dep1", "ignored_dep2"] | ||
|
||
[behavior] | ||
# False by default, if true, it will only run the checks when one of the dependency files or the .licrc file has been modified. | ||
run_only_on_dependency_modification = true | ||
# False by default, if true, it will never block the build. | ||
do_not_block_pr = true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,44 @@ | ||
# polygon-parts-cli | ||
This basic CLI insert static csv data into PolygonParts DB | ||
|
||
|
||
## Prerequisites | ||
1. Node.js | ||
2. Suitable csv data file as will be explained on next section | ||
|
||
<br/> | ||
|
||
## CSV structure | ||
| Field | What is it | Mandatory | possible values\examples | | ||
| :---: | :---: | :---: | :---: | | ||
| WKT | geometry of feature, may be MultiPolygon or Polygon | + | | | ||
| recordId | Catalog ID of original layer | + | will be UUID | | ||
| productId | Name of Parts source | - | | | ||
| classification | Level of classification provided | + | unclassified(6), confidential(5), secret(4), topSecret(3) | | ||
| productType | discrete type | + | Orthophoto, OrthophotoHistory, OrthophotoBest, RasterMap, RasterMapBest, RasterAid, RasterAidBest, RasterVector, RasterVectorBest| | ||
| srsName | On default epsg:4326 | - <br/> (Not in use) | GCS_WGS_1984 | | ||
| description | free text of information | - | | | ||
| imageName | original image name | - | | | ||
| minHorizontalAccuracyCE90 | | - | number | | ||
| maxResolutionMeter | used for min also | - | float | | ||
| sensors | list of sensor name | - | OGEN_CHAD, WORLDVIEW2| | ||
| productName | internal name of material | - | | | ||
| sourceDateEnd | will be used also for "start" | + | dd/mm/yyyy hh:mm:ss| | ||
| maxResolutionDeg | used for min also | - | float | | ||
|
||
<br/> | ||
|
||
## Installation | ||
Run the following command: | ||
``` | ||
npm i | ||
``` | ||
|
||
<br/> | ||
|
||
|
||
## Usage | ||
Run the following command: | ||
``` | ||
node src/index.js -i path/to/data.csv | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
{ | ||
"pgConfig":{ | ||
"host": "localhost", | ||
"port": 5432, | ||
"database": "raster-dev", | ||
"user": "postgres", | ||
"password": "postgres", | ||
"scheme": "PoylgonParts", | ||
"table": "parts", | ||
"sslEnabled": false, | ||
"rejectUnauthorized": false, | ||
"sslPaths": { | ||
"ca": "", | ||
"key": "", | ||
"cert": "" | ||
} | ||
} | ||
} |
Oops, something went wrong.