Skip to content

Commit

Permalink
Merge pull request #110 from AplinkosMinisterija/lumbering-type-added
Browse files Browse the repository at this point in the history
lumbering type added
  • Loading branch information
ambrazasp authored Sep 23, 2024
2 parents cac6548 + 60b8c12 commit ac7c592
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions services/integrations.lumbering.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,13 @@ export default class IntegrationsLumberingService extends moleculer.Service {
for (const feature of features) {
feature.geometry.crs = 'EPSG:4326';

const ownershipTypesByDigit: any = {
1: 'Privati',
2: 'Valstybinė',
3: 'Privati',
};
const firstIdDigit = Number(`${feature.properties.id}`.slice(0, 1));

const bodyJSON = [
{ title: 'VĮ VMU padalinys', value: `${feature.properties.padalinys} RP` },
{ title: 'Girininkija', value: `${feature.properties.girininkija} girininkija` },
Expand All @@ -117,6 +124,7 @@ export default class IntegrationsLumberingService extends moleculer.Service {
{ title: 'Kirtimo rūšis', value: feature.properties.kirtimo_rusis },
{ title: 'Vyraujantys medžiai', value: feature.properties.vyraujantys_medziai },
{ title: 'Atkūrimo būdas', value: feature.properties.atkurimo_budas },
{ title: 'Nuosavybės forma', value: ownershipTypesByDigit[firstIdDigit] || '-' },
];

const tagsIds: number[] = await this.findOrCreateTags(
Expand Down

0 comments on commit ac7c592

Please sign in to comment.