🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
DemoInstallSign in
Socket

gdalnpm

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

gdalnpm

This package is used to convert geospatial pdf to geotiff file in one go.(No Extra NPM modules is required)

1.0.3
latest
npm
Version published
Weekly downloads
0
-100%
Maintainers
1
Weekly downloads
 
Created
Source

This package is used to convert geospatial pdf to geotiff file in one go.(No Extra NPM modules is required)

Installation:-

  • First Install GDAL on your system. This is the way to install GDAL in your system(LINUX):-
    • sudo add-apt-repository ppa:ubuntugis/ppa
    • sudo apt-get update
    • sudo apt-get install gdal-bin
    • ogrinfo --version

2)Method Name:-

convertToTiff(originGeoPdfPath, allowCompression, destinationGeoTiffFolderName)

* originGeoPdfPath(string):- The Complete Path where your geospatial pdf is present

* allowCompression(boolean):- To allow compression or not by default it is false if you want to allow compression pass true

*destinationGeoTiffFolderName(string):-The comeplete path of the folder where you want to save your converted geotiff files

*return Promises

3)Sample Code to perform conversion

const GdalNpm = require('gdalnpm')  //require NPM

const path = require('path')        //require path

//originGeoPdfPath:- The Complete Path where your geospatial pdf is present

//allowCompression:- To allow compression or not by default it is false if you want to allow compression pass true

//destinationGeoTiffFolderName:-The comeplete path of the folder where you want to save your converted geotiff files

const ConvertToGeoTiff = async (originGeoPdfPath, allowCompression, destinationGeoTiffFolderName) => {
try {
    return await GdalNpm.convertToTiff(originGeoPdfPath, allowCompression, destinationGeoTiffFolderName)
}
catch (err) {
    throw err;
}
}

await ConvertToGeoTiff(path.join(__dirname, 'geospatial.pdf'), true, path.join(__dirname, 'geotiff')).catch(err => console.log(err))


Enjoy!!!! Happy Coding!!!!!

Keywords

GDAL

FAQs

Package last updated on 17 Oct 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts